Ignore:
Timestamp:
Apr 11, 2014, 11:48:01 PM (11 years ago)
Author:
Ben Rietbroek
Message:

BSS Corruption Problem located (auxdebug on) [2012-02-21]

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!!

Problem

o Function with Xrefs goes out-of-bounds because hideparttable is too small

Has only 30 entries and should be 45.
Lost partition checker initializes out-of-bounds.

Info

o About the hideparttable

For each partition it can be specified which other partitions need to
be hidden when that partition is booted. This is useful for legacy DOS
but also braindead Windows that presents HPFS/JFS partitions as
unformatted and tries to persuade the user to format them.
With v1.07 the numer of partitions that can be handled was expanded from
30 to 45, but the size of the hideparttable was overseen.

o The need to compress the hideparttable

The old size was 30x30=900 bytes while the required size is 45x45=2045 bytes.
This amount of space is not available in the image.
Since 6 bits are enough to identify the partition number to be hidden,
the solution is to devide the table into bitfields. This will result
in a table of (45*45*6)/8=1519 bytes, which can be fitted.

Changes

Revamped the sources quite a bit and moved the history to a separate
file. (AIR-BOOT.HIS)

New

o FIXCODE script for Linux

Just until the C version is ready...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/AIR-BOOT.ASM

    r42 r43  
    11;
    2 ; BSS moet op A000 liggen
    3 ; Segmented werkt niet
    4 ; Moet met Tasm/DOS assembleren
    5 ; Wat we dus *niet* willen !!
    6 ;
    7 
    8 
    9 
    102; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
    113;
     
    2517;  AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
    2618;
    27 
    28 
    29 ;IFDEF   JWASM
    30 ;    db  'JWASM'
    31 ;ENDIF
    32 ;IFDEF   TASM
    33 ;    db  'TASM'
    34 ;ENDIF
    35 
    36 
    37 
    38 ;IF  DEBUG_LEVEL EQ  0
    39 ;    db  'L0'
    40 ;ELSE
    41 ;    db  'Lx'
    42 ;ENDIF
    43 
    44 
    45 ; ---------------------------------
    46 ; Rousseau: Fixes and Enhancements
    47 ; ---------------------------------
    48 ;
    49 ; v1.0.8-rc2-bld20120213
    50 ;-----------------------
    51 ; # Removed requirement for LVM P and V name to be the same to edit #
    52 ;   However, when both are the same before the edit, the V name will be
    53 ;   synved to the P name to have them both the same again after the edit.
    54 ;   If they differ, only the V name is updated.
    55 ;
    56 ; # Trying to edit the label of a type 0x35 partition now shows a popup #
    57 ;   The user is informed that type 0x35 labels cannot be edited.
    58 ;
    59 ; # Type 0x35 partitions cannot be added to the AB-menu anymore #
    60 ;   They are not bootable anyway. The user is informed by a popup.
    61 ;
    62 ; # De-tasemized the Assembler sources for JWasm compatibility #
    63 ;   AiR-BOOT can now be built using JWasm, which is now the preferred
    64 ;   assembler.
    65 ;
    66 ; # Completely reworked the build-system #
    67 ;   Everything is now done with Makefiles using WMake, Wlink and the
    68 ;   C/C++ Compilers from the Open Watcom development tools together with JWasm.
    69 ;   This obsoletes tasm, tlink and exe2bin.
    70 ;
    71 ; # Cross-Platform support #
    72 ;   AiR-BOOT and it's helpers can now be built on: DOS, Win32, OS/2 and Linux.
    73 ;
    74 ; # Rewrote FIXCODE.ASM in C so the tool-chain is not dependent on a DOS .COM
    75 ;   program for embedding the MBR-protection. DOS,Win32,OS/2 and Linux
    76 ;   versions of FIXCODE are now used. (EXE[MZ|PE|LX] and ELF)
    77 ;
    78 ; v1.0.8-rc1-bld20120124
    79 ; ----------------------
    80 ; # Changed version format to be more WarpIN compatible #
    81 ;   This is a cosmetic change only, the internal format has not changed.
    82 ;
    83 ; # Show LVM VolumeName instead of LVM PartitionName #
    84 ;   Previous versions of AiR-BOOT used the LVM PartitionName as the Label
    85 ;   if LVM-info was present for the partition.
    86 ;   This is inconsistent with MiniLVM which shows the LVM VolumeName.
    87 ;   Starting with v1.0.8 the LVM VolumeName is displayed.
    88 ;
    89 ; # LVM Partition and Volume name Synchronization #
    90 ;   Changing the Label of a partition with LVM-info now synchronizes
    91 ;   the LVM Partition Name with the LVM Volume Name.
    92 ;   This is the same behavior as MiniLVM.
    93 ;   Note however that the Label can only be changed when both the
    94 ;   LVM PartitionName and LVM VolumeName are the same.
    95 ;   See protected editing below.
    96 ;
    97 ; # Protected editing of the Label when LVM-info is present #
    98 ;   When the LVM VolumeName differs from the LVM PartitionName, the user can
    99 ;   edit the label but it will not be saved to the LVM record on disk.
    100 ;   This is to protect configurations created with the classic LVM tool.
    101 ;   Since MiniLVM assigns the same name to both the Partition and the Volume,
    102 ;   the Label can be edited and will be saved for such partitions.
    103 ;   To further protect a given configuration, LVM volumes with type 0x35
    104 ;   cannot be edited at all. This is to ensure that the LVM PartitionNames
    105 ;   remain unique when Spanning Volumes are used.
    106 ;
    107 ; # Editing the Label appended spaces #
    108 ;   When editing and changing the Label of a System using SETUP,
    109 ;   trailing spaces were stored in the LVM Volume and Partition names.
    110 ;   These labels need to be padded with zero's.
    111 ;   This has been fixed.
    112 ;   This bug is also present in v1.06.
    113 ;
    114 ; # Reworked Primary Partition <-> LVM-info association #
    115 ;   The previous way was to use a 1:1 correspondence between the PT-index
    116 ;   and the LVM-index. However, when the PT is cross-linked, lower entries
    117 ;   pointing to higher locations on the disk, or vice-versa, incorrect
    118 ;   LVM-info was associated. Such a cross-linked PT is sometimes generated
    119 ;   by the LVM engine when creating or deleting multiple partitions at once.
    120 ;   Best is to intermediately save after creating or deleting a partition
    121 ;   with (Mini)LVM.
    122 ;   The new way is to search the LVM-entries for the partition requested.
    123 ;
    124 ; # Reworked MBR-code to provide two I13X signatures #
    125 ;   The normal LVM MBR-code uses a special setup to indicate Int13X capability.
    126 ;   It contains the instruction, MOV EAX,'X31I', and some software checks
    127 ;   for the presence of the 'I13X' string in the MBR.
    128 ;   However, the location of this instruction differs between eCS 1.x and
    129 ;   eCS 2.x LVM MBR-code.
    130 ;   For compatibility, the v1.0.8 MBR has the 'I13X' string at both locations.
    131 ;
    132 ; # Fixed booting older eCS installations on HPFS #
    133 ;   When restoring systems from archive or otherwise generated systems,
    134 ;   the HPFS BPB sometimes lacked information that AiR-BOOT did not fill in.
    135 ;   The result was that a wrong partition was booted or that booting
    136 ;   stalled with the "unable to operate harddisk" message.
    137 ;   This has been fixed.
    138 ;
    139 ; # Fixed booting Windows from a logical partition with loader on FAT32 #
    140 ;   Depending on the configuration, sometimes the NTLDR could not be found.
    141 ;   This has been fixed.
    142 ;
    143 ; # Fixed drive-letter feature which was broken in v1.07 #
    144 ;   a)  v1.07 did remember the drive-letter feature was active for a partition,
    145 ;       but it failed to store the drive-letter because too few configuration
    146 ;       sectors were saved. This resulted in arbitrary values to be assigned
    147 ;       to the drive-letter for the partition.
    148 ;   b)  The JFS PBR-code does not use the in-memory BPB but uses the one
    149 ;       that is on disk. This prevented AiR-BOOT from passing the user assigned
    150 ;       drive-letter. AiR-BOOT now inserts the drive-letter in the BPB on disk,
    151 ;       but only if the partition is JFS.
    152 ;       AB v1.06 is also unable to use the drive-letter feature on JFS.
    153 ;   As a convenience, a drive-letter in the dl-feature pop-up can now be set
    154 ;   to "Disabled" by pressing backspace.
    155 ;   (As opposed to arrowing up/down to get to the "Disabled" entry)
    156 ;
    157 ; # Fixed stuck phase1 indicator when wrong name entered #
    158 ;   When using SET(A)BOOT /4:NAME with the MEMDRIVE env-var set,
    159 ;   and NAME being a non-existing partition, the phase1 indicator
    160 ;   would stay stuck between reboots.
    161 ;   This has been fixed.
    162 ;
    163 ; # Fixed DOS installer (AIRBOOT.COM) #
    164 ;   Behavior should now be the same as the eCS and WIN installers.
    165 ;   This re-enables the use of a bootable floppy or usb-stick
    166 ;   to install AiR-BOOT.
    167 ;
    168 ; # Fixed booting from FloppyDrive #
    169 ;   This is actually also broken in v1.06 when Int13X is forced on.
    170 ;   Now regular BIOS calls are used when booting from floppydrive.
    171 ;   A fresh AiR-BOOT installation now includes the floppydrive menu entry.
    172 ;
    173 ; # Fixed chainloading IBM Boot Manager #
    174 ;   AiR-BOOT v1.06 could chainload IBM-BM but only when it resided on
    175 ;   the first disk and was located below the 1024 cylinder and forced Int13X
    176 ;   extensions were disabled.
    177 ;   AiR-BOOT v1.0.8 can now chainload IBM-BM with forced Int13X extensions
    178 ;   enabled (the default) and if IBM-BM resides above the 1024 cylinder limit.
    179 ;   Also, chainloading IBM-BM from the second disk is supported.
    180 ;   Do not use chainloading IBM-BM unless you really have a need to.
    181 ;   See the AiR-BOOT Manual for "gotcha's" when using both AiR-BOOT and IBM-BM.
    182 ;
    183 ; # Corrected contact links #
    184 ;   Version 1.07 still presented the old contact links to the sourceforge
    185 ;   repository and the original author.
    186 ;   This caused confusion with regard to issues with v1.07.
    187 ;   This has been corrected.
    188 ;
    189 ; NOTE:
    190 ;   AB v1.07 had a bug with saving and loading the correct size of the
    191 ;   configuration. This broke the drive-letter feature.
    192 ;   As a result, the CRC over the config was also calculated wrongly.
    193 ;   While AB v1.0.8 fixes this, it has to use the v1.07 way of CRC calculation.
    194 ;   Otherwise SET(A)BOOT from the eCS v2.1 would break on AB v1.0.8 because it
    195 ;   sees a corrupt AiR-BOOT configuration.
    196 ;   This means that the CRC over the AB config is calculated over 5 sectors
    197 ;   instead of 7, just like in v1.07.
    198 ;
    199 ; NOTE:
    200 ;   Because of space constraints most of the debug code has been commented
    201 ;   out in this version.
    202 ;   Possibly it will be re-enabled after code cleanup and changing to JWasm.
    203 ;
    204 ;
    205 ; v1.07
    206 ; -----
    207 ; # Huge Drives and LVM #
    208 ;   When using disks >512GB under eComStation, the drive geometry changes to
    209 ;   127 or 255 sectors per track. Since LVM-info is written at the last sector
    210 ;   of a track, and AiR-BOOT uses the geometry of the MBR, it cannot find the
    211 ;   LVM-info and the eCS partition / volume bootsector.
    212 ;   This has been fixed.
    213 ;   Now, when an eCS-partition is discovered and the drive is >512GB, AiR-BOOT
    214 ;   will use the eCS geometry to locate the LVM-info and the bootsector.
    215 ;
    216 ; # Special loader handling #
    217 ;   The special handling of partition boot-loaders has been enhanced to
    218 ;   enable booting of legacy systems on huge drives with or without OS/2
    219 ;   extended geometry.
    220 ;
    221 ; # eComStation boot-through after phase 1 #
    222 ;   Special functionality is implemented to directly boot a newly
    223 ;   installed eCS system after completing phase 1 of the installation.
    224 ;   This works in conjuntion with the OS/2 specific SET(A)BOOT.EXE program,
    225 ;   also part of the AiR-BOOT package.
    226 ;
    227 ; # Math, Debug, Conv and Aux modules #
    228 ;   These are used for 32-bit arithmatic on 16-bit code,
    229 ;   debug the booting process, converting between data-types
    230 ;   and outputting log-data to the com-port.
    231 ;
    232 ;
    233 ; v1.06
    234 ; -----
    235 ; This is the last version developed by Martin Kiewitz.
    236 ; It serves as the base for the versions above.
    237 ; Please do not post your feedback on sourceforge or bother Martin with
    238 ; regard to issues with the above versions.
    239 ; Use the eCS bug-tracker or the Trac project-page at netlabs and see the
    240 ; documentation of this newer versions for the relevant contact information.
    24119
    24220
     
    26240; instructions, to allow for automatic recoding by TASM.
    26341; This seems to be a TASM bug. (v2,v3,v4, dunno v5)
    264 ;
    265 ;JUMPS
    266 ;
     42IFDEF   TASM
     43    ;~ JUMPS
     44ENDIF
    26745
    26846;
     
    27250;
    27351;ModuleNames             equ     1
    274 
    275 
    276 
    277 
    278 
    279 ;
    280 ; An ORG directive resets the location counter where code and data is
    281 ; generated. If the location counter is reset back to a point where
    282 ; code or data already has been generated, this will be overwritten
    283 ; without warning.
    284 ; This macro is run at every ORG directive to check for this condition,
    285 ; and when it occurs further assembly is terminated.
    286 ; FIXME: Get JWasm and Tasm use some common ECHO/%OUT method.
    287 ;        (Tasm only pases first word of non-quoted string to a macro)
    288 ;
    289 check_overlap   MACRO   loc
    290 
    291     ; Exit macro immediately if no overlap.
    292     ; We don't want to assign values to z_last_... if there is no
    293     ; overlap because they would then hold the values the last time this
    294     ; macro was called and not those of the last overlap.
    295     IF (loc - $) LE 0
    296         EXITM
    297     ENDIF
    298 
    299     ; Calculate the overlap.
    300     z_last_overlap_location = loc
    301     z_last_overlap_size = (loc - $)
    302 
    303     IFDEF   JWASM
    304         ; Output message.
    305         ECHO
    306         ECHO ** ERROR: LOCATION OVERLAP DETECTED [JWASM] ! **
    307         ECHO .         THIS IS MOST LIKELY CAUSED BY CODE / DATA
    308         ECHO .         EXPANSION TOWARDS AN 'ORG' DIRECTIVE.
    309         ECHO .         LOOK AT 'z_last_overlap_location' TO SEE WHERE.
    310         ECHO .         LOOK AT 'z_last_overlap_size' TO SEE SIZE.
    311         ECHO .         FORCING ERROR...
    312         ECHO
    313     ENDIF
    314     IFDEF   TASM
    315         IF2
    316             ; Output message (only on pass2).
    317             %OUT
    318             %OUT ** ERROR: LOCATION OVERLAP DETECTED [TASM] ! **
    319             %OUT .         THIS IS MOST LIKELY CAUSED BY CODE / DATA
    320             %OUT .         EXPANSION TOWARDS AN 'ORG' DIRECTIVE.
    321             %OUT .         LOOK AT 'z_last_overlap_location' TO WHERE.
    322             %OUT .         LOOK AT 'z_last_overlap_size' TO SEE SIZE.
    323             %OUT .         FORCING ERROR...
    324             %OUT
    325         ENDIF
    326     ENDIF
    327 
    328     ; Terminate assembly by forcing an error.
    329     .ERR
    330 
    331 ENDM
    332 
    333 
    33452
    33553
     
    34260MaxDisks                equ     64
    34361
    344 ;
    345 ; If defined then include DEBUG.ASM and output debug-info to serial-port.
    346 ;
    347 ;AuxDebug                equ     1
    348 
    349 ; Com-port for debugging, 0 is disabled
    350 BiosComPort             equ     0
     62; Only when assembled with JWasm because Tasm generates too large code.
     63IFDEF   JWASM
     64    ; If defined then include DEBUG.ASM and output debug-info to serial-port.
     65    AUX_DEBUG       EQU
     66ELSE
     67    ;~ AUX_DEBUG       EQU
     68ENDIF
    35169
    35270
     
    36381
    36482; 9600 bps, no parity, 1 stop-bit, 8 bits per char
    365 AuxInitParms            equ     11100011b
     83AUX_INIT_PARMS          EQU     11100011b
     84
     85; Com-port for debugging, 0 is disabled
     86BIOS_COM_PORT           EQU     1
    36687
    36788; Default word value for BIOS_AuxParms variable
    36889; Note that is has moved since v1.07
    369 BIOS_AuxParmsDefault    equ     (AuxInitParms SHL 8) OR BiosComPort
     90BIOS_AUXPARMS_DEFAULT   EQU     (AUX_INIT_PARMS SHL 8) OR BIOS_COM_PORT
     91
     92
     93
    37094
    37195;
     
    37397;
    37498ReleaseCode             equ     -1
    375 
    376 
    377 
    37899
    379100
     
    542263
    543264
    544                 ; ------------------------------------------
    545                 ; Rousseau: # Changed this from .386 to .286
    546                 ; ------------------------------------------
    547                 ; Because of the TASM-bug the processor had to be changed to turn JUMPS
    548                 ; off. Existing movzx instructions were replaced with 286 equivalent code.
    549                 ; Out of range relative jumps have been recoded.
    550                 ; TASM still generates an extra NOP after test [mem],1
    551                 ; instructions.
    552                 ; JWasm produces tighter code.
    553                 ; JWasm:
    554                 ; With segment overrides, the address is expanded to the bit-width.
    555                 ; So, .386 will generate a 32-bit address, even in a USE16 segment.
    556                 .286
    557 
    558                 ; This influences the uses directive and other stuff,
    559                 ; like calling-style and local variables.
    560                 ; The model itself,large, has no effect because we generate
    561                 ; a binairy image and not a segmented executable.
    562 
    563                 ; Tasm needs a memory model for USES on PROC to work.
    564                 IFDEF   TASM
    565                 ;.model large, basic
    566                 .model  tiny,c
    567                 ENDIF
     265; ------------------------------------------
     266; Rousseau: # Changed this from .386 to .286
     267; ------------------------------------------
     268; Because of the TASM-bug the processor had to be changed to turn JUMPS
     269; off. Existing movzx instructions were replaced with 286 equivalent code.
     270; Out of range relative jumps have been recoded.
     271; TASM still generates an extra NOP after test [mem],1
     272; instructions.
     273; JWasm produces tighter code.
     274; JWasm:
     275; With segment overrides, the address is expanded to the bit-width.
     276; So, .386 will generate a 32-bit address, even in a USE16 segment.
     277.286
     278
     279; This influences the uses directive and other stuff,
     280; like calling-style and local variables.
     281; The model itself,large, has no effect because we generate
     282; a binairy image and not a segmented executable.
     283
     284; Tasm needs a memory model for USES on PROC to work.
     285IFDEF   TASM
     286    ;.model large, basic
     287    .model  tiny,c
     288ENDIF
    568289
    569290;
     
    580301; time.
    581302;
    582 SEGMENTED   EQU 1
     303SEGMENTED   EQU
    583304
    584305IFDEF   SEGMENTED
    585             AIRBOOT     GROUP   IMAGE,VOLATILE
     306    AIRBOOT     GROUP   LDRIMAGE,VOLATILE
    586307ENDIF
    587308
    588309; Our code-segment starts here.
    589 IMAGE       SEGMENT     USE16   PUBLIC  'MIXED'
     310LDRIMAGE    SEGMENT     USE16   PUBLIC  'MIXED'
    590311
    591312IFDEF   SEGMENTED
    592             ASSUME      CS:AIRBOOT, DS:AIRBOOT, ES:nothing, SS:nothing
     313    ASSUME  CS:AIRBOOT, DS:AIRBOOT, ES:nothing, SS:nothing
    593314ELSE
    594             ASSUME      CS:IMAGE,   DS:IMAGE,   ES:nothing, SS:nothing
     315    ASSUME  CS:LDRIMAGE,DS:LDRIMAGE,ES:nothing, SS:nothing
    595316ENDIF
    596 
    597317
    598318;==============================================================================
     
    638358
    639359                ; ID String, Date (DD,MM,CC,YY), Version Number, Language ID
    640                 db      'AiRBOOT', 16h, 02h, 20h, 12h, 01h, 08h, TXT_LanguageID
     360                db      'AiRBOOT', 20h, 02h, 20h, 12h, 01h, 08h, TXT_LanguageID
    641361
    642362                ; Total Sectors Count.
     
    709429
    710430
    711 
    712431; Comport settings
    713432; It had to be moved to create room for the double I13X
    714433; signature.
    715434; It cannot be in the config-area (sector 55)
    716 ; because that area
    717 ; is crc-protected.
    718 BIOS_AuxParms   dw      BIOS_AuxParmsDefault
    719 
    720 ;
    721 ; Reserved space
    722 ; Should check overflow here, later...
    723 ;
     435; because that area is crc-protected and would not allow 'poking'.
     436here = $
     437                org     0003Ch
     438                check_overlap   here
     439BIOS_AuxParms   dw      BIOS_AUXPARMS_DEFAULT
     440
    724441reserved        db      6   dup('X')
    725 
    726442
    727443                ;
     
    733449                ; want to change the AiR-BOOT signature
    734450                ; because of Microsoft inventions...
    735 
    736 
    737 
    738 
    739 
    740451here = $
    741452                org     044h
     
    832543                mov     ds, ax          ; Set DS==ES to Code Segment
    833544
     545
    834546            ; If we are in debug-mode, all code is moved already,
    835547            ; so we can directly jump to it.
     
    966678                dw      '$$'
    967679
     680
     681here = $
     682                org     001beh
     683                check_overlap   here
    968684
    969685                ; Partition Table
     
    1057773
    1058774
    1059 
    1060 
    1061 
    1062 
    1063 
    1064 
    1065 
    1066 
    1067 
    1068 
    1069 
    1070 
    1071 
    1072775                ; ##############################################
    1073776                ; ## ENTRY-POINT AFTER ALL THE INITIAL HASSLE ##
    1074777                ; ##############################################
     778
    1075779
    1076780
     
    1107811
    1108812
     813                mov     ax, offset sobss
     814                mov     ax,offset BeginOfVariables
     815                mov     ax,offset [TrueSecs]
     816                lea     ax, [TrueSecs]
     817                mov     ax,word ptr [TrueSecs]
     818                mov     ax,offset EndOfVariables
     819                mov     ax, offset eobss
     820                nop
     821                ;~ mov     ax, offset qqqq
     822
    1109823
    1110824                ;jmp skip
     
    1267981
    1268982
    1269 skip:
     983    skip:
    1270984
    1271985
     
    14411155size_driveio = $-b_driveio
    14421156
     1157b_lvm:
     1158Include SPECIAL/LVM.ASM         ; LVM-specific code
     1159size_lvm = $-b_lvm
     1160
    14431161b_videoio:
    14441162Include REGULAR/VIDEOIO.ASM     ; Video I/O
     
    14691187size_other = $-b_other
    14701188
    1471 ; Rousseau: Special modules moved upwards.
    14721189b_main:
    14731190Include SETUP/MAIN.ASM          ; The whole AiR-BOOT SETUP
    14741191size_main = $-b_main
     1192
    14751193
    14761194
     
    14811199ENDIF
    14821200
     1201
    14831202b_math:
    14841203Include REGULAR/MATH.ASM        ; Math functions (like 32-bit multiply)
     
    14871206
    14881207
    1489 IFDEF AuxDebug
     1208
     1209; Various debugging routines, uses AUXIO and CONV
     1210IFDEF AUX_DEBUG
    14901211b_debug:
    1491 ;   Include REGULAR/DEBUG.ASM     ; Various debugging routines,
    1492                                 ; uses AUXIO and CONV
     1212Include REGULAR/DEBUG.ASM
    14931213size_debug = $-b_debug
     1214b_auxio:
     1215Include REGULAR/AUXIO.ASM       ; Com-port support for debugging
     1216size_auxio = $-b_auxio
    14941217ENDIF
    1495 
    1496 b_auxio:
    1497 ;Include REGULAR/AUXIO.ASM       ; Com-port support for debugging
    1498 size_auxio = $-b_auxio
    1499 
    1500 ; Rousseau: moved upwards
    1501 ;IFDEF TXT_IncludeCyrillic
    1502 ;   Include SPECIAL/CHARSET.ASM  ; Charset Support (e.g. Cyrillic)
    1503 ;ENDIF
    1504 
    1505 b_lvm:
    1506 Include SPECIAL/LVM.ASM         ; LVM-specific code
    1507 size_lvm = $-b_lvm
    15081218
    15091219
     
    16031313
    16041314
    1605 
    1606 CODE_END:
    1607 
    1608                 ;org     06A00h - 4
     1315                ;
     1316                ; End of code marker.
     1317                ;
    16091318                db      'BABE'
    1610 
    1611                 ;org     06A00h
    16121319                db      'FACE'
    16131320
     1321code_end:
     1322
     1323
     1324
     1325here = $
     1326                org     06800h
     1327                ; For some reason, this overlap check does not work !!
     1328                ; I gues it's because 'here' has no definitive value yet
     1329                ; and since JWasm is a single pass assembler, it won't
     1330                ; change anymore. it is off by 1dh bytes.
     1331                ; (Changing the ORG to 6700h produces an overlap of 11dh.
     1332                ; This 1dh is by sheer coincidence the same length as the
     1333                ; MBR_Prot signature on my system, but it's not related.
     1334                check_overlap   here
     1335
    16141336                ;
    16151337                ; This is the AiR-BOOT MBR-Protection Image.
    1616                 ; 04600 / 200h = 34h = 52d sectors are before this point.
     1338                ; 06800 / 200h = 34h = 52d sectors are before this point.
    16171339                ; The stuff generated here gets overwritten when the MBR_PROT.ASM
    16181340                ; module, which is assembled separately, gets merged.
    16191341                ; So you won't find the string below in the generated binary.
    16201342                ;
    1621 here = $
    1622                 org     06800h
    1623                 check_overlap   here
    1624 
     1343; Hardcoded to 1k (1024 bytes) (MBR_PROT.ASM)
    16251344MBR_Protection  db 'AiR-BOOT MBR-Protection Image'
    1626 ; Hardcoded to 1k (1024 bytes)
    1627                 db  1024-($-MBR_Protection)  dup(0)
    1628 
    1629 
    1630 ;CODE_SEG        ENDS
    1631 
     1345
     1346                ; Just fill.
     1347                db  1024-($-MBR_Protection)  dup('M')
     1348
     1349;LDRIMAGE        ENDS
    16321350;DATA_SEG        SEGMENT     USE16   PUBLIC  'CODE'
     1351
     1352
     1353
     1354;~ MYDATA  SEGMENT     COMMON    'MIXED'
     1355;~ qqqq     dw  'QQ'
     1356;~ MYDATA  ENDS
    16331357
    16341358;==============================================================================
     
    19791703;
    19801704
    1981 IMAGE           ENDS
    1982 
    1983 ;DATA_SEG        ENDS
     1705LDRIMAGE    ENDS
     1706
     1707;DATA_SEG    ENDS
    19841708
    19851709;
     
    20001724                            ;
    20011725                            org 02400h                         ; Uninitialized
    2002 
     1726                            ;~ org 00200h                         ; 200h geeft 3 floppies !
    20031727
    20041728; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
     
    20101734
    20111735; Everything used to build a new IPT and reference it to the old one
     1736; IETS OVERSCHRIJFT DIT !!
    20121737NewPartTable                db  1536 dup (?)                    ; New Partition Table
     1738
    20131739NewHidePartTable            db  partition_count * LocHPT_LenOfHPT dup (?)    ; New Hide-Partition Table
    20141740NewDriveLetters             db  partition_count dup (?)         ; Logical Drive-Letters
     
    21671893VOLATILE    ENDS
    21681894ELSE
    2169 IMAGE       ENDS
     1895LDRIMAGE    ENDS
    21701896ENDIF
     1897
    21711898            END     AIR_BOOT
    21721899
    2173 
    2174 
Note: See TracChangeset for help on using the changeset viewer.