Changeset 46 for trunk/INCLUDE/ASM.INC


Ignore:
Timestamp:
Apr 12, 2014, 8:23:32 AM (11 years ago)
Author:
Ben Rietbroek
Message:

Various Changes [2012-04-14]

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can DESTROY THE MBR on ALL ATTACHED DISKS!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE THESE COMMITS!!

Changes

o Added BLDLEVEL support
o Enhanced Master Make
o Sanitized sources
o Support for Wasm and Masm6 (experimental)
o Renamed MBR_PROT.ASM to MBR-PROT.ASM
o Merged bitfield code Into Installer
o First steps for cross platform Installer
o More...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/INCLUDE/ASM.INC

    r45 r46  
    100100; This macro does a check for this condition and aborts if it exists.
    101101; If there is space between the new location and the last emitted code or data
    102 ; will be filled.
     102; it will be filled with a filler-value defined in this macro..
    103103;
    104104; There are differences between assemblers on when and how labels and values
     
    107107; That's why the actual check for overlap is done by db getting a negative
    108108; value if an overlap occured.
    109 ; So don't change the (after - before) calculations by assigning it to a
    110 ; variable; that will break this macro.
     109; Don't change the (after - before) expression to a pre-calculated label
     110; because that won't work and will break this macro.
    111111;
    112112ORIGIN  MACRO   loc
     
    119119    ; Use this value to fill the gap between the new origin and the last
    120120    ; emitted code or data.
    121     fillchar = 'X'
     121    fillchar = '0'
    122122
    123123    ; Mark the location of the last emitted code or data.
     
    125125
    126126    ; JWasm can do db 0 dup (0).
     127    ; Using db dup() causes JWasm to recognize the after label so that
     128    ; overlap calculations are correct.
    127129    IFDEF   JWASM
    128130        db  (z_&loc&_2after - z_&loc&_1before)   dup(fillchar)
    129131    ENDIF
    130132
    131     ; Tasm cannot.
     133    ; Tasm cannot do db 0 dup(0), so we exclude that condition.
     134    ; Overlap checking could be done differently in Tasm but to keep things
     135    ; easy the JWasm method above is used.
    132136    IFDEF   TASM
    133137        IF (z_&loc&_2after - z_&loc&_1before) NE 0
    134138            db  (z_&loc&_2after - z_&loc&_1before)   dup(fillchar)
    135139        ENDIF
     140    ENDIF
     141
     142    ; Masm can also do db 0 dup (0), and it does calculate correctly
     143    ; but cannot find the after label.
     144    ; Same issue as with JWasm but the db construct does not solve it for masm.
     145    ; The label-values show-up to be correct in the listing though.
     146    ; Currently overlap-checking is disabled when assembling with Masm !
     147    ; FIXME: Find a solution for Masm.
     148    IFDEF   MASM
     149        ;~ db  (z_&loc&_2after - z_&loc&_1before)   dup(fillchar)
     150        ECHO ** Warning: Overlap Check on: loc not performed !
     151    ENDIF
     152
     153    ; Wasm can also do db 0 dup (0), but it complains about brackets or so.
     154    ; Seems to be some syntax issue.
     155    ; It cannot generate a list-file so values cannot be checked.
     156    ; It does not even support ECHO so no warning can be given.
     157    ; So overlap-checking is disabled when assembling with Wasm !
     158    ; FIXME: Find a solution for Wasm.
     159    IFDEF   WASM
     160        ; NOT EVEN ECHO IS SUPPORTED !
     161        ;~ db  (z_&loc&_2after - z_&loc&_1before)   dup(fillchar)
    136162    ENDIF
    137163
     
    161187
    162188
    163 sector_size                      equ   512
    164 image_size_60secs                equ   7800h
    165 image_size_62secs                equ   7c00h
     189sector_size                      equ   512      ; Normal size of a sector.
     190image_size_60secs                equ   7800h    ; Size of the pre v1.07 image.
     191image_size_62secs                equ   7c00h    ; Size of the post v1.06 image.
    166192
    167193;image_size                       equ   image_size_60secs
    168194image_size                       equ   image_size_62secs
    169195
    170 sector_count                     equ   image_size / sector_size                  ; Image size in sectors
     196; Image size in sectors
     197sector_count                     equ   image_size / sector_size
    171198
    172199IF image_size EQ image_size_60secs
    173    partition_count               equ   30                                        ; Maximum number of partitions supported
     200    ; Maximum number of partitions supported in pre v1.07.
     201   partition_count               equ   30
    174202ELSE
    175    partition_count               equ   45                                        ; Maximum number of partitions supported
     203    ; Maximum number of partitions supported in post v1.06.
     204   partition_count               equ   45
    176205ENDIF
Note: See TracChangeset for help on using the changeset viewer.