| 1 | ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
|
|---|
| 2 | ;
|
|---|
| 3 | ; This file is part of AiR-BOOT
|
|---|
| 4 | ;
|
|---|
| 5 | ; AiR-BOOT is free software: you can redistribute it and/or modify it under
|
|---|
| 6 | ; the terms of the GNU General Public License as published by the Free
|
|---|
| 7 | ; Software Foundation, either version 3 of the License, or (at your option)
|
|---|
| 8 | ; any later version.
|
|---|
| 9 | ;
|
|---|
| 10 | ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
|
|---|
| 11 | ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
|
|---|
| 12 | ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|---|
| 13 | ; details.
|
|---|
| 14 | ;
|
|---|
| 15 | ; You should have received a copy of the GNU General Public License along with
|
|---|
| 16 | ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 17 | ;
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | ;IFDEF JWASM
|
|---|
| 21 | ; db 'JWASM'
|
|---|
| 22 | ;ENDIF
|
|---|
| 23 | ;IFDEF TASM
|
|---|
| 24 | ; db 'TASM'
|
|---|
| 25 | ;ENDIF
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | ;IF DEBUG_LEVEL EQ 0
|
|---|
| 30 | ; db 'L0'
|
|---|
| 31 | ;ELSE
|
|---|
| 32 | ; db 'Lx'
|
|---|
| 33 | ;ENDIF
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | ; ---------------------------------
|
|---|
| 37 | ; Rousseau: Fixes and Enhancements
|
|---|
| 38 | ; ---------------------------------
|
|---|
| 39 | ;
|
|---|
| 40 | ; v1.0.8-rc2-bld20120213
|
|---|
| 41 | ;-----------------------
|
|---|
| 42 | ; # Removed requirement for LVM P and V name to be the same to edit #
|
|---|
| 43 | ; However, when both are the same before the edit, the V name will be
|
|---|
| 44 | ; synved to the P name to have them both the same again after the edit.
|
|---|
| 45 | ; If they differ, only the V name is updated.
|
|---|
| 46 | ;
|
|---|
| 47 | ; # Trying to edit the label of a type 0x35 partition now shows a popup #
|
|---|
| 48 | ; The user is informed that type 0x35 labels cannot be edited.
|
|---|
| 49 | ;
|
|---|
| 50 | ; # Type 0x35 partitions cannot be added to the AB-menu anymore #
|
|---|
| 51 | ; They are not bootable anyway. The user is informed by a popup.
|
|---|
| 52 | ;
|
|---|
| 53 | ; # De-tasemized the Assembler sources for JWasm compatibility #
|
|---|
| 54 | ; AiR-BOOT can now be built using JWasm, which is now the preferred
|
|---|
| 55 | ; assembler.
|
|---|
| 56 | ;
|
|---|
| 57 | ; # Completely reworked the build-system #
|
|---|
| 58 | ; Everything is now done with Makefiles using WMake, Wlink and the
|
|---|
| 59 | ; C/C++ Compilers from the Open Watcom development tools together with JWasm.
|
|---|
| 60 | ; This obsoletes tasm, tlink and exe2bin.
|
|---|
| 61 | ;
|
|---|
| 62 | ; # Cross-Platform support #
|
|---|
| 63 | ; AiR-BOOT and it's helpers can now be built on: DOS, Win32, OS/2 and Linux.
|
|---|
| 64 | ;
|
|---|
| 65 | ; # Rewrote FIXCODE.ASM in C so the tool-chain is not dependent on a DOS .COM
|
|---|
| 66 | ; program for embedding the MBR-protection. DOS,Win32,OS/2 and Linux
|
|---|
| 67 | ; versions of FIXCODE are now used. (EXE[MZ|PE|LX] and ELF)
|
|---|
| 68 | ;
|
|---|
| 69 | ; v1.0.8-rc1-bld20120124
|
|---|
| 70 | ; ----------------------
|
|---|
| 71 | ; # Changed version format to be more WarpIN compatible #
|
|---|
| 72 | ; This is a cosmetic change only, the internal format has not changed.
|
|---|
| 73 | ;
|
|---|
| 74 | ; # Show LVM VolumeName instead of LVM PartitionName #
|
|---|
| 75 | ; Previous versions of AiR-BOOT used the LVM PartitionName as the Label
|
|---|
| 76 | ; if LVM-info was present for the partition.
|
|---|
| 77 | ; This is inconsistent with MiniLVM which shows the LVM VolumeName.
|
|---|
| 78 | ; Starting with v1.0.8 the LVM VolumeName is displayed.
|
|---|
| 79 | ;
|
|---|
| 80 | ; # LVM Partition and Volume name Synchronization #
|
|---|
| 81 | ; Changing the Label of a partition with LVM-info now synchronizes
|
|---|
| 82 | ; the LVM Partition Name with the LVM Volume Name.
|
|---|
| 83 | ; This is the same behavior as MiniLVM.
|
|---|
| 84 | ; Note however that the Label can only be changed when both the
|
|---|
| 85 | ; LVM PartitionName and LVM VolumeName are the same.
|
|---|
| 86 | ; See protected editing below.
|
|---|
| 87 | ;
|
|---|
| 88 | ; # Protected editing of the Label when LVM-info is present #
|
|---|
| 89 | ; When the LVM VolumeName differs from the LVM PartitionName, the user can
|
|---|
| 90 | ; edit the label but it will not be saved to the LVM record on disk.
|
|---|
| 91 | ; This is to protect configurations created with the classic LVM tool.
|
|---|
| 92 | ; Since MiniLVM assigns the same name to both the Partition and the Volume,
|
|---|
| 93 | ; the Label can be edited and will be saved for such partitions.
|
|---|
| 94 | ; To further protect a given configuration, LVM volumes with type 0x35
|
|---|
| 95 | ; cannot be edited at all. This is to ensure that the LVM PartitionNames
|
|---|
| 96 | ; remain unique when Spanning Volumes are used.
|
|---|
| 97 | ;
|
|---|
| 98 | ; # Editing the Label appended spaces #
|
|---|
| 99 | ; When editing and changing the Label of a System using SETUP,
|
|---|
| 100 | ; trailing spaces were stored in the LVM Volume and Partition names.
|
|---|
| 101 | ; These labels need to be padded with zero's.
|
|---|
| 102 | ; This has been fixed.
|
|---|
| 103 | ; This bug is also present in v1.06.
|
|---|
| 104 | ;
|
|---|
| 105 | ; # Reworked Primary Partition <-> LVM-info association #
|
|---|
| 106 | ; The previous way was to use a 1:1 correspondence between the PT-index
|
|---|
| 107 | ; and the LVM-index. However, when the PT is cross-linked, lower entries
|
|---|
| 108 | ; pointing to higher locations on the disk, or vice-versa, incorrect
|
|---|
| 109 | ; LVM-info was associated. Such a cross-linked PT is sometimes generated
|
|---|
| 110 | ; by the LVM engine when creating or deleting multiple partitions at once.
|
|---|
| 111 | ; Best is to intermediately save after creating or deleting a partition
|
|---|
| 112 | ; with (Mini)LVM.
|
|---|
| 113 | ; The new way is to search the LVM-entries for the partition requested.
|
|---|
| 114 | ;
|
|---|
| 115 | ; # Reworked MBR-code to provide two I13X signatures #
|
|---|
| 116 | ; The normal LVM MBR-code uses a special setup to indicate Int13X capability.
|
|---|
| 117 | ; It contains the instruction, MOV EAX,'X31I', and some software checks
|
|---|
| 118 | ; for the presence of the 'I13X' string in the MBR.
|
|---|
| 119 | ; However, the location of this instruction differs between eCS 1.x and
|
|---|
| 120 | ; eCS 2.x LVM MBR-code.
|
|---|
| 121 | ; For compatibility, the v1.0.8 MBR has the 'I13X' string at both locations.
|
|---|
| 122 | ;
|
|---|
| 123 | ; # Fixed booting older eCS installations on HPFS #
|
|---|
| 124 | ; When restoring systems from archive or otherwise generated systems,
|
|---|
| 125 | ; the HPFS BPB sometimes lacked information that AiR-BOOT did not fill in.
|
|---|
| 126 | ; The result was that a wrong partition was booted or that booting
|
|---|
| 127 | ; stalled with the "unable to operate harddisk" message.
|
|---|
| 128 | ; This has been fixed.
|
|---|
| 129 | ;
|
|---|
| 130 | ; # Fixed booting Windows from a logical partition with loader on FAT32 #
|
|---|
| 131 | ; Depending on the configuration, sometimes the NTLDR could not be found.
|
|---|
| 132 | ; This has been fixed.
|
|---|
| 133 | ;
|
|---|
| 134 | ; # Fixed drive-letter feature which was broken in v1.07 #
|
|---|
| 135 | ; a) v1.07 did remember the drive-letter feature was active for a partition,
|
|---|
| 136 | ; but it failed to store the drive-letter because too few configuration
|
|---|
| 137 | ; sectors were saved. This resulted in arbitrary values to be assigned
|
|---|
| 138 | ; to the drive-letter for the partition.
|
|---|
| 139 | ; b) The JFS PBR-code does not use the in-memory BPB but uses the one
|
|---|
| 140 | ; that is on disk. This prevented AiR-BOOT from passing the user assigned
|
|---|
| 141 | ; drive-letter. AiR-BOOT now inserts the drive-letter in the BPB on disk,
|
|---|
| 142 | ; but only if the partition is JFS.
|
|---|
| 143 | ; AB v1.06 is also unable to use the drive-letter feature on JFS.
|
|---|
| 144 | ; As a convenience, a drive-letter in the dl-feature pop-up can now be set
|
|---|
| 145 | ; to "Disabled" by pressing backspace.
|
|---|
| 146 | ; (As opposed to arrowing up/down to get to the "Disabled" entry)
|
|---|
| 147 | ;
|
|---|
| 148 | ; # Fixed stuck phase1 indicator when wrong name entered #
|
|---|
| 149 | ; When using SET(A)BOOT /4:NAME with the MEMDRIVE env-var set,
|
|---|
| 150 | ; and NAME being a non-existing partition, the phase1 indicator
|
|---|
| 151 | ; would stay stuck between reboots.
|
|---|
| 152 | ; This has been fixed.
|
|---|
| 153 | ;
|
|---|
| 154 | ; # Fixed DOS installer (AIRBOOT.COM) #
|
|---|
| 155 | ; Behavior should now be the same as the eCS and WIN installers.
|
|---|
| 156 | ; This re-enables the use of a bootable floppy or usb-stick
|
|---|
| 157 | ; to install AiR-BOOT.
|
|---|
| 158 | ;
|
|---|
| 159 | ; # Fixed booting from FloppyDrive #
|
|---|
| 160 | ; This is actually also broken in v1.06 when Int13X is forced on.
|
|---|
| 161 | ; Now regular BIOS calls are used when booting from floppydrive.
|
|---|
| 162 | ; A fresh AiR-BOOT installation now includes the floppydrive menu entry.
|
|---|
| 163 | ;
|
|---|
| 164 | ; # Fixed chainloading IBM Boot Manager #
|
|---|
| 165 | ; AiR-BOOT v1.06 could chainload IBM-BM but only when it resided on
|
|---|
| 166 | ; the first disk and was located below the 1024 cylinder and forced Int13X
|
|---|
| 167 | ; extensions were disabled.
|
|---|
| 168 | ; AiR-BOOT v1.0.8 can now chainload IBM-BM with forced Int13X extensions
|
|---|
| 169 | ; enabled (the default) and if IBM-BM resides above the 1024 cylinder limit.
|
|---|
| 170 | ; Also, chainloading IBM-BM from the second disk is supported.
|
|---|
| 171 | ; Do not use chainloading IBM-BM unless you really have a need to.
|
|---|
| 172 | ; See the AiR-BOOT Manual for "gotcha's" when using both AiR-BOOT and IBM-BM.
|
|---|
| 173 | ;
|
|---|
| 174 | ; # Corrected contact links #
|
|---|
| 175 | ; Version 1.07 still presented the old contact links to the sourceforge
|
|---|
| 176 | ; repository and the original author.
|
|---|
| 177 | ; This caused confusion with regard to issues with v1.07.
|
|---|
| 178 | ; This has been corrected.
|
|---|
| 179 | ;
|
|---|
| 180 | ; NOTE:
|
|---|
| 181 | ; AB v1.07 had a bug with saving and loading the correct size of the
|
|---|
| 182 | ; configuration. This broke the drive-letter feature.
|
|---|
| 183 | ; As a result, the CRC over the config was also calculated wrongly.
|
|---|
| 184 | ; While AB v1.0.8 fixes this, it has to use the v1.07 way of CRC calculation.
|
|---|
| 185 | ; Otherwise SET(A)BOOT from the eCS v2.1 would break on AB v1.0.8 because it
|
|---|
| 186 | ; sees a corrupt AiR-BOOT configuration.
|
|---|
| 187 | ; This means that the CRC over the AB config is calculated over 5 sectors
|
|---|
| 188 | ; instead of 7, just like in v1.07.
|
|---|
| 189 | ;
|
|---|
| 190 | ; NOTE:
|
|---|
| 191 | ; Because of space constraints most of the debug code has been commented
|
|---|
| 192 | ; out in this version.
|
|---|
| 193 | ; Possibly it will be re-enabled after code cleanup and changing to JWasm.
|
|---|
| 194 | ;
|
|---|
| 195 | ;
|
|---|
| 196 | ; v1.07
|
|---|
| 197 | ; -----
|
|---|
| 198 | ; # Huge Drives and LVM #
|
|---|
| 199 | ; When using disks >512GB under eComStation, the drive geometry changes to
|
|---|
| 200 | ; 127 or 255 sectors per track. Since LVM-info is written at the last sector
|
|---|
| 201 | ; of a track, and AiR-BOOT uses the geometry of the MBR, it cannot find the
|
|---|
| 202 | ; LVM-info and the eCS partition / volume bootsector.
|
|---|
| 203 | ; This has been fixed.
|
|---|
| 204 | ; Now, when an eCS-partition is discovered and the drive is >512GB, AiR-BOOT
|
|---|
| 205 | ; will use the eCS geometry to locate the LVM-info and the bootsector.
|
|---|
| 206 | ;
|
|---|
| 207 | ; # Special loader handling #
|
|---|
| 208 | ; The special handling of partition boot-loaders has been enhanced to
|
|---|
| 209 | ; enable booting of legacy systems on huge drives with or without OS/2
|
|---|
| 210 | ; extended geometry.
|
|---|
| 211 | ;
|
|---|
| 212 | ; # eComStation boot-through after phase 1 #
|
|---|
| 213 | ; Special functionality is implemented to directly boot a newly
|
|---|
| 214 | ; installed eCS system after completing phase 1 of the installation.
|
|---|
| 215 | ; This works in conjuntion with the OS/2 specific SET(A)BOOT.EXE program,
|
|---|
| 216 | ; also part of the AiR-BOOT package.
|
|---|
| 217 | ;
|
|---|
| 218 | ; # Math, Debug, Conv and Aux modules #
|
|---|
| 219 | ; These are used for 32-bit arithmatic on 16-bit code,
|
|---|
| 220 | ; debug the booting process, converting between data-types
|
|---|
| 221 | ; and outputting log-data to the com-port.
|
|---|
| 222 | ;
|
|---|
| 223 | ;
|
|---|
| 224 | ; v1.06
|
|---|
| 225 | ; -----
|
|---|
| 226 | ; This is the last version developed by Martin Kiewitz.
|
|---|
| 227 | ; It serves as the base for the versions above.
|
|---|
| 228 | ; Please do not post your feedback on sourceforge or bother Martin with
|
|---|
| 229 | ; regard to issues with the above versions.
|
|---|
| 230 | ; Use the eCS bug-tracker or the Trac project-page at netlabs and see the
|
|---|
| 231 | ; documentation of this newer versions for the relevant contact information.
|
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 | ;------------------------------------------------------------------------------
|
|---|
| 235 | ; AiR-BOOT / MAIN-CODE
|
|---|
| 236 | ;------------------------------------------------------------------------------
|
|---|
| 237 | ;
|
|---|
| 238 |
|
|---|
| 239 |
|
|---|
| 240 | ; -------------------------
|
|---|
| 241 | ; Rousseau: JUMPS disabled
|
|---|
| 242 | ; -------------------------
|
|---|
| 243 | ; We actually don't want to use this directive because it generates extra
|
|---|
| 244 | ; NOP instructions that we can do without.
|
|---|
| 245 | ; Relative conditional jumps that are out-of-range are manually reworked by
|
|---|
| 246 | ; skipping an unconditional jump to the target on base of complementary
|
|---|
| 247 | ; condition logic and temporary labels.
|
|---|
| 248 | ; TASM also has a bug in that when the .ERR2 directive is used when
|
|---|
| 249 | ; the .386 directive is in effect, the JUMPS directive is also active
|
|---|
| 250 | ; and cannot be turned off.
|
|---|
| 251 | ; NOJUMPS seems to have no effect in this situation.
|
|---|
| 252 | ; In this case 4 NOP instructions are generated after forward referencing jump
|
|---|
| 253 | ; instructions, to allow for automatic recoding by TASM.
|
|---|
| 254 | ; This seems to be a TASM bug. (v2,v3,v4, dunno v5)
|
|---|
| 255 | ;
|
|---|
| 256 | ;JUMPS
|
|---|
| 257 | ;
|
|---|
| 258 |
|
|---|
| 259 | ;
|
|---|
| 260 | ; If defined then each module is prefixed with it's name.
|
|---|
| 261 | ; This is used for debugging purposes.
|
|---|
| 262 | ; It should be off in release code.
|
|---|
| 263 | ;
|
|---|
| 264 | ;ModuleNames equ 1
|
|---|
| 265 |
|
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 | ;
|
|---|
| 271 | ; An ORG directive resets the location counter where code and data is
|
|---|
| 272 | ; generated. If the location counter is reset back to a point where
|
|---|
| 273 | ; code or data already has been generated, this will be overwritten
|
|---|
| 274 | ; without warning.
|
|---|
| 275 | ; This macro is run at every ORG directive to check for this condition,
|
|---|
| 276 | ; and when it occurs further assembly is terminated.
|
|---|
| 277 | ; FIXME: Get JWasm and Tasm use some common ECHO/%OUT method.
|
|---|
| 278 | ; (Tasm only pases first word of non-quoted string to a macro)
|
|---|
| 279 | ;
|
|---|
| 280 | check_overlap MACRO loc
|
|---|
| 281 |
|
|---|
| 282 | ; Exit macro immediately if no overlap.
|
|---|
| 283 | ; We don't want to assign values to z_last_... if there is no
|
|---|
| 284 | ; overlap because they would then hold the values the last time this
|
|---|
| 285 | ; macro was called and not those of the last overlap.
|
|---|
| 286 | IF (loc - $) LE 0
|
|---|
| 287 | EXITM
|
|---|
| 288 | ENDIF
|
|---|
| 289 |
|
|---|
| 290 | ; Calculate the overlap.
|
|---|
| 291 | z_last_overlap_location = loc
|
|---|
| 292 | z_last_overlap_size = (loc - $)
|
|---|
| 293 |
|
|---|
| 294 | IFDEF JWASM
|
|---|
| 295 | ; Output message.
|
|---|
| 296 | ECHO
|
|---|
| 297 | ECHO ** ERROR: LOCATION OVERLAP DETECTED [JWASM] ! **
|
|---|
| 298 | ECHO . THIS IS MOST LIKELY CAUSED BY CODE / DATA
|
|---|
| 299 | ECHO . EXPANSION TOWARDS AN 'ORG' DIRECTIVE.
|
|---|
| 300 | ECHO . LOOK AT 'z_last_overlap_location' TO SEE WHERE.
|
|---|
| 301 | ECHO . LOOK AT 'z_last_overlap_size' TO SEE SIZE.
|
|---|
| 302 | ECHO . FORCING ERROR...
|
|---|
| 303 | ECHO
|
|---|
| 304 | ENDIF
|
|---|
| 305 | IFDEF TASM
|
|---|
| 306 | IF2
|
|---|
| 307 | ; Output message (only on pass2).
|
|---|
| 308 | %OUT
|
|---|
| 309 | %OUT ** ERROR: LOCATION OVERLAP DETECTED [TASM] ! **
|
|---|
| 310 | %OUT . THIS IS MOST LIKELY CAUSED BY CODE / DATA
|
|---|
| 311 | %OUT . EXPANSION TOWARDS AN 'ORG' DIRECTIVE.
|
|---|
| 312 | %OUT . LOOK AT 'z_last_overlap_location' TO WHERE.
|
|---|
| 313 | %OUT . LOOK AT 'z_last_overlap_size' TO SEE SIZE.
|
|---|
| 314 | %OUT . FORCING ERROR...
|
|---|
| 315 | %OUT
|
|---|
| 316 | ENDIF
|
|---|
| 317 | ENDIF
|
|---|
| 318 |
|
|---|
| 319 | ; Terminate assembly by forcing an error.
|
|---|
| 320 | .ERR
|
|---|
| 321 |
|
|---|
| 322 | ENDM
|
|---|
| 323 |
|
|---|
| 324 |
|
|---|
| 325 |
|
|---|
| 326 |
|
|---|
| 327 | ;
|
|---|
| 328 | ; The first harddisk is BIOS coded 80h.
|
|---|
| 329 | ; This makes a total of 128 disk could be supported using this coding.
|
|---|
| 330 | ; This value is used to store disk-information and this info is allocated
|
|---|
| 331 | ; in the BSS.
|
|---|
| 332 | ;
|
|---|
| 333 | MaxDisks equ 64
|
|---|
| 334 |
|
|---|
| 335 | ;
|
|---|
| 336 | ; If defined then include DEBUG.ASM and output debug-info to serial-port.
|
|---|
| 337 | ;
|
|---|
| 338 | ;AuxDebug equ 1
|
|---|
| 339 |
|
|---|
| 340 | ; Com-port for debugging, 0 is disabled
|
|---|
| 341 | BiosComPort equ 0
|
|---|
| 342 |
|
|---|
| 343 |
|
|---|
| 344 | ;
|
|---|
| 345 | ; bits 7-5 = datarate
|
|---|
| 346 | ; (000=110,001=150,010=300,011=600,100=1200,101=2400,110=4800,111=9600 bps)
|
|---|
| 347 | ; bits 4-3 = parity
|
|---|
| 348 | ; (00 or 10 = none, 01 = odd, 11 = even)
|
|---|
| 349 | ; bit 2 = stop-bits
|
|---|
| 350 | ; (set = 2 stop-bits, clear = 1 stop-bit)
|
|---|
| 351 | ; bits 1-0 = data-bits
|
|---|
| 352 | ; (00 = 5, 01 = 6, 10 = 7, 11 = 8)
|
|---|
| 353 | ;
|
|---|
| 354 |
|
|---|
| 355 | ; 9600 bps, no parity, 1 stop-bit, 8 bits per char
|
|---|
| 356 | AuxInitParms equ 11100011b
|
|---|
| 357 |
|
|---|
| 358 | ; Default word value for BIOS_AuxParms variable
|
|---|
| 359 | ; Note that is has moved since v1.07
|
|---|
| 360 | BIOS_AuxParmsDefault equ (AuxInitParms SHL 8) OR BiosComPort
|
|---|
| 361 |
|
|---|
| 362 | ;
|
|---|
| 363 | ; If ReleaseCode is not defined, it will produce debug-able code...
|
|---|
| 364 | ;
|
|---|
| 365 | ReleaseCode equ -1
|
|---|
| 366 |
|
|---|
| 367 |
|
|---|
| 368 |
|
|---|
| 369 |
|
|---|
| 370 |
|
|---|
| 371 | ;
|
|---|
| 372 | ; All Special Equ's for this project
|
|---|
| 373 | ;
|
|---|
| 374 |
|
|---|
| 375 | ; Use different addresses depending on whether in pre-boot
|
|---|
| 376 | ; or debug (dos) environment.
|
|---|
| 377 | IFDEF ReleaseCode
|
|---|
| 378 | StartBaseSeg equ 00000h ; Pre-boot, we are in low memory
|
|---|
| 379 | StartBasePtr equ 07C00h ; BIOS starts our MBR at 0:7C00
|
|---|
| 380 | ELSE
|
|---|
| 381 | ; Rousseau: where does this value come from ?
|
|---|
| 382 | ; Should be CS.
|
|---|
| 383 | ; Rectified in actual code by ignoring this value.
|
|---|
| 384 | StartBaseSeg equ 03A98h ; Adjust to DOS segment
|
|---|
| 385 | StartBasePtr equ 00100h ; We are a .COM file, DOS is active
|
|---|
| 386 | ENDIF
|
|---|
| 387 |
|
|---|
| 388 | ; Address labels after code-move
|
|---|
| 389 | BootBaseSeg equ 08000h ; Pre-boot, in the low 640K
|
|---|
| 390 | BootBasePtr equ 0h ; We put our MBR to this location
|
|---|
| 391 | BootBaseExec equ BootBasePtr+offset MBR_RealStart
|
|---|
| 392 | StackSeg equ 07000h ; Put the stack below the code
|
|---|
| 393 |
|
|---|
| 394 | ; Video pages, no INT 10h is used for menu-drawing etc.
|
|---|
| 395 | VideoIO_Page0 equ 0B800h
|
|---|
| 396 | VideoIO_Page1 equ 0B900h
|
|---|
| 397 | VideoIO_Page2 equ 0BA00h
|
|---|
| 398 | VideoIO_Page4 equ 0BC00h
|
|---|
| 399 | VideoIO_FXSegment equ 0A000h
|
|---|
| 400 |
|
|---|
| 401 | ; Include
|
|---|
| 402 | Include ../INCLUDE/ASM.INC
|
|---|
| 403 |
|
|---|
| 404 | ; Special line-drawing characters
|
|---|
| 405 | TextChar_WinLineRight equ 0C4h ; 'Ä'
|
|---|
| 406 | TextChar_WinLineDown equ 0B3h ; '³'
|
|---|
| 407 | TextChar_WinRep1 equ 0D1h ; 'Ñ'
|
|---|
| 408 | TextChar_WinRep2 equ 0C5h ; 'Å'
|
|---|
| 409 | TextChar_WinRep3 equ 0CFh ; 'Ï'
|
|---|
| 410 | TextChar_WinRep4 equ 0B5h ; 'µ'
|
|---|
| 411 | TextChar_WinRep5 equ 0C6h ; 'Æ'
|
|---|
| 412 | TextChar_WinRep6 equ 0D8h ; 'Ø'
|
|---|
| 413 |
|
|---|
| 414 | ; Offsets for Partition-Entries in MBR/EPRs
|
|---|
| 415 | LocBRPT_LenOfEntry equ 16 ; Length of a standard MBR or EPR entry
|
|---|
| 416 | LocBRPT_Flags equ 0 ; Bootable, Hidden, etc.
|
|---|
| 417 | LocBRPT_BeginCHS equ 1 ; Combined 10-bits cyl with 6 bits
|
|---|
| 418 | LocBRPT_BeginHead equ 1 ; Start head (0<=H<255) 255 is invalid !
|
|---|
| 419 | LocBRPT_BeginSector equ 2 ; Start sector (1<=S<=255)
|
|---|
| 420 | LocBRPT_BeginCylinder equ 3 ; Start cylinder (0<=C<[1024,16384,65536,n])
|
|---|
| 421 | LocBRPT_SystemID equ 4 ; Type of system using the partition
|
|---|
| 422 | LocBRPT_EndCHS equ 5 ; Same for end of partition
|
|---|
| 423 | LocBRPT_EndHead equ 5
|
|---|
| 424 | LocBRPT_EndSector equ 6
|
|---|
| 425 | LocBRPT_EndCylinder equ 7
|
|---|
| 426 | LocBRPT_RelativeBegin equ 8
|
|---|
| 427 | LocBRPT_AbsoluteLength equ 12
|
|---|
| 428 |
|
|---|
| 429 | LocBR_Magic equ 510
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 | ; Used as a quick compare in LVM.ASM
|
|---|
| 433 | LocLVM_SignatureByte0 equ 02h
|
|---|
| 434 |
|
|---|
| 435 | ; Offsets for LVM Information Sector.
|
|---|
| 436 | ; These are relative to the start of the LVM sector.
|
|---|
| 437 | LocLVM_SignatureStart equ 00h ; 02h,'RMBPMFD' (8 bytes)
|
|---|
| 438 | LocLVM_CRC equ 08h ; CRC is a DWORD
|
|---|
| 439 | LocLVM_Heads equ 1ch ; Number of heads
|
|---|
| 440 | LocLVM_Secs equ 20h ; Sectors per Track
|
|---|
| 441 | LocLVM_DiskName equ 24h ; Name of the disk
|
|---|
| 442 | LocLVM_StartOfEntries equ 3ch ; (contains maximum of 4 entries)
|
|---|
| 443 | LocLVM_LenOfEntry equ 3ch ; Length of an LVM-entry
|
|---|
| 444 |
|
|---|
| 445 | ; An LVM info-sector can contain information on max. 4 partitions.
|
|---|
| 446 | ; All 4 entries will be used when there 4 primary partitions defined.
|
|---|
| 447 | ; For logical partitions, the LVM info-sector is located below the start
|
|---|
| 448 | ; of the logical partition and only one LVM entry is used in that logical
|
|---|
| 449 | ; LVM info-sector.
|
|---|
| 450 | LocLVM_MaxEntries equ 4 ; Max entries in an LVM-sector
|
|---|
| 451 |
|
|---|
| 452 | ; Offsets for LVM entry.
|
|---|
| 453 | ; These are relative to the start of the entry.
|
|---|
| 454 | LocLVM_VolumeID equ 00h ; is DWORD
|
|---|
| 455 | LocLVM_PartitionID equ 04h ; is DWORD
|
|---|
| 456 | LocLVM_PartitionSize equ 08h ; is DWORD
|
|---|
| 457 | LocLVM_PartitionStart equ 0ch ; is DWORD
|
|---|
| 458 | LocLVM_OnBootMenu equ 10h ; is on IBM BM Bootmenu
|
|---|
| 459 | LocLVM_Startable equ 11h ; is Startable (newly installed system)
|
|---|
| 460 | LocLVM_VolumeLetter equ 12h ; is Drive Letter for partition (C-Z or 0)
|
|---|
| 461 | LocLVM_Unknown equ 13h ; unknown BYTE
|
|---|
| 462 |
|
|---|
| 463 | ; Truncated to 11 chars when displayed in menu.
|
|---|
| 464 | ; MiniLVM sets both to the same value.
|
|---|
| 465 | ; Also, MiniLVM uses a 0-byte terminator, so the maximum length is 19d.
|
|---|
| 466 | ; Same goes for LocLVM_DiskName.
|
|---|
| 467 | LocLVM_VolumeName equ 14h ; 20 bytes
|
|---|
| 468 | LocLVM_PartitionName equ 28h ; 20 bytes (Used in menu)
|
|---|
| 469 |
|
|---|
| 470 |
|
|---|
| 471 |
|
|---|
| 472 | ; Offsets for IPT (Internal Partition Table)
|
|---|
| 473 | LocIPT_MaxPartitions equ partition_count ; 45 in v1.07
|
|---|
| 474 | LocIPT_LenOfSizeElement equ 6 ; Size of one Size-Element
|
|---|
| 475 | LocIPT_LenOfIPT equ 34 ; Length of an IPT-entry
|
|---|
| 476 | LocIPT_Serial equ 0 ; Serial from MBR ?
|
|---|
| 477 | LocIPT_Name equ 4 ; Name from FS or LVM (part/vol)
|
|---|
| 478 | LocIPT_Drive equ 15 ; Drive-ID (80h,81h)
|
|---|
| 479 | LocIPT_SystemID equ 16 ; Partition-Type (06,07,etc)
|
|---|
| 480 | LocIPT_Flags equ 17 ; AiR-BOOT Flags for partition (see below)
|
|---|
| 481 | LocIPT_BootRecordCRC equ 18 ; CRC of Boot-Record
|
|---|
| 482 | LocIPT_LocationBegin equ 20 ; Begin of Partition
|
|---|
| 483 | LocIPT_LocationPartTable equ 23 ; PartitionTable of Partition
|
|---|
| 484 | LocIPT_AbsoluteBegin equ 26 ; Absolute Sector of Begin
|
|---|
| 485 | LocIPT_AbsolutePartTable equ 30 ; Absolute Sector of PartTable
|
|---|
| 486 |
|
|---|
| 487 | ; Hidden Partition Table
|
|---|
| 488 | LocHPT_LenOfHPT equ 30 ; Length of an HPT-entry
|
|---|
| 489 |
|
|---|
| 490 | ; AiR-BOOT IPT-Flags
|
|---|
| 491 | LocIPT_DefaultFlags equ 00000011b ; Don't know if boot-able :)
|
|---|
| 492 | LocIPT_DefaultNonBootFlags equ 00000010b ; ...VIBR Detection is always on
|
|---|
| 493 |
|
|---|
| 494 | Flags_Bootable equ 00000001b
|
|---|
| 495 | Flags_VIBR_Detection equ 00000010b
|
|---|
| 496 | Flags_HideFeature equ 00000100b
|
|---|
| 497 | Flags_DriveLetter equ 00001000b ; OS/2 FAT16/HPFS only
|
|---|
| 498 | Flags_ExtPartMShack equ 00010000b ; Extended Partition M$-Hack req ?
|
|---|
| 499 | Flags_NoPartName equ 01000000b
|
|---|
| 500 | Flags_NowFound equ 10000000b ; temp only in OldPartTable
|
|---|
| 501 | Flags_SpecialMarker equ 10000000b ; temp only for HiddenSetup
|
|---|
| 502 |
|
|---|
| 503 | FileSysFlags_BootAble equ 00000001b ; Is this Partition boot-able ?
|
|---|
| 504 | FileSysFlags_FAT32 equ 00010000b ; FAT 32 specific name getting
|
|---|
| 505 | FileSysFlags_NoName equ 00100000b ; No Name - use PartitionName
|
|---|
| 506 | FileSysFlags_DriveLetter equ 01000000b ; DriveLetter Feature possible
|
|---|
| 507 |
|
|---|
| 508 | ; Navigation keys
|
|---|
| 509 | Keys_Up equ 48h
|
|---|
| 510 | Keys_Down equ 50h
|
|---|
| 511 | Keys_Left equ 4Bh
|
|---|
| 512 | Keys_Right equ 4Dh
|
|---|
| 513 | Keys_PageUp equ 49h
|
|---|
| 514 | Keys_PageDown equ 51h
|
|---|
| 515 | Keys_GrayPlus equ 4Eh
|
|---|
| 516 | Keys_GrayMinus equ 4Ah
|
|---|
| 517 | Keys_Plus equ 1Bh
|
|---|
| 518 | Keys_Minus equ 35h
|
|---|
| 519 | Keys_ENTER equ 1Ch
|
|---|
| 520 | Keys_ESC equ 1h
|
|---|
| 521 | Keys_F1 equ 3Bh
|
|---|
| 522 | Keys_F10 equ 44h
|
|---|
| 523 | Keys_C equ 2Eh ; Add. Check auf Ctrl!
|
|---|
| 524 | Keys_Y equ 2Ch
|
|---|
| 525 | Keys_Z equ 15h
|
|---|
| 526 | Keys_N equ 31h
|
|---|
| 527 | Keys_TAB equ 0Fh
|
|---|
| 528 | Keys_Delete equ 53h
|
|---|
| 529 | Keys_Backspace equ 0Eh
|
|---|
| 530 | Keys_Space equ 20h
|
|---|
| 531 |
|
|---|
| 532 | Keys_Flags_EnterSetup equ 1100b ; Strg+Alt (AL)
|
|---|
| 533 |
|
|---|
| 534 |
|
|---|
| 535 | ; ------------------------------------------
|
|---|
| 536 | ; Rousseau: # Changed this from .386 to .286
|
|---|
| 537 | ; ------------------------------------------
|
|---|
| 538 | ; Because of the TASM-bug the processor had to be changed to turn JUMPS
|
|---|
| 539 | ; off. Existing movzx instructions were replaced with 286 equivalent code.
|
|---|
| 540 | ; Out of range relative jumps have been recoded.
|
|---|
| 541 | ; TASM still generates an extra NOP after test [mem],1
|
|---|
| 542 | ; instructions.
|
|---|
| 543 | ; JWasm produces tighter code.
|
|---|
| 544 | ; JWasm:
|
|---|
| 545 | ; With segment overrides, the address is expanded to the bit-width.
|
|---|
| 546 | ; So, .386 will generate a 32-bit address, even in a USE16 segment.
|
|---|
| 547 | .286
|
|---|
| 548 |
|
|---|
| 549 | ; This influences the uses directive and other stuff,
|
|---|
| 550 | ; like calling-style and local variables.
|
|---|
| 551 | ; The model itself,large, has no effect because we generate
|
|---|
| 552 | ; a binairy image and not a segmented executable.
|
|---|
| 553 |
|
|---|
| 554 | ; Tasm needs a memory model for USES on PROC to work.
|
|---|
| 555 | IFDEF TASM
|
|---|
| 556 | ;.model large, basic
|
|---|
| 557 | .model tiny,c
|
|---|
| 558 | ENDIF
|
|---|
| 559 |
|
|---|
| 560 | ;
|
|---|
| 561 | ; This is used to switch between the original 1-segment (code_seg) and the
|
|---|
| 562 | ; 2-segment (code_seg and bss_data).
|
|---|
| 563 | ; The 2-segment layout was needed for JWasm because it does not treat
|
|---|
| 564 | ; db ? in a code segment as bss-data, even if at the end of the code segment.
|
|---|
| 565 | ; Therefore, a true BSS segment is now used.
|
|---|
| 566 | ; Both the code_seg and the bss_data are grouped to the logical airboot
|
|---|
| 567 | ; segment.
|
|---|
| 568 | ; Note that this influences the offsets in the BSS in the list-file and
|
|---|
| 569 | ; the wdis disassembly file (.WDA).
|
|---|
| 570 | ; They are now segment-relative. The true offset is resolved at link
|
|---|
| 571 | ; time.
|
|---|
| 572 | ;
|
|---|
| 573 | ;SEGMENTED EQU 1
|
|---|
| 574 |
|
|---|
| 575 | IFDEF SEGMENTED
|
|---|
| 576 | AIRBOOT GROUP IMAGE,VOLATILE
|
|---|
| 577 | ENDIF
|
|---|
| 578 |
|
|---|
| 579 | ; Our code-segment starts here.
|
|---|
| 580 | IMAGE SEGMENT USE16 PUBLIC 'MIXED'
|
|---|
| 581 |
|
|---|
| 582 | IFDEF SEGMENTED
|
|---|
| 583 | ASSUME CS:AIRBOOT, DS:AIRBOOT, ES:nothing, SS:nothing
|
|---|
| 584 | ELSE
|
|---|
| 585 | ASSUME CS:IMAGE, DS:IMAGE, ES:nothing, SS:nothing
|
|---|
| 586 | ENDIF
|
|---|
| 587 |
|
|---|
| 588 |
|
|---|
| 589 | ;==============================================================================
|
|---|
| 590 | ; Sector 1
|
|---|
| 591 |
|
|---|
| 592 |
|
|---|
| 593 | ; We are not a .com file at 100h but a binary image
|
|---|
| 594 | ; of which only the 1st sector gets loaded at 07c00h.
|
|---|
| 595 | org 00000h ; Sector 1
|
|---|
| 596 |
|
|---|
| 597 | ; Start of sector 1
|
|---|
| 598 | ; This is the MBR, note the AiRBOOT signature, it's date (2006), version and
|
|---|
| 599 | ; language.
|
|---|
| 600 | ; Version 1.07 was intruduced in 2011.
|
|---|
| 601 | ; It fixes issues with huge drives and lvm and more.
|
|---|
| 602 |
|
|---|
| 603 | sos1:
|
|---|
| 604 |
|
|---|
| 605 | ; ---------------------------------------------
|
|---|
| 606 | ; Rousseau: # Combined letter and jump offset #
|
|---|
| 607 | ; ---------------------------------------------
|
|---|
| 608 | ; My guess is Martin had a short jump followed by the AiRBOOT signature at first.
|
|---|
| 609 | ; Then he encountered strange behaviour by some M$ operating-systems if the
|
|---|
| 610 | ; the first insruction was not a CLI.
|
|---|
| 611 | ; But there was no room to insert the CLI and of course he did not want to
|
|---|
| 612 | ; change the location of the AiRBOOT signature.
|
|---|
| 613 | ; He solved this by inserting the M$ needed CLI at offset 0 followed by a short
|
|---|
| 614 | ; jump that uses the 'A' of the AiRBOOT signature as the jump displacement.
|
|---|
| 615 |
|
|---|
| 616 |
|
|---|
| 617 | ;------------------------------------------------------------------------------
|
|---|
| 618 | AiR_BOOT:
|
|---|
| 619 |
|
|---|
| 620 | ; Some M$ operating systems need a CLI
|
|---|
| 621 | ; here otherwise they will go beserk
|
|---|
| 622 | ; and will do funny things during
|
|---|
| 623 | ; boot phase, it's laughable!
|
|---|
| 624 | cli
|
|---|
| 625 |
|
|---|
| 626 | ; JMP-Short -> MBR_Start
|
|---|
| 627 | ; Uses the 'A' from the signature as the displacement !
|
|---|
| 628 | db 0EBh
|
|---|
| 629 |
|
|---|
| 630 | ; ID String, Date (DD,MM,CC,YY), Version Number, Language ID
|
|---|
| 631 | db 'AiRBOOT', 15h, 02h, 20h, 12h, 01h, 08h, TXT_LanguageID
|
|---|
| 632 |
|
|---|
| 633 | ; Total Sectors Count.
|
|---|
| 634 | ; Will get overwritten by FIXCODE.
|
|---|
| 635 | db 1
|
|---|
| 636 |
|
|---|
| 637 | ; Total Sectors Count,
|
|---|
| 638 | ; Dynamic calculation.
|
|---|
| 639 | ;~ db (CODE_END-$)/512
|
|---|
| 640 |
|
|---|
| 641 |
|
|---|
| 642 | MBR_CheckCode dw 0 ; Check-Sum for Code
|
|---|
| 643 |
|
|---|
| 644 | ;
|
|---|
| 645 | ; No single instruction below should be changed, added or removed in the code
|
|---|
| 646 | ; below as this will cause the jump-link to go haywire.
|
|---|
| 647 | ;
|
|---|
| 648 | MBR_Start:
|
|---|
| 649 | sti ; This opcode is dedicated to:
|
|---|
| 650 | cld ; =MICROSOFT JUMP DEPARTMENT=
|
|---|
| 651 |
|
|---|
| 652 | ; Setup some base stuff
|
|---|
| 653 | ; AX got loaded wrongly for debug, changed the instructions
|
|---|
| 654 | ; without modifying the number of bytes.
|
|---|
| 655 | ; Don't comment-out the redundant instruction below because this
|
|---|
| 656 | ; *will* change the number of bytes and break the jump-chain.
|
|---|
| 657 | mov ax, StartBaseSeg ; The segment we are moving ourself from (NOT USED)
|
|---|
| 658 | ;mov ds, ax
|
|---|
| 659 | push cs
|
|---|
| 660 | pop ds
|
|---|
| 661 | mov si, StartBasePtr ; The offset we are moving ourself from
|
|---|
| 662 | mov ax, BootBaseSeg ; The target segment we are moving ourself to
|
|---|
| 663 | mov es, ax
|
|---|
| 664 | mov di, BootBasePtr ; The target offset we are moving ourself to
|
|---|
| 665 |
|
|---|
| 666 | ; Depending on pre-boot or debug,
|
|---|
| 667 | ; only move first 512 bytes or the whole she-bang++ (65400 bytes)
|
|---|
| 668 | IFDEF ReleaseCode
|
|---|
| 669 | mov cx, 256 ; Pre-boot environment
|
|---|
| 670 | ELSE
|
|---|
| 671 | mov cx, 32700 ; Debug environment (move ~64kB)
|
|---|
| 672 | ENDIF
|
|---|
| 673 |
|
|---|
| 674 | ;
|
|---|
| 675 | ; LET's MOVE OURSELVES !
|
|---|
| 676 | ;
|
|---|
| 677 | rep movsw
|
|---|
| 678 |
|
|---|
| 679 | ; Code an intersegment jump to the new location
|
|---|
| 680 | db 0EAh
|
|---|
| 681 | dw BootBaseExec ; This is MBR_RealStart + BootBasePtr
|
|---|
| 682 | dw BootBaseSeg ; This is 08000h
|
|---|
| 683 | ;jmp far ptr BootBaseSeg:BootBaseExec
|
|---|
| 684 |
|
|---|
| 685 |
|
|---|
| 686 | ;
|
|---|
| 687 | ; Some MBR-functions to provide absolute minimum functionality.
|
|---|
| 688 | ;
|
|---|
| 689 |
|
|---|
| 690 | ;
|
|---|
| 691 | ; Entry-point for halting the system.
|
|---|
| 692 | ;
|
|---|
| 693 | MBR_HaltSystem:
|
|---|
| 694 | mov ax, 8600h
|
|---|
| 695 | xor cx, cx
|
|---|
| 696 | mov dx, 500
|
|---|
| 697 | int 15h ; Wait to display the whole screen :]
|
|---|
| 698 | MBR_HaltSys: cli
|
|---|
| 699 | jmp MBR_HaltSys
|
|---|
| 700 |
|
|---|
| 701 |
|
|---|
| 702 |
|
|---|
| 703 | ; Comport settings
|
|---|
| 704 | ; It had to be moved to create room for the double I13X
|
|---|
| 705 | ; signature.
|
|---|
| 706 | ; It cannot be in the config-area (sector 55)
|
|---|
| 707 | ; because that area
|
|---|
| 708 | ; is crc-protected.
|
|---|
| 709 | BIOS_AuxParms dw BIOS_AuxParmsDefault
|
|---|
| 710 |
|
|---|
| 711 | ;
|
|---|
| 712 | ; Reserved space
|
|---|
| 713 | ; Should check overflow here, later...
|
|---|
| 714 | ;
|
|---|
| 715 | reserved db 6 dup('X')
|
|---|
| 716 |
|
|---|
| 717 |
|
|---|
| 718 | ;
|
|---|
| 719 | ; We arrive here after the first jump using the 'A' of the
|
|---|
| 720 | ; AiR-BOOT signature.
|
|---|
| 721 | ; So we ensure the jump is always at this offset.
|
|---|
| 722 | ; We jump here, because Martin needed to
|
|---|
| 723 | ; insert a CLI on start and did not
|
|---|
| 724 | ; want to change the AiR-BOOT signature
|
|---|
| 725 | ; because of Microsoft inventions...
|
|---|
| 726 |
|
|---|
| 727 |
|
|---|
| 728 |
|
|---|
| 729 |
|
|---|
| 730 |
|
|---|
| 731 | here = $
|
|---|
| 732 | org 044h
|
|---|
| 733 | check_overlap here
|
|---|
| 734 |
|
|---|
| 735 |
|
|---|
| 736 |
|
|---|
| 737 | ; Jump again...
|
|---|
| 738 | ; This time to the setup-code.
|
|---|
| 739 | jmp MBR_Start
|
|---|
| 740 |
|
|---|
| 741 | ;
|
|---|
| 742 | ; Entry-point when loading fails.
|
|---|
| 743 | ;
|
|---|
| 744 | db 'LOAD ERROR!', 0
|
|---|
| 745 | MBR_LoadError Proc Near
|
|---|
| 746 | mov si, offset $-12
|
|---|
| 747 | push cs
|
|---|
| 748 | pop ds
|
|---|
| 749 | call MBR_Teletype
|
|---|
| 750 | MBRLE_Halt:
|
|---|
| 751 | jmp MBRLE_Halt
|
|---|
| 752 | MBR_LoadError EndP
|
|---|
| 753 |
|
|---|
| 754 |
|
|---|
| 755 | ;
|
|---|
| 756 | ; Entry-point when saving fails.
|
|---|
| 757 | ;
|
|---|
| 758 | db 'SAVE ERROR!', 0
|
|---|
| 759 | MBR_SaveError Proc Near
|
|---|
| 760 | mov si, offset $-12
|
|---|
| 761 | push cs
|
|---|
| 762 | pop ds
|
|---|
| 763 | call MBR_Teletype
|
|---|
| 764 | MBRSE_Halt:
|
|---|
| 765 | jmp MBRSE_Halt
|
|---|
| 766 | MBR_SaveError EndP
|
|---|
| 767 |
|
|---|
| 768 |
|
|---|
| 769 | ; Put text on the screen using the BIOS tele-type function.
|
|---|
| 770 | ; No attributes like color are supported.
|
|---|
| 771 | ; In: SI - Pointer to begin of string (EOS is 0)
|
|---|
| 772 | ; Destroyed: SI
|
|---|
| 773 | MBR_Teletype Proc Near Uses ax bx cx
|
|---|
| 774 | mov ah, 0Eh
|
|---|
| 775 | mov bx, 7
|
|---|
| 776 | MBRT_Loop:
|
|---|
| 777 | lodsb
|
|---|
| 778 | or al, al
|
|---|
| 779 | jz MBRT_End
|
|---|
| 780 | int 10h
|
|---|
| 781 | jmp MBRT_Loop
|
|---|
| 782 | MBRT_End:
|
|---|
| 783 | ret
|
|---|
| 784 | MBR_Teletype EndP
|
|---|
| 785 |
|
|---|
| 786 | ;
|
|---|
| 787 | ; Rousseau: DO NOT ADD CODE TO THIS SECTION !
|
|---|
| 788 | ;
|
|---|
| 789 |
|
|---|
| 790 | ; In: BX - Base Check, DS:SI - Pointer to 512-byte-area to be included
|
|---|
| 791 | ; Out: BX - Base Check Result
|
|---|
| 792 | ; Destroyed: SI will get updated (+512)
|
|---|
| 793 | MBR_GetCheckOfSector Proc Near Uses ax cx
|
|---|
| 794 | mov cx, 256
|
|---|
| 795 | MBRGCOS_Loop:
|
|---|
| 796 | lodsw
|
|---|
| 797 | xor ax, 0BABEh
|
|---|
| 798 | xor bx, ax
|
|---|
| 799 | loop MBRGCOS_Loop
|
|---|
| 800 | or bx, bx
|
|---|
| 801 | jnz MBRGCOS_NoFixUp
|
|---|
| 802 | mov bx, 1 ; dont allow 0, cause 0 == empty
|
|---|
| 803 | MBRGCOS_NoFixUp:
|
|---|
| 804 | ret
|
|---|
| 805 | MBR_GetCheckOfSector EndP
|
|---|
| 806 |
|
|---|
| 807 |
|
|---|
| 808 |
|
|---|
| 809 |
|
|---|
| 810 |
|
|---|
| 811 |
|
|---|
| 812 | ;
|
|---|
| 813 | ; This is where the rest of AiR-BOOT gets loaded.
|
|---|
| 814 | ;
|
|---|
| 815 |
|
|---|
| 816 | ;------------------------------------------------------------------------------
|
|---|
| 817 | MBR_RealStart:
|
|---|
| 818 | mov ax, StackSeg ; 07000h, below the moved code
|
|---|
| 819 | mov ss, ax
|
|---|
| 820 | ;mov sp, 7FFFh ; Odd stack-pointer ??
|
|---|
| 821 | mov sp, 7FFEh ; Even is better
|
|---|
| 822 | mov ax, es ; ES holds segment where we moved to
|
|---|
| 823 | mov ds, ax ; Set DS==ES to Code Segment
|
|---|
| 824 |
|
|---|
| 825 | ; If we are in debug-mode, all code is moved already,
|
|---|
| 826 | ; so we can directly jump to it.
|
|---|
| 827 | ; One difference is that in debug-mode, the whole .com image is
|
|---|
| 828 | ; loaded by dos while when air-boot is active from the MBR it
|
|---|
| 829 | ; does the loading itself.
|
|---|
| 830 | IFNDEF ReleaseCode
|
|---|
| 831 | jmp AiR_BOOT_Start
|
|---|
| 832 | ENDIF
|
|---|
| 833 |
|
|---|
| 834 |
|
|---|
| 835 | ; Load missing parts from harddrive...
|
|---|
| 836 | ;mov ax, cs ; actually obsolete
|
|---|
| 837 | ;mov es, ax ; actually obsolete
|
|---|
| 838 |
|
|---|
| 839 | ; Load the configuration-sectors from disk.
|
|---|
| 840 | mov bx, offset Configuration
|
|---|
| 841 | mov dx, 0080h ; First harddrive, Sector 55
|
|---|
| 842 | mov cx, 0037h ; Is 55d is config-sector
|
|---|
| 843 |
|
|---|
| 844 | ; Call the i/o-part
|
|---|
| 845 | call MBR_LoadConfig
|
|---|
| 846 |
|
|---|
| 847 | jnc MBR_ConfigCopy_NoError
|
|---|
| 848 |
|
|---|
| 849 | ; Some error occured
|
|---|
| 850 | MBR_ConfigCopy_LoadError:
|
|---|
| 851 | call MBR_LoadError ; Will Abort BootUp
|
|---|
| 852 |
|
|---|
| 853 | ; Load the code sectors
|
|---|
| 854 | MBR_ConfigCopy_NoError:
|
|---|
| 855 | mov bx, offset FurtherMoreLoad
|
|---|
| 856 | mov dx, 0080h ; First harddrive
|
|---|
| 857 | mov cx, 0002h ; Second sector
|
|---|
| 858 | mov ah, 02h
|
|---|
| 859 |
|
|---|
| 860 | ; This location is in the code-segment.
|
|---|
| 861 | ; When segment overrides are applied, the address is
|
|---|
| 862 | ; expanded to the bit-with.
|
|---|
| 863 | ; So the .286 or .386 directive influences the length
|
|---|
| 864 | ; of the instruction, even with a USE16 segment.
|
|---|
| 865 | mov al, ds:[10h] ; Number of code sectors
|
|---|
| 866 | int 13h
|
|---|
| 867 | jnc MBR_RealStart_NoError
|
|---|
| 868 | jmp MBR_ConfigCopy_LoadError
|
|---|
| 869 |
|
|---|
| 870 |
|
|---|
| 871 |
|
|---|
| 872 | ; [v1.05+]
|
|---|
| 873 | ; Signature for IBM's LVM to detect our "powerful" features ;)
|
|---|
| 874 | ; [v1.0.8+]
|
|---|
| 875 | ; Reworked MBR code to be able to create a
|
|---|
| 876 | ; double 'I13X' signature.
|
|---|
| 877 | ; MBR's created with LVM eCS v1.x have the signature at 0d5h
|
|---|
| 878 | ; MBR's created with LVM eCS v2.x have the signature at 0d0h
|
|---|
| 879 | ; See eCS bugtracker issue #3002
|
|---|
| 880 | ; Update: These are actually MOV EAX,'X31I' instructions
|
|---|
| 881 | ; in the eCS LVM MBR-code. They are at different places in
|
|---|
| 882 | ; the v1.x and v2.x LVM code.
|
|---|
| 883 | ; Let's protect them with an org directive.
|
|---|
| 884 |
|
|---|
| 885 | here = $
|
|---|
| 886 | org 00d0h
|
|---|
| 887 | check_overlap here
|
|---|
| 888 | ;org 00d0h
|
|---|
| 889 | db 'I13X',0,'I13X',0
|
|---|
| 890 |
|
|---|
| 891 |
|
|---|
| 892 | MBR_RealStart_NoError:
|
|---|
| 893 | ; Now Check Code with CheckSum
|
|---|
| 894 | mov si, offset FurtherMoreLoad
|
|---|
| 895 |
|
|---|
| 896 | ;movzx cx, bptr ds:[10h]
|
|---|
| 897 | mov cl, ds:[10h]
|
|---|
| 898 | mov ch,0
|
|---|
| 899 |
|
|---|
| 900 | xor bx, bx
|
|---|
| 901 | MBR_RealStart_CheckCodeLoop:
|
|---|
| 902 | call MBR_GetCheckOfSector
|
|---|
| 903 | loop MBR_RealStart_CheckCodeLoop
|
|---|
| 904 |
|
|---|
| 905 |
|
|---|
| 906 | cmp MBR_CheckCode, bx
|
|---|
| 907 | je MBR_RealStart_CheckSuccess
|
|---|
| 908 |
|
|---|
| 909 | mov si, offset TXT_ERROR_Attention
|
|---|
| 910 | call MBR_Teletype
|
|---|
| 911 | mov si, offset TXT_ERROR_CheckCode
|
|---|
| 912 | call MBR_Teletype
|
|---|
| 913 | mov si, offset TXT_ERROR_CheckFailed
|
|---|
| 914 | call MBR_Teletype
|
|---|
| 915 | jmp MBR_HaltSystem
|
|---|
| 916 | MBR_RealStart_CheckSuccess:
|
|---|
| 917 | jmp AiR_BOOT_Start
|
|---|
| 918 |
|
|---|
| 919 |
|
|---|
| 920 |
|
|---|
| 921 |
|
|---|
| 922 |
|
|---|
| 923 | ;------------------------------------------------------------------------------
|
|---|
| 924 | Include TEXT/TXTMBR.ASM ; All translateable Text in MBR
|
|---|
| 925 | ;------------------------------------------------------------------------------
|
|---|
| 926 |
|
|---|
| 927 |
|
|---|
| 928 |
|
|---|
| 929 | ; This is an ugly kludge function to create space for the
|
|---|
| 930 | ; double 'I13X' signature.
|
|---|
| 931 | ; It loads the configuration sectors, but bx,cx and dx are not initialized
|
|---|
| 932 | ; in this function. That's done around line 500.
|
|---|
| 933 | ; Putting this few bytes here creates just enough room.
|
|---|
| 934 | MBR_LoadConfig Proc Near
|
|---|
| 935 | ; Changed from conditional assembler to calculated value
|
|---|
| 936 | ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter"
|
|---|
| 937 | ; Size of the ab-configuration in 512 byte sectors
|
|---|
| 938 | mov al, (MBR_BackUpMBR - Configuration) / 200h
|
|---|
| 939 | mov ah,02h
|
|---|
| 940 | int 13h
|
|---|
| 941 | ret
|
|---|
| 942 | MBR_LoadConfig EndP
|
|---|
| 943 |
|
|---|
| 944 |
|
|---|
| 945 | here = $
|
|---|
| 946 | org 001b8h
|
|---|
| 947 | check_overlap here
|
|---|
| 948 |
|
|---|
| 949 | ; Disk Signature
|
|---|
| 950 | ; Note that in an LVM 2.x MBR this collides
|
|---|
| 951 | ; with the dummy PTE that it uses to look for IBM-BM
|
|---|
| 952 | ; on the second harddisk.
|
|---|
| 953 | db 'DSIG'
|
|---|
| 954 |
|
|---|
| 955 | ; Unused word at 01BCh
|
|---|
| 956 | ; An LVM 2.x MBR puts 'CC33' here.
|
|---|
| 957 | dw '$$'
|
|---|
| 958 |
|
|---|
| 959 |
|
|---|
| 960 | ; Partition Table
|
|---|
| 961 | db 16 dup('0')
|
|---|
| 962 | db 16 dup('1')
|
|---|
| 963 | db 16 dup('2')
|
|---|
| 964 | db 16 dup('3')
|
|---|
| 965 |
|
|---|
| 966 | ; Boot Sigbature
|
|---|
| 967 | dw 0aa55h
|
|---|
| 968 |
|
|---|
| 969 | ; End of sector 1
|
|---|
| 970 | eos1a:
|
|---|
| 971 |
|
|---|
| 972 |
|
|---|
| 973 |
|
|---|
| 974 |
|
|---|
| 975 | ;==============================================================================
|
|---|
| 976 | ; Sector 2
|
|---|
| 977 |
|
|---|
| 978 | ;
|
|---|
| 979 | ; Here starts the second sector, sector 2
|
|---|
| 980 | ;
|
|---|
| 981 | org 00200h
|
|---|
| 982 | ; Start of sector 2.
|
|---|
| 983 | sos2:
|
|---|
| 984 |
|
|---|
| 985 | ;
|
|---|
| 986 | ; Everything beyond this point is loaded on startup
|
|---|
| 987 | ; and is NOT existant at first
|
|---|
| 988 | ;
|
|---|
| 989 | FurtherMoreLoad:
|
|---|
| 990 |
|
|---|
| 991 | ;
|
|---|
| 992 | ; Filesystem table correlating id with name.
|
|---|
| 993 | ;
|
|---|
| 994 |
|
|---|
| 995 | ; first Normal-Partition-ID, Hidden-Partition-ID
|
|---|
| 996 | ; and Default-Partition-Flags.
|
|---|
| 997 | ; 01h -> Boot-Able
|
|---|
| 998 | ; 10h -> FAT32 - Name Getting Scheme
|
|---|
| 999 | ; 20h -> No Name To Get (use Partition Name from IPT)
|
|---|
| 1000 | ; 40h -> 'L' flag possible
|
|---|
| 1001 | db 'AiRSYS-TABLE'
|
|---|
| 1002 | FileSysIDs db 01h, 11h,01h, 04h,014h,01h, 06h,016h,41h, 0Eh,00Eh,01h
|
|---|
| 1003 | db 07h, 17h,41h, 08h,017h,21h, 35h,035h,20h,0FCh,017h,41h
|
|---|
| 1004 | db 09h, 19h,11h, 0Bh,01Bh,11h, 0Ch,01Ch,11h,0EBh,0EBh,01h
|
|---|
| 1005 | db 63h, 63h,21h, 81h,081h,21h, 83h,083h,21h, 40h,040h,21h
|
|---|
| 1006 | db 0A5h,0A5h,21h,0A6h,0A6h,21h, 82h,082h,20h,0A7h,0A7h,21h
|
|---|
| 1007 | db 63h, 63h,21h, 4Dh,04Dh,21h, 4Eh,04Eh,21h, 4Fh,04Fh,21h
|
|---|
| 1008 | db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
|
|---|
| 1009 | db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
|
|---|
| 1010 | db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
|
|---|
| 1011 | db 01h, 01h,01h,0FDh,0FDh,20h, 84h,084h,20h,0A0h,0A0h,20h
|
|---|
| 1012 | db 0Ah, 0Ah,20h,0FEh,0FEh,21h,0FFh,0FFh,21h, 00h,000h,21h
|
|---|
| 1013 | db 16 dup (0)
|
|---|
| 1014 |
|
|---|
| 1015 | FileSysNames db 'FAT12 ', 'FAT16 ', 'FAT16Big', 'FAT16Big'
|
|---|
| 1016 | db 'HPFS ', 'NTFS ', 'LVM-Data', 'JFS '
|
|---|
| 1017 | db 'FAT32 ', 'FAT32 ', 'FAT32 ', 'BeOS '
|
|---|
| 1018 | db 'Unix ', 'Minix ', 'Linux ', 'Venix ' ; x row ;)
|
|---|
| 1019 | db 'BSD/386 ', 'OpenBSD ', 'LinuxSwp', 'NeXTSTEP'
|
|---|
| 1020 | db 'GNU HURD', 'QNX ', 'QNX ', 'QNX '
|
|---|
| 1021 | db ' ', ' ', ' ', ' '
|
|---|
| 1022 | db ' ', ' ', ' ', ' '
|
|---|
| 1023 | db ' ', ' ', ' ', ' '
|
|---|
| 1024 | db ' ', 'Kernel ', ' ', '0V-Award'
|
|---|
| 1025 | ; db 'OS/2 Man', 'via BIOS', 'Floppy ', 'Unknown '
|
|---|
| 1026 | db 'OS2-BMGR', 'via BIOS', 'Floppy ', 'Unknown '
|
|---|
| 1027 | ; -> 44 Partition-Types
|
|---|
| 1028 |
|
|---|
| 1029 | ; End of sector 2.
|
|---|
| 1030 | eos2:
|
|---|
| 1031 |
|
|---|
| 1032 |
|
|---|
| 1033 |
|
|---|
| 1034 |
|
|---|
| 1035 |
|
|---|
| 1036 |
|
|---|
| 1037 |
|
|---|
| 1038 |
|
|---|
| 1039 | ;==============================================================================
|
|---|
| 1040 | ; Sector 3
|
|---|
| 1041 | here = $
|
|---|
| 1042 | org 00400h
|
|---|
| 1043 | check_overlap here
|
|---|
| 1044 |
|
|---|
| 1045 |
|
|---|
| 1046 | ; Start of sector 3.
|
|---|
| 1047 | sos3:
|
|---|
| 1048 |
|
|---|
| 1049 |
|
|---|
| 1050 |
|
|---|
| 1051 |
|
|---|
| 1052 |
|
|---|
| 1053 |
|
|---|
| 1054 |
|
|---|
| 1055 |
|
|---|
| 1056 |
|
|---|
| 1057 |
|
|---|
| 1058 |
|
|---|
| 1059 |
|
|---|
| 1060 |
|
|---|
| 1061 |
|
|---|
| 1062 |
|
|---|
| 1063 | ; ##############################################
|
|---|
| 1064 | ; ## ENTRY-POINT AFTER ALL THE INITIAL HASSLE ##
|
|---|
| 1065 | ; ##############################################
|
|---|
| 1066 |
|
|---|
| 1067 |
|
|---|
| 1068 |
|
|---|
| 1069 | AiR_BOOT_Start:
|
|---|
| 1070 |
|
|---|
| 1071 |
|
|---|
| 1072 |
|
|---|
| 1073 | ;
|
|---|
| 1074 | ; Since v1.0.8, AiR-BOOT is able to chainload IBM-BM.
|
|---|
| 1075 | ; When IBM-BM resides above the 1024-cylinder limit, the 'I13X'
|
|---|
| 1076 | ; signature is required at 3000:0000, FS needs to contain 3000h
|
|---|
| 1077 | ; and the 32-bit LBA address needs to follow the 'I13X' signature.
|
|---|
| 1078 | ; For booting IBM-BM from the second disk, a copy of the MBR of the
|
|---|
| 1079 | ; first disk is also required at 0000:7E00.
|
|---|
| 1080 | ; This information is derived from the eCS 2.x LVM MBR.
|
|---|
| 1081 | ;
|
|---|
| 1082 | ; So, now is a good time to copy the MBR of the first disk to
|
|---|
| 1083 | ; 0000:7E00 in case the partition that will be started is IBM-BM.
|
|---|
| 1084 | ; This copy is located at 8000:0000 and DS already points to this
|
|---|
| 1085 | ; segment.
|
|---|
| 1086 | ;
|
|---|
| 1087 | pusha ; Save all the general purpose regs
|
|---|
| 1088 | push es ; We need ES too, so save its value
|
|---|
| 1089 | xor ax,ax ; Segment 0000h
|
|---|
| 1090 | mov es,ax ; Make ES point to it
|
|---|
| 1091 | mov si,offset BootBasePtr ; Start of AiR-BOOT which has the MBR
|
|---|
| 1092 | mov di,7e00h ; Destination for the MBR for IBM-BM
|
|---|
| 1093 | mov cx,100h ; 256 words = 512 bytes
|
|---|
| 1094 | cld ; Direction from low to high
|
|---|
| 1095 | rep movsw ; Copy the 256 words of the MBR
|
|---|
| 1096 | pop es ; Restore previous value of ES
|
|---|
| 1097 | popa ; Restore all the general purpose regs
|
|---|
| 1098 |
|
|---|
| 1099 |
|
|---|
| 1100 |
|
|---|
| 1101 | ;jmp skip
|
|---|
| 1102 |
|
|---|
| 1103 | ; Rousseau:
|
|---|
| 1104 | ; I should cleanup my garbage here...
|
|---|
| 1105 |
|
|---|
| 1106 | ; Initialize Variable-Tables, Detections, etc.
|
|---|
| 1107 | call PRECRAP_Main
|
|---|
| 1108 |
|
|---|
| 1109 | ; Number of harddisks is now known
|
|---|
| 1110 |
|
|---|
| 1111 | call PARTSCAN_ScanForPartitions
|
|---|
| 1112 |
|
|---|
| 1113 |
|
|---|
| 1114 | ; Number of disks found
|
|---|
| 1115 | mov si, offset DisksFound
|
|---|
| 1116 | call MBR_Teletype
|
|---|
| 1117 |
|
|---|
| 1118 | mov al, [TotalHarddiscs]
|
|---|
| 1119 | call VideoIO_SyncPos
|
|---|
| 1120 | call VideoIO_PrintByteDynamicNumber
|
|---|
| 1121 | xor si,si
|
|---|
| 1122 | call MBR_TeletypeNL
|
|---|
| 1123 |
|
|---|
| 1124 | ; Number of bootable systems indicator
|
|---|
| 1125 | mov si, offset PartitionsFound
|
|---|
| 1126 | call MBR_Teletype
|
|---|
| 1127 |
|
|---|
| 1128 | mov al, [CFG_Partitions]
|
|---|
| 1129 | call VideoIO_SyncPos
|
|---|
| 1130 | call VideoIO_PrintByteDynamicNumber
|
|---|
| 1131 |
|
|---|
| 1132 | xor si,si
|
|---|
| 1133 | call MBR_TeletypeNL
|
|---|
| 1134 | call MBR_TeletypeNL
|
|---|
| 1135 |
|
|---|
| 1136 | call VideoIO_SyncPos
|
|---|
| 1137 |
|
|---|
| 1138 | mov dl,80h
|
|---|
| 1139 | call VideoIO_DumpDiskInfo
|
|---|
| 1140 |
|
|---|
| 1141 | ;
|
|---|
| 1142 | ; Enumberate Bootable Systems by name
|
|---|
| 1143 | ; and prepare Phase 1 if active.
|
|---|
| 1144 | ;
|
|---|
| 1145 | ; This can also be implemented using the
|
|---|
| 1146 | ; Installable LVM-flag I think.
|
|---|
| 1147 | ; But at the time I had lesser knowledge about LVM...
|
|---|
| 1148 | ; So this algorithm may change in the future.
|
|---|
| 1149 | ;
|
|---|
| 1150 | mov si, offset PartitionTable
|
|---|
| 1151 | xor cx,cx
|
|---|
| 1152 | mov cl,[CFG_Partitions]
|
|---|
| 1153 | MBR_Parts:
|
|---|
| 1154 | add si, 4
|
|---|
| 1155 | push si
|
|---|
| 1156 | push si
|
|---|
| 1157 | ;call MBR_TeletypeVolName
|
|---|
| 1158 | pop si
|
|---|
| 1159 | call PART_IsInstallVolume
|
|---|
| 1160 | jnc MBR_Parts_NI
|
|---|
| 1161 |
|
|---|
| 1162 | ; Install Volume
|
|---|
| 1163 | mov al,' '
|
|---|
| 1164 | mov bl,7
|
|---|
| 1165 | mov ah, 0eh
|
|---|
| 1166 | int 10h
|
|---|
| 1167 |
|
|---|
| 1168 | mov al,'('
|
|---|
| 1169 | mov bl,7
|
|---|
| 1170 | mov ah, 0eh
|
|---|
| 1171 | int 10h
|
|---|
| 1172 |
|
|---|
| 1173 | mov al,[CFG_Partitions]
|
|---|
| 1174 | sub al,cl
|
|---|
| 1175 | ;inc al
|
|---|
| 1176 | ;mov [Menu_EntryAutomatic],al
|
|---|
| 1177 | mov [CFG_PartAutomatic],al ; Setup entry for install-volume
|
|---|
| 1178 | mov [CFG_PartLast],al
|
|---|
| 1179 | mov ah, [eCS_InstallVolume] ; 1st byte is 0 if no phase 1 active
|
|---|
| 1180 | test ah,ah ; test the byte, ZF is 0 if phase 1 active
|
|---|
| 1181 | lahf ; flags in ah
|
|---|
| 1182 | xor ah, 40h ; complement ZF
|
|---|
| 1183 | and ah, 40h ; mask ZF
|
|---|
| 1184 | shr ah, 6 ; move ZF to LSB
|
|---|
| 1185 | mov [CFG_AutomaticBoot], ah ; automatic boot if phase 1 is active
|
|---|
| 1186 |
|
|---|
| 1187 |
|
|---|
| 1188 | add al,'1'
|
|---|
| 1189 | mov bl,7
|
|---|
| 1190 | mov ah, 0eh
|
|---|
| 1191 | int 10h
|
|---|
| 1192 |
|
|---|
| 1193 | mov al,')'
|
|---|
| 1194 | mov bl,7
|
|---|
| 1195 | mov ah, 0eh
|
|---|
| 1196 | int 10h
|
|---|
| 1197 |
|
|---|
| 1198 | mov bx,cx
|
|---|
| 1199 |
|
|---|
| 1200 | MBR_Parts_NI:
|
|---|
| 1201 | xor si,si
|
|---|
| 1202 | ;call MBR_TeletypeNL
|
|---|
| 1203 | pop si
|
|---|
| 1204 | add si, 30 ; Add remainder of IPT entry
|
|---|
| 1205 | loop MBR_Parts
|
|---|
| 1206 |
|
|---|
| 1207 |
|
|---|
| 1208 |
|
|---|
| 1209 |
|
|---|
| 1210 | ; Index of automatic start partition
|
|---|
| 1211 | ;mov si, offset AutoStartPart
|
|---|
| 1212 | ;call MBR_Teletype
|
|---|
| 1213 |
|
|---|
| 1214 | ;mov al, [CFG_PartAutomatic]
|
|---|
| 1215 | ;add al, 31h
|
|---|
| 1216 | ;mov ah, 09h
|
|---|
| 1217 | ;mov bx, 15
|
|---|
| 1218 | ;mov cx, 1
|
|---|
| 1219 | ;int 10h
|
|---|
| 1220 |
|
|---|
| 1221 | ;mov al, [CFG_PartAutomatic]
|
|---|
| 1222 | ;add al, 31h
|
|---|
| 1223 | ;mov ah, 0eh
|
|---|
| 1224 | ;mov bx, 15
|
|---|
| 1225 | ;mov cx, 1
|
|---|
| 1226 | ;int 10h
|
|---|
| 1227 |
|
|---|
| 1228 | xor si,si
|
|---|
| 1229 | call MBR_TeletypeNL
|
|---|
| 1230 | xor si,si
|
|---|
| 1231 | call MBR_TeletypeNL
|
|---|
| 1232 |
|
|---|
| 1233 | ;mov ax,[BIOS_AuxParms]
|
|---|
| 1234 | ;call VideoIO_SyncPos
|
|---|
| 1235 | ;push ax
|
|---|
| 1236 | ;add al,'0'
|
|---|
| 1237 | ;mov bl,7
|
|---|
| 1238 | ;mov ah, 0eh
|
|---|
| 1239 | ;int 10h
|
|---|
| 1240 | ;pop ax
|
|---|
| 1241 | ;xchg al,ah
|
|---|
| 1242 | ;sub al,0a2h
|
|---|
| 1243 | ;mov bl,7
|
|---|
| 1244 | ;mov ah, 0eh
|
|---|
| 1245 | ;int 10h
|
|---|
| 1246 |
|
|---|
| 1247 |
|
|---|
| 1248 | call MBR_TeletypeSyncPos
|
|---|
| 1249 |
|
|---|
| 1250 | xor si,si
|
|---|
| 1251 | call MBR_TeletypeNL
|
|---|
| 1252 | call MBR_TeletypeNL
|
|---|
| 1253 |
|
|---|
| 1254 |
|
|---|
| 1255 |
|
|---|
| 1256 | mov si, offset ShowMenu
|
|---|
| 1257 | call MBR_TeletypeBold
|
|---|
| 1258 |
|
|---|
| 1259 |
|
|---|
| 1260 | skip:
|
|---|
| 1261 |
|
|---|
| 1262 |
|
|---|
| 1263 |
|
|---|
| 1264 | ;
|
|---|
| 1265 | ; ####################### WAIT FOR KEY ########################
|
|---|
| 1266 | ;
|
|---|
| 1267 |
|
|---|
| 1268 |
|
|---|
| 1269 | ; Rousseau:
|
|---|
| 1270 | ; Wait for key so we can see debug log if ab-menu hangs.
|
|---|
| 1271 | ;;xor ax, ax
|
|---|
| 1272 | ;;int 16h
|
|---|
| 1273 |
|
|---|
| 1274 | ;call SOUND_Beep
|
|---|
| 1275 |
|
|---|
| 1276 | ; Rousseau: delayed save of video-page
|
|---|
| 1277 |
|
|---|
| 1278 | mov ax, VideoIO_Page1
|
|---|
| 1279 | call VideoIO_BackUpTo ; Copy BIOS POST to Second Page
|
|---|
| 1280 |
|
|---|
| 1281 | ;call SOUND_Beep
|
|---|
| 1282 |
|
|---|
| 1283 |
|
|---|
| 1284 | ;
|
|---|
| 1285 | ; COM-PORT DEBUG
|
|---|
| 1286 | ;
|
|---|
| 1287 | ;call AuxIO_TeletypeNL
|
|---|
| 1288 | mov si, offset PartitionTable
|
|---|
| 1289 | ;call AuxIO_DumpSector
|
|---|
| 1290 | ;call AuxIO_TeletypeNL
|
|---|
| 1291 |
|
|---|
| 1292 |
|
|---|
| 1293 | ; Save configuration so phase1 boot-through is disabled
|
|---|
| 1294 | ; on next boot.
|
|---|
| 1295 | ; Moved here to fix that Esc out of SETUP would also save.
|
|---|
| 1296 | ; So moved above the MBR_Main_ReEnterSetup label.
|
|---|
| 1297 | mov [eCS_InstallVolume], 0 ; disable phase 1 for next boot
|
|---|
| 1298 | call DriveIO_SaveConfiguration
|
|---|
| 1299 |
|
|---|
| 1300 |
|
|---|
| 1301 |
|
|---|
| 1302 | ;
|
|---|
| 1303 | ; RE-ENTER SETUP
|
|---|
| 1304 | ;
|
|---|
| 1305 | MBR_Main_ReEnterSetup:
|
|---|
| 1306 | call SETUP_CheckEnterSETUP
|
|---|
| 1307 |
|
|---|
| 1308 | ;call SOUND_Beep
|
|---|
| 1309 |
|
|---|
| 1310 | ; Rousseau: Every time I see "AfterCrap" I have to laugh :-)
|
|---|
| 1311 | call AFTERCRAP_Main
|
|---|
| 1312 |
|
|---|
| 1313 | ; [Linux support removed since v1.02]
|
|---|
| 1314 | ; Now get FAT16-Linux Kernel Partition, If requested
|
|---|
| 1315 | ;cmp [CFG_LinuxKrnlPartition], 0FFh
|
|---|
| 1316 | ;je MBR_Main_NoLinuxKrnlPartition
|
|---|
| 1317 | ;call LINUX_InitFAT16access
|
|---|
| 1318 | ;MBR_Main_NoLinuxKrnlPartition:
|
|---|
| 1319 |
|
|---|
| 1320 |
|
|---|
| 1321 | MBR_Main_ReEnterBootMenuPre:
|
|---|
| 1322 |
|
|---|
| 1323 | ; SetUp PartitionPointers for BootMenu (filter non-bootable)
|
|---|
| 1324 | call PART_CalculateMenuPartPointers
|
|---|
| 1325 |
|
|---|
| 1326 | ; ...and count that one...
|
|---|
| 1327 | cmp PartitionPointerCount, 0
|
|---|
| 1328 | jne MBR_Main_SomethingBootAble
|
|---|
| 1329 | mov si, offset TXT_NoBootAble
|
|---|
| 1330 | call MBR_Teletype
|
|---|
| 1331 | jmp MBR_HaltSystem
|
|---|
| 1332 |
|
|---|
| 1333 | MBR_Main_SomethingBootAble:
|
|---|
| 1334 | ; FixUp Values, define Timed Setup booting, etc.
|
|---|
| 1335 | call PART_FixUpDefaultPartitionValues
|
|---|
| 1336 |
|
|---|
| 1337 |
|
|---|
| 1338 |
|
|---|
| 1339 | ; -------------------------------------------------- BOOT-MENU
|
|---|
| 1340 | MBR_Main_ReEnterBootMenu:
|
|---|
| 1341 | call BOOTMENU_ResetMenuVars ; reset has to be done
|
|---|
| 1342 | test CFG_AutomaticBoot, 1
|
|---|
| 1343 | jz MBR_Main_NoAutomaticBooting
|
|---|
| 1344 | ; ------------------------------------------ AUTOMATIC BOOTING
|
|---|
| 1345 | ; Select automatic partition, disable automatic booting for
|
|---|
| 1346 | ; next time and boot system...
|
|---|
| 1347 | mov CFG_AutomaticBoot, 0
|
|---|
| 1348 | call PASSWORD_AskSystemPwd
|
|---|
| 1349 | mov al, Menu_EntryAutomatic
|
|---|
| 1350 |
|
|---|
| 1351 | ;mov al, 2
|
|---|
| 1352 |
|
|---|
| 1353 | mov Menu_EntrySelected, al ; zero based
|
|---|
| 1354 | jmp MBR_Main_NoBootMenu
|
|---|
| 1355 |
|
|---|
| 1356 | MBR_Main_NoAutomaticBooting:
|
|---|
| 1357 |
|
|---|
| 1358 | ;call SOUND_Beep
|
|---|
| 1359 |
|
|---|
| 1360 | test CFG_BootMenuActive, 0FFh
|
|---|
| 1361 | jnz MBR_Main_GotBootMenu
|
|---|
| 1362 | ; ----------------------------------------------- NO BOOT-MENU
|
|---|
| 1363 | ; Select default partition and boot system...
|
|---|
| 1364 | call PASSWORD_AskSystemPwd
|
|---|
| 1365 |
|
|---|
| 1366 | ;call VideoIO_DBG_WriteString2
|
|---|
| 1367 |
|
|---|
| 1368 | mov al, Menu_EntryDefault
|
|---|
| 1369 | ;mov al,0 ; zero based
|
|---|
| 1370 | mov Menu_EntrySelected, al
|
|---|
| 1371 | jmp MBR_Main_NoBootMenu
|
|---|
| 1372 |
|
|---|
| 1373 | MBR_Main_GotBootMenu:
|
|---|
| 1374 | ; ------------------------------------------ BOOT-MENU VISUALS
|
|---|
| 1375 | call FX_StartScreen
|
|---|
| 1376 |
|
|---|
| 1377 | ;call SOUND_Beep
|
|---|
| 1378 |
|
|---|
| 1379 | call BOOTMENU_BuildBackground
|
|---|
| 1380 | call BOOTMENU_BuildMain
|
|---|
| 1381 | call FX_EndScreenRight
|
|---|
| 1382 | call PASSWORD_AskSystemPwd
|
|---|
| 1383 | call BOOTMENU_ResetTimedBoot
|
|---|
| 1384 |
|
|---|
| 1385 | ;call SOUND_Beep
|
|---|
| 1386 |
|
|---|
| 1387 | call BOOTMENU_Execute
|
|---|
| 1388 |
|
|---|
| 1389 | ;call SOUND_Beep
|
|---|
| 1390 |
|
|---|
| 1391 | jc MBR_Main_ReEnterSetup
|
|---|
| 1392 | call BOOTMENU_SetVarsAfterMenu
|
|---|
| 1393 |
|
|---|
| 1394 | ;call SOUND_Beep
|
|---|
| 1395 |
|
|---|
| 1396 | ; ---------------------------------------------------- BOOTING
|
|---|
| 1397 | MBR_Main_NoBootMenu:
|
|---|
| 1398 | call FX_StartScreen
|
|---|
| 1399 | call BOOTMENU_BuildGoodBye
|
|---|
| 1400 | call FX_EndScreenRight
|
|---|
| 1401 | call PASSWORD_AskChangeBootPwd
|
|---|
| 1402 |
|
|---|
| 1403 | IFNDEF ReleaseCode
|
|---|
| 1404 | ; Debug Code to terminate DOS .COM program - used for
|
|---|
| 1405 | ; testing AiR-BOOT
|
|---|
| 1406 | int 3
|
|---|
| 1407 | mov ax, 6200h
|
|---|
| 1408 | int 21h
|
|---|
| 1409 | mov es, bx
|
|---|
| 1410 | mov ax, 4C00h ; Quit program
|
|---|
| 1411 | int 21h
|
|---|
| 1412 | ENDIF
|
|---|
| 1413 | call ANTIVIR_SaveBackUpMBR
|
|---|
| 1414 | mov dl, Menu_EntrySelected
|
|---|
| 1415 |
|
|---|
| 1416 | ; -------------------------------------------- START PARTITION
|
|---|
| 1417 | call PART_StartPartition
|
|---|
| 1418 |
|
|---|
| 1419 |
|
|---|
| 1420 |
|
|---|
| 1421 | ;
|
|---|
| 1422 | ; Include other code-modules here.
|
|---|
| 1423 | ; Because TASM is a multiple pass assembler, forward references
|
|---|
| 1424 | ; are possible.
|
|---|
| 1425 | ;
|
|---|
| 1426 | b_std_txt:
|
|---|
| 1427 | Include REGULAR/STD_TEXT.ASM ; Standard (non-translateable text)
|
|---|
| 1428 | size_std_txt = $-b_std_txt
|
|---|
| 1429 |
|
|---|
| 1430 | b_driveio:
|
|---|
| 1431 | Include REGULAR/DRIVEIO.ASM ; Drive I/O, Config Load/Save
|
|---|
| 1432 | size_driveio = $-b_driveio
|
|---|
| 1433 |
|
|---|
| 1434 | b_videoio:
|
|---|
| 1435 | Include REGULAR/VIDEOIO.ASM ; Video I/O
|
|---|
| 1436 | size_videoio = $-b_videoio
|
|---|
| 1437 |
|
|---|
| 1438 | b_timer:
|
|---|
| 1439 | Include REGULAR/TIMER.ASM ; Timer
|
|---|
| 1440 | size_timer = $-b_timer
|
|---|
| 1441 |
|
|---|
| 1442 | b_partmain:
|
|---|
| 1443 | Include REGULAR/PARTMAIN.ASM ; Regular Partition Routines
|
|---|
| 1444 | size_partmain = $-b_partmain
|
|---|
| 1445 |
|
|---|
| 1446 | b_partscan:
|
|---|
| 1447 | Include REGULAR/PARTSCAN.ASM ; Partition Scanning
|
|---|
| 1448 | size_partscan = $-b_partscan
|
|---|
| 1449 |
|
|---|
| 1450 | b_bootmenu:
|
|---|
| 1451 | Include REGULAR/BOOTMENU.ASM ; Boot-Menu
|
|---|
| 1452 | size_bootmenu = $-b_bootmenu
|
|---|
| 1453 |
|
|---|
| 1454 | b_password:
|
|---|
| 1455 | Include REGULAR/PASSWORD.ASM ; Password related
|
|---|
| 1456 | size_password = $-b_password
|
|---|
| 1457 |
|
|---|
| 1458 | b_other:
|
|---|
| 1459 | Include REGULAR/OTHER.ASM ; Other Routines
|
|---|
| 1460 | size_other = $-b_other
|
|---|
| 1461 |
|
|---|
| 1462 | ; Rousseau: Special modules moved upwards.
|
|---|
| 1463 | b_main:
|
|---|
| 1464 | Include SETUP/MAIN.ASM ; The whole AiR-BOOT SETUP
|
|---|
| 1465 | size_main = $-b_main
|
|---|
| 1466 |
|
|---|
| 1467 |
|
|---|
| 1468 | IFDEF TXT_IncludeCyrillic
|
|---|
| 1469 | b_ccharset:
|
|---|
| 1470 | Include SPECIAL/CHARSET.ASM ; Charset Support (e.g. Cyrillic)
|
|---|
| 1471 | size_ccharset = $-b_ccharset
|
|---|
| 1472 | ENDIF
|
|---|
| 1473 |
|
|---|
| 1474 | b_math:
|
|---|
| 1475 | Include REGULAR/MATH.ASM ; Math functions (like 32-bit multiply)
|
|---|
| 1476 | size_math = $-b_math
|
|---|
| 1477 |
|
|---|
| 1478 |
|
|---|
| 1479 |
|
|---|
| 1480 | IFDEF AuxDebug
|
|---|
| 1481 | b_debug:
|
|---|
| 1482 | ; Include REGULAR/DEBUG.ASM ; Various debugging routines,
|
|---|
| 1483 | ; uses AUXIO and CONV
|
|---|
| 1484 | size_debug = $-b_debug
|
|---|
| 1485 | ENDIF
|
|---|
| 1486 |
|
|---|
| 1487 | b_auxio:
|
|---|
| 1488 | ;Include REGULAR/AUXIO.ASM ; Com-port support for debugging
|
|---|
| 1489 | size_auxio = $-b_auxio
|
|---|
| 1490 |
|
|---|
| 1491 | ; Rousseau: moved upwards
|
|---|
| 1492 | ;IFDEF TXT_IncludeCyrillic
|
|---|
| 1493 | ; Include SPECIAL/CHARSET.ASM ; Charset Support (e.g. Cyrillic)
|
|---|
| 1494 | ;ENDIF
|
|---|
| 1495 |
|
|---|
| 1496 | b_lvm:
|
|---|
| 1497 | Include SPECIAL/LVM.ASM ; LVM-specific code
|
|---|
| 1498 | size_lvm = $-b_lvm
|
|---|
| 1499 |
|
|---|
| 1500 |
|
|---|
| 1501 | ; End of sector 3.
|
|---|
| 1502 | eos3:
|
|---|
| 1503 |
|
|---|
| 1504 |
|
|---|
| 1505 |
|
|---|
| 1506 |
|
|---|
| 1507 |
|
|---|
| 1508 | ;==============================================================================
|
|---|
| 1509 |
|
|---|
| 1510 | ;
|
|---|
| 1511 | ; This is the AiR-BOOT MBR-Protection Image.
|
|---|
| 1512 | ; 04600 / 200h = 23h = 35d sectors are before this point.
|
|---|
| 1513 | ; The stuff generated here gets overwritten when the MBR_PROT.ASM
|
|---|
| 1514 | ; module, which is assembled separately, gets merged.
|
|---|
| 1515 | ; So you won't find the string below in the generated binary.
|
|---|
| 1516 | ;
|
|---|
| 1517 | ; MOVED TO 6800h to create space and have a continuous
|
|---|
| 1518 | ; code block.
|
|---|
| 1519 | ; This makes the RU version buildable again with Tasm.
|
|---|
| 1520 | ;
|
|---|
| 1521 | ;org 04600h ; Sector 36-37
|
|---|
| 1522 |
|
|---|
| 1523 | ; Start of sector 36.
|
|---|
| 1524 | sos36:
|
|---|
| 1525 |
|
|---|
| 1526 |
|
|---|
| 1527 |
|
|---|
| 1528 | ; End of sector 37, yes this section is 2 sectors long.
|
|---|
| 1529 | eos37:
|
|---|
| 1530 |
|
|---|
| 1531 |
|
|---|
| 1532 |
|
|---|
| 1533 |
|
|---|
| 1534 |
|
|---|
| 1535 |
|
|---|
| 1536 |
|
|---|
| 1537 |
|
|---|
| 1538 | ;==============================================================================
|
|---|
| 1539 | ; Sector 38-x
|
|---|
| 1540 | ;
|
|---|
| 1541 | ; This section contains translatable texts.
|
|---|
| 1542 | ;
|
|---|
| 1543 | ;org 04A00h
|
|---|
| 1544 |
|
|---|
| 1545 | ; Start of sector 28.
|
|---|
| 1546 | sos38:
|
|---|
| 1547 |
|
|---|
| 1548 | b_txtother:
|
|---|
| 1549 | Include TEXT/TXTOTHER.ASM ; All translateable Text-Strings
|
|---|
| 1550 | size_txtother = $-b_txtother
|
|---|
| 1551 |
|
|---|
| 1552 | b_txtmenus:
|
|---|
| 1553 | Include TEXT/TXTMENUS.ASM ; All translateable Menu-text
|
|---|
| 1554 | size_txtmenus = $-b_txtmenus
|
|---|
| 1555 |
|
|---|
| 1556 | b_charset:
|
|---|
| 1557 | Include TEXT/CHARSET.ASM ; Special Video Charsets (if needed)
|
|---|
| 1558 | size_charset = $-b_charset
|
|---|
| 1559 |
|
|---|
| 1560 | b_conv:
|
|---|
| 1561 | Include REGULAR/CONV.ASM ; Various conversion routines
|
|---|
| 1562 | size_conv = $-b_conv
|
|---|
| 1563 |
|
|---|
| 1564 | b_virus:
|
|---|
| 1565 | Include SPECIAL/VIRUS.ASM ; Virus Detection / Anti-Virus
|
|---|
| 1566 | size_virus = $-b_virus
|
|---|
| 1567 | ; [Linux support removed since v1.02]
|
|---|
| 1568 | ;Include SPECIAL/FAT16.ASM ; FAT-16 Support
|
|---|
| 1569 | ;Include SPECIAL/LINUX.ASM ; Linux Kernel Support
|
|---|
| 1570 | b_billsuxx:
|
|---|
| 1571 | Include SPECIAL/F00K/BILLSUXX.ASM ; Extended Partition - Microsoft-Hack
|
|---|
| 1572 | size_billsuxx = $-b_billsuxx
|
|---|
| 1573 |
|
|---|
| 1574 | b_sound:
|
|---|
| 1575 | Include SPECIAL/SOUND.ASM ; Sound
|
|---|
| 1576 | size_sound = $-b_sound
|
|---|
| 1577 |
|
|---|
| 1578 | b_apm:
|
|---|
| 1579 | Include SPECIAL/APM.ASM ; Power Managment Support
|
|---|
| 1580 | size_apm = $-b_apm
|
|---|
| 1581 |
|
|---|
| 1582 | b_fx:
|
|---|
| 1583 | Include SPECIAL/FX.ASM ; l33t Cooper-Bars/Scrolling <bg>
|
|---|
| 1584 | size_fx = $-b_fx
|
|---|
| 1585 |
|
|---|
| 1586 |
|
|---|
| 1587 | ;
|
|---|
| 1588 | ; Let's make this always the last module in this section.
|
|---|
| 1589 | ;
|
|---|
| 1590 | Include BLDDATE.ASM ; Build Date generated by _build.cmd
|
|---|
| 1591 |
|
|---|
| 1592 | ; End of sector x depending on size of translatable texts.
|
|---|
| 1593 | eosx:
|
|---|
| 1594 |
|
|---|
| 1595 |
|
|---|
| 1596 |
|
|---|
| 1597 | CODE_END:
|
|---|
| 1598 |
|
|---|
| 1599 | ;org 06A00h - 4
|
|---|
| 1600 | db 'BABE'
|
|---|
| 1601 |
|
|---|
| 1602 | ;org 06A00h
|
|---|
| 1603 | db 'FACE'
|
|---|
| 1604 |
|
|---|
| 1605 | ;
|
|---|
| 1606 | ; This is the AiR-BOOT MBR-Protection Image.
|
|---|
| 1607 | ; 04600 / 200h = 34h = 52d sectors are before this point.
|
|---|
| 1608 | ; The stuff generated here gets overwritten when the MBR_PROT.ASM
|
|---|
| 1609 | ; module, which is assembled separately, gets merged.
|
|---|
| 1610 | ; So you won't find the string below in the generated binary.
|
|---|
| 1611 | ;
|
|---|
| 1612 | here = $
|
|---|
| 1613 | org 06800h
|
|---|
| 1614 | check_overlap here
|
|---|
| 1615 |
|
|---|
| 1616 | MBR_Protection db 'AiR-BOOT MBR-Protection Image'
|
|---|
| 1617 | ; Hardcoded to 1k (1024 bytes)
|
|---|
| 1618 | db 1024-($-MBR_Protection) dup(0)
|
|---|
| 1619 |
|
|---|
| 1620 |
|
|---|
| 1621 | ;CODE_SEG ENDS
|
|---|
| 1622 |
|
|---|
| 1623 | ;DATA_SEG SEGMENT USE16 PUBLIC 'CODE'
|
|---|
| 1624 |
|
|---|
| 1625 | ;==============================================================================
|
|---|
| 1626 | ; Sector 55
|
|---|
| 1627 |
|
|---|
| 1628 | ;
|
|---|
| 1629 | ; This section contains the AiR-BOOT configuration.
|
|---|
| 1630 | ; Note that it has a version that should be updated
|
|---|
| 1631 | ; when stuff is added.
|
|---|
| 1632 | ; Also add stuff to the end so that offsets of other
|
|---|
| 1633 | ; variables remain vaild.
|
|---|
| 1634 | ;
|
|---|
| 1635 | here = $
|
|---|
| 1636 | org 06C00h
|
|---|
| 1637 | check_overlap here
|
|---|
| 1638 | sos55:
|
|---|
| 1639 |
|
|---|
| 1640 |
|
|---|
| 1641 |
|
|---|
| 1642 | Configuration:
|
|---|
| 1643 | ; THERE IS AN INVISIBLE CHAR HERE !!
|
|---|
| 1644 | ; Your editor may not display the invisible
|
|---|
| 1645 | ; character at the end if the 'AiRCFG-TABLE'
|
|---|
| 1646 | ; string. When this character get's deleted,
|
|---|
| 1647 | ; AiR-BOOT will not function because it cannot
|
|---|
| 1648 | ; find the config-signature which includes this
|
|---|
| 1649 | ; invisible character. The code is: 0x0ad.
|
|---|
| 1650 | db 'AiRCFG-TABLE'
|
|---|
| 1651 | db 01h, 07h, 'U' ; "Compressed" ID String
|
|---|
| 1652 | ; This is now version 1.07 to have it in sync with
|
|---|
| 1653 | ; the new code version for eCS.
|
|---|
| 1654 | ; Version 1.02 was for code 1.06, 1.03 was internal
|
|---|
| 1655 | ; and 1.04,1.05 and 1.06 do not exist.
|
|---|
| 1656 | ; It is not required for the config to have the
|
|---|
| 1657 | ; same version as the code, so in the future
|
|---|
| 1658 | ; the code version might be higher than the
|
|---|
| 1659 | ; config version if there are no changes to the latter.
|
|---|
| 1660 |
|
|---|
| 1661 | CFG_LastTimeEditLow dw 0 ; Last Time Edited Stamp (will incr every setup)
|
|---|
| 1662 | CFG_LastTimeEditHi dw 0 ; second 16 bit part...
|
|---|
| 1663 |
|
|---|
| 1664 | CFG_CheckConfig dw 0 ; Check-Sum for Configuration
|
|---|
| 1665 |
|
|---|
| 1666 | CFG_Partitions db 0 ; Count of partitions in IPT
|
|---|
| 1667 | db 0 ; Was BootParts - Removed since v0.28b
|
|---|
| 1668 | CFG_PartDefault db 0 ; Default-Partition (Base=0)
|
|---|
| 1669 |
|
|---|
| 1670 | CFG_PartLast db 0 ; Which Partition was booted last time ? (Base=0)
|
|---|
| 1671 | CFG_TimedBoot db 0 ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
|
|---|
| 1672 | CFG_TimedSecs db 15 ; Timed Boot - How Many Seconds Till Boot
|
|---|
| 1673 | CFG_TimedDelay dw 123 ; Timed Boot - Delay
|
|---|
| 1674 | CFG_TimedBootLast db 1 ; Timed Boot - Boot From Last Drive Booted From
|
|---|
| 1675 | CFG_RememberBoot db 1 ; Remember Manual Boot Choice
|
|---|
| 1676 | CFG_RememberTimed db 0 ; Remember if Timed Boot (if both disabled: Boot Default)
|
|---|
| 1677 | CFG_IncludeFloppy db 1 ; Include Floppy Drives in Boot-Menu
|
|---|
| 1678 | CFG_BootMenuActive db 1 ; Display Boot-Menu (if Disabled: Boot Default)
|
|---|
| 1679 | ; v0.29+ -> 2 - Detailed Bootmenu
|
|---|
| 1680 | CFG_PartitionsDetect db 1 ; Autodetect New Partitions (Auto-Add!)
|
|---|
| 1681 | CFG_PasswordSetup db 0 ; Ask Password when entering Setup
|
|---|
| 1682 | CFG_PasswordSystem db 0 ; Ask Password when booting System
|
|---|
| 1683 | CFG_PasswordChangeBoot db 0 ; Ask Password when changing boot partition
|
|---|
| 1684 | CFG_ProtectMBR db 0 ; Protect MBR via TSR ?
|
|---|
| 1685 | CFG_IgnoreWriteToMBR db 0 ; Just ignore writes to MBR, otherwise crash
|
|---|
| 1686 | CFG_FloppyBootGetName db 0 ; Gets floppy name for display purposes
|
|---|
| 1687 | CFG_DetectVirus db 0 ; Detect Virus ?
|
|---|
| 1688 | CFG_DetectStealth db 0 ; Detect Stealth-Virus ?
|
|---|
| 1689 | CFG_DetectVIBR db 0 ; Detect BootRecord-Virus ?
|
|---|
| 1690 | CFG_AutoEnterSetup db 0 ; Automatic Enter Setup (first install!)
|
|---|
| 1691 | CFG_MasterPassword dw 0101Fh ; Encoded Password (this is just CR)
|
|---|
| 1692 | dw 07A53h
|
|---|
| 1693 | dw 0E797h
|
|---|
| 1694 | dw 0A896h
|
|---|
| 1695 | CFG_BootPassword dw 0101Fh ; Another CR... ;-)
|
|---|
| 1696 | dw 07A53h
|
|---|
| 1697 | dw 0E797h
|
|---|
| 1698 | dw 0A896h
|
|---|
| 1699 | db 0 ; Rude-Protection - Removed since v0.28b
|
|---|
| 1700 | CFG_LinuxRootPartition db 0 ; Linux Root Partition (Base=0)
|
|---|
| 1701 | CFG_TimedKeyHandling db 0 ; Timed Key Handling (for Timed Boot)
|
|---|
| 1702 | ; 0 - Do Nothing
|
|---|
| 1703 | ; 1 - Reset Time
|
|---|
| 1704 | ; 2 - Stop Time
|
|---|
| 1705 | CFG_MakeSound db 0 ; Should be clear ;)
|
|---|
| 1706 | CFG_FloppyBootGetTimer db 0 ; Floppy Name will get updated every 2 secs
|
|---|
| 1707 | CFG_ResumeBIOSbootSeq db 0 ; If BIOS Boot Sequence should be resumed
|
|---|
| 1708 | ; 0 - Disabled
|
|---|
| 1709 | ; 1 - CD-ROM
|
|---|
| 1710 | ; 2 - Network
|
|---|
| 1711 | ; 3 - ZIP/LS120
|
|---|
| 1712 | CFG_CooperBars db 0 ; If Cooper Bars should be shown
|
|---|
| 1713 | CFG_LinuxCommandLine db 75 dup (0) ; Linux Command Line
|
|---|
| 1714 | CFG_LinuxKrnlPartition db 0FFh ; FAT-16 Linux Kernel Partition (Base=0)
|
|---|
| 1715 | ; FFh -> Disabled
|
|---|
| 1716 | CFG_LinuxDefaultKernel db 'DEFAULT', 4 dup (32), 0 ; Default Kernel Name
|
|---|
| 1717 | CFG_LinuxLastKernel db 11 dup (32), 0 ; Last-Booted Kernel Name
|
|---|
| 1718 | CFG_ExtPartitionMShack db 0 ; Extended Partition M$-Hack Global Enable
|
|---|
| 1719 | CFG_AutomaticBoot db 0 ; Automatic Booting (only one bootup)
|
|---|
| 1720 | CFG_PartAutomatic db 0 ; Partition-No for automatic booting
|
|---|
| 1721 | CFG_ForceLBAUsage db 1 ; LBA-BIOS-API forced on any HDD I/O
|
|---|
| 1722 | CFG_IgnoreLVM db 0 ; Ignores any LVM-Information
|
|---|
| 1723 |
|
|---|
| 1724 |
|
|---|
| 1725 | ;
|
|---|
| 1726 | ; THERE IS ROOM RESERVED HERE FOR MORE VARIABLES
|
|---|
| 1727 | ;
|
|---|
| 1728 |
|
|---|
| 1729 | ; 6cae
|
|---|
| 1730 | eoc:
|
|---|
| 1731 |
|
|---|
| 1732 |
|
|---|
| 1733 |
|
|---|
| 1734 | ; Allways have the name of the installation volume
|
|---|
| 1735 | ; at this offset.
|
|---|
| 1736 | ; So future config changes will not break auto-install.
|
|---|
| 1737 | here = $
|
|---|
| 1738 | org 06D00h
|
|---|
| 1739 | check_overlap here
|
|---|
| 1740 |
|
|---|
| 1741 | soiv:
|
|---|
| 1742 |
|
|---|
| 1743 | ; SET(A)BOOT stores the volume name of the eCS system being installed here.
|
|---|
| 1744 | ; It is truncated to 11 chars because AiR-BOOT currently does not support
|
|---|
| 1745 | ; longer labelnames. The name is also capitalized.
|
|---|
| 1746 | ;eCS_InstallVolume db 12 dup (0)
|
|---|
| 1747 | ;eCS_InstallVolume db 'HIGHLOG' ,0
|
|---|
| 1748 | eCS_InstallVolume db 0,'NOPHASEONE' ,0
|
|---|
| 1749 | ;eCS_InstallVolume db 'ECS-MIDDLE',0,0
|
|---|
| 1750 | ;eCS_InstallVolume db 'ECS-HIGH',0,0,0,0
|
|---|
| 1751 | ;eCS_InstallVolume db 'ECS-HIGH',0,'NO',0
|
|---|
| 1752 |
|
|---|
| 1753 |
|
|---|
| 1754 | ; 6d0c
|
|---|
| 1755 | ; End of sector 55.
|
|---|
| 1756 | eos55:
|
|---|
| 1757 |
|
|---|
| 1758 |
|
|---|
| 1759 |
|
|---|
| 1760 |
|
|---|
| 1761 |
|
|---|
| 1762 |
|
|---|
| 1763 | ;
|
|---|
| 1764 | ; THERE IS ROOM RESERVED HERE FOR MORE VARIABLES
|
|---|
| 1765 | ;
|
|---|
| 1766 |
|
|---|
| 1767 |
|
|---|
| 1768 |
|
|---|
| 1769 | ;
|
|---|
| 1770 | ; 06DABh - 06C00h = 01ABh = 427 bytes.
|
|---|
| 1771 | ; Entries allocated down from 06E00 boundary.
|
|---|
| 1772 | ;
|
|---|
| 1773 | here = $
|
|---|
| 1774 | org 06DABh ; 427 Boundry
|
|---|
| 1775 | check_overlap here
|
|---|
| 1776 | sosvs:
|
|---|
| 1777 |
|
|---|
| 1778 | ; (432 - 5 = 427)
|
|---|
| 1779 | AutoDrvLetter db 0
|
|---|
| 1780 | AutoDrvLetterSerial dd 0
|
|---|
| 1781 |
|
|---|
| 1782 | ; This entry is also 34 bytes long (466 - 34 = 432)
|
|---|
| 1783 | BIOScontIPTentry:
|
|---|
| 1784 | db 0, 0, 0, 0, ' '
|
|---|
| 1785 | db 0, 0FEh, Flags_Bootable
|
|---|
| 1786 | dw 0 ; No Checksum :)
|
|---|
| 1787 | db 0, 1, 0
|
|---|
| 1788 | db 0, 1, 0 ; Location of Partition/Boot Record
|
|---|
| 1789 | dd 0, 0
|
|---|
| 1790 |
|
|---|
| 1791 | ; VIR variables are for the AiR-BOOT Anti Virus Code
|
|---|
| 1792 | ; Most of them are backups of Interrupt Points, so we can check, if a
|
|---|
| 1793 | ; stealth virus is on-line, we can intercept its call.
|
|---|
| 1794 | ; Normal (non stealth) virus are trapped simply by rereading the MBR sector.
|
|---|
| 1795 | ; If a virus is found, we will restore MBR from Sektor 60/62 and stop the system
|
|---|
| 1796 | ; from working, so the user has to press reset. That's saver than a Reboot.
|
|---|
| 1797 | ;
|
|---|
| 1798 | ; If a virus is found on the partition to boot, the system will ONLY halt,
|
|---|
| 1799 | ; nothing more, because we can not remove it. The user shall do it :)
|
|---|
| 1800 | ; Those viruses are detected via a real nasty method...Checksum-Checking of the
|
|---|
| 1801 | ; boot-record, which is to be executed. If it does not match the one in our
|
|---|
| 1802 | ; internal partition table, we will stop. You may however switch this detection
|
|---|
| 1803 | ; off or just reset it by switching 'VIBR Detection'.
|
|---|
| 1804 |
|
|---|
| 1805 | ; 478 - 12 = 466 ; 466 Sub-Part
|
|---|
| 1806 | CFG_VIR_INT08 dd 0 ; pointer to saved 08h entry point
|
|---|
| 1807 | CFG_VIR_INT13 dd 0 ; pointer to saved 13h entry point
|
|---|
| 1808 | CFG_VIR_INT1C dd 0 ; pointer to saved 1Ch entry point
|
|---|
| 1809 |
|
|---|
| 1810 | ; 478 Boundry (512-34)
|
|---|
| 1811 | ; This entry is also 34 bytes long
|
|---|
| 1812 | FloppyIPTentry db 0, 0, 0, 0, 'FloppyDrive'
|
|---|
| 1813 | db 0, 0FFh, Flags_Bootable
|
|---|
| 1814 | dw 0 ; No Checksum :)
|
|---|
| 1815 | db 0, 1, 0
|
|---|
| 1816 | db 0, 1, 0 ; Location of Partition/Boot Record
|
|---|
| 1817 | dd 0, 0
|
|---|
| 1818 | ;------------------------------------------------------------------------------
|
|---|
| 1819 |
|
|---|
| 1820 | eosvs:
|
|---|
| 1821 |
|
|---|
| 1822 |
|
|---|
| 1823 |
|
|---|
| 1824 |
|
|---|
| 1825 | ;org 06E00h ; Sector 56-57
|
|---|
| 1826 |
|
|---|
| 1827 | here = $
|
|---|
| 1828 | org image_size - 0a00h - (image_size - image_size_60secs)
|
|---|
| 1829 | check_overlap here
|
|---|
| 1830 |
|
|---|
| 1831 | sos56:
|
|---|
| 1832 |
|
|---|
| 1833 |
|
|---|
| 1834 |
|
|---|
| 1835 | ; Rousseau: This is the start of the AiR-BOOT IPT
|
|---|
| 1836 |
|
|---|
| 1837 | PartitionTable: ; no-partitions detected... :]
|
|---|
| 1838 | ; db 1, 0, 0, 0, 'Harddisc 1'
|
|---|
| 1839 | ; db 0, 0FFh, Flags_BootAble
|
|---|
| 1840 | ; dw 0 ; No Checksum :)
|
|---|
| 1841 | ; db 0, 0, 1
|
|---|
| 1842 | ; db 0, 0, 1 ; Location of Partition/Boot Record
|
|---|
| 1843 | ; dd 0, 0
|
|---|
| 1844 |
|
|---|
| 1845 | ; Format is:
|
|---|
| 1846 | ;============
|
|---|
| 1847 | ; SerialNumber * 4
|
|---|
| 1848 | ; PartitionName * 11
|
|---|
| 1849 | ; Drive * 1
|
|---|
| 1850 | ; SystemID * 1 (means the partition type)
|
|---|
| 1851 | ; Flags * 1
|
|---|
| 1852 | ; Checksum * 2 (for virus checking)
|
|---|
| 1853 | ; LocationBegin * 3 (where the partition begins)
|
|---|
| 1854 | ; LocationPartTab * 3 (where the partition table is)
|
|---|
| 1855 | ; AbsoluteBegin * 4 (where the partition begins, in absolute sectors)
|
|---|
| 1856 | ; AbsolutePartTab * 4 (where the partition table is, in absolute sectors)
|
|---|
| 1857 | ; --------------------> 34 Bytes (total maximum partition-entries = 30)
|
|---|
| 1858 |
|
|---|
| 1859 | db (LocIPT_MaxPartitions * LocIPT_LenOfIPT) dup (0)
|
|---|
| 1860 |
|
|---|
| 1861 |
|
|---|
| 1862 | ; 73fa !!!!!!!!!!!!!!
|
|---|
| 1863 | eos56:
|
|---|
| 1864 |
|
|---|
| 1865 |
|
|---|
| 1866 |
|
|---|
| 1867 |
|
|---|
| 1868 | ;org 071F6h
|
|---|
| 1869 | ; 73F6
|
|---|
| 1870 |
|
|---|
| 1871 | ; No need to check overlap here because this string will
|
|---|
| 1872 | ; be overwritten if the maximum partition count is reached.
|
|---|
| 1873 | ; So this is not a critical boundary.
|
|---|
| 1874 | org image_size - 600h - (image_size - image_size_60secs) / 2 - 0ah
|
|---|
| 1875 |
|
|---|
| 1876 | soiptsig:
|
|---|
| 1877 | db 'AiRBOOTPAR' ; 1K internal partition table
|
|---|
| 1878 |
|
|---|
| 1879 |
|
|---|
| 1880 |
|
|---|
| 1881 | eoiptsig:
|
|---|
| 1882 |
|
|---|
| 1883 |
|
|---|
| 1884 |
|
|---|
| 1885 | ;------------------------------------------------------------------------------
|
|---|
| 1886 | ;org 07200h ; Sector 58
|
|---|
| 1887 |
|
|---|
| 1888 | here = $
|
|---|
| 1889 | org image_size - 600h - (image_size - image_size_60secs) / 2
|
|---|
| 1890 | check_overlap here
|
|---|
| 1891 | soipt:
|
|---|
| 1892 | sos58:
|
|---|
| 1893 | ; 7400h
|
|---|
| 1894 | HidePartitionTable db (LocIPT_MaxPartitions * LocHPT_LenOfHPT) dup (0FFh)
|
|---|
| 1895 | ; Format is:
|
|---|
| 1896 | ;============
|
|---|
| 1897 | ; PartitionPtr : BYTE * 30
|
|---|
| 1898 | ; --------------------> 30 Bytes * 45
|
|---|
| 1899 |
|
|---|
| 1900 | DriveLetters db LocIPT_MaxPartitions dup (0)
|
|---|
| 1901 | ; Format is:
|
|---|
| 1902 | ;============
|
|---|
| 1903 | ; Drive-Letter : BYTE (80h-C:, 81h-D:)
|
|---|
| 1904 | ; --------------------> 1 Byte * 45
|
|---|
| 1905 |
|
|---|
| 1906 | ;
|
|---|
| 1907 | ; There is some room here, but this is the configuration section.
|
|---|
| 1908 | ; So not available for code.
|
|---|
| 1909 | ;
|
|---|
| 1910 |
|
|---|
| 1911 | eos58:
|
|---|
| 1912 | eoipt:
|
|---|
| 1913 |
|
|---|
| 1914 |
|
|---|
| 1915 |
|
|---|
| 1916 |
|
|---|
| 1917 | ;org 075F6h
|
|---|
| 1918 | ; No need to check overlap here because this string will
|
|---|
| 1919 | ; be overwritten if the maximum partition count is reached.
|
|---|
| 1920 | ; So this is not a critical boundary.
|
|---|
| 1921 | org image_size - 200h -0ah
|
|---|
| 1922 | check_overlap here
|
|---|
| 1923 |
|
|---|
| 1924 | sohidsig:
|
|---|
| 1925 | ;
|
|---|
| 1926 | db 'AiRBOOTHID' ; 1K internal Hide-partition table
|
|---|
| 1927 |
|
|---|
| 1928 |
|
|---|
| 1929 | eohidsig:
|
|---|
| 1930 |
|
|---|
| 1931 |
|
|---|
| 1932 |
|
|---|
| 1933 |
|
|---|
| 1934 |
|
|---|
| 1935 |
|
|---|
| 1936 | ;------------------------------------------------------------------------------
|
|---|
| 1937 | ;org 07600h
|
|---|
| 1938 |
|
|---|
| 1939 | here = $
|
|---|
| 1940 | org image_size - 200h ; Sector 60
|
|---|
| 1941 | check_overlap here
|
|---|
| 1942 |
|
|---|
| 1943 | sohid:
|
|---|
| 1944 | sos60:
|
|---|
| 1945 |
|
|---|
| 1946 | MBR_BackUpMBR db 'AiR-BOOT MBR-BackUp - Just to fill this sector with something',0
|
|---|
| 1947 | AirBootRocks db 'AiR-BOOT Rocks!',0
|
|---|
| 1948 |
|
|---|
| 1949 | db 512-($-sohid)-2 dup(0)
|
|---|
| 1950 |
|
|---|
| 1951 | eos60:
|
|---|
| 1952 | eohid:
|
|---|
| 1953 |
|
|---|
| 1954 |
|
|---|
| 1955 |
|
|---|
| 1956 |
|
|---|
| 1957 | ;org 077FEh
|
|---|
| 1958 |
|
|---|
| 1959 | here = $
|
|---|
| 1960 | org image_size - 2
|
|---|
| 1961 | check_overlap here
|
|---|
| 1962 | dw 0BABEh
|
|---|
| 1963 |
|
|---|
| 1964 | eoab:
|
|---|
| 1965 |
|
|---|
| 1966 |
|
|---|
| 1967 | IFDEF SEGMENTED
|
|---|
| 1968 | ;
|
|---|
| 1969 | ; End of AiR-BOOT code and data.
|
|---|
| 1970 | ;
|
|---|
| 1971 |
|
|---|
| 1972 | IMAGE ENDS
|
|---|
| 1973 |
|
|---|
| 1974 | ;DATA_SEG ENDS
|
|---|
| 1975 |
|
|---|
| 1976 | ;
|
|---|
| 1977 | ; Uninitialized Data (BSS)
|
|---|
| 1978 | ;
|
|---|
| 1979 | VOLATILE SEGMENT USE16 PUBLIC 'BSS'
|
|---|
| 1980 |
|
|---|
| 1981 | ENDIF
|
|---|
| 1982 |
|
|---|
| 1983 | sobss:
|
|---|
| 1984 | ;------------------------------------------------------------------------------
|
|---|
| 1985 | ;
|
|---|
| 1986 | ; Removed org for BSS data to be more compatible
|
|---|
| 1987 | ; with segment-concatenated layout.
|
|---|
| 1988 | ;
|
|---|
| 1989 | ;org 0A000h ; Uninitialized
|
|---|
| 1990 |
|
|---|
| 1991 |
|
|---|
| 1992 | ; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
|
|---|
| 1993 | BeginOfVariables:
|
|---|
| 1994 | PartitionSector db 512 dup (?) ; Temporary Sector for Partition
|
|---|
| 1995 | JfsPBR db 512 dup (?) ; Temporary Sector for JFS PBR writeback
|
|---|
| 1996 | LVMSector db 512 dup (?) ; Temporary Sector for LVM
|
|---|
| 1997 | TmpSector db 512 dup (?) ; Temporary Sector
|
|---|
| 1998 |
|
|---|
| 1999 | ; Everything used to build a new IPT and reference it to the old one
|
|---|
| 2000 | NewPartTable db 1536 dup (?) ; New Partition Table
|
|---|
| 2001 | NewHidePartTable db partition_count * LocHPT_LenOfHPT dup (?) ; New Hide-Partition Table
|
|---|
| 2002 | NewDriveLetters db partition_count dup (?) ; Logical Drive-Letters
|
|---|
| 2003 |
|
|---|
| 2004 | PartitionSizeTable db partition_count * 6 dup (?) ; Size-Table (6 bytes per partition)
|
|---|
| 2005 | PartitionPointers dw 52 dup (?) ; Maximum is 52 entries till now
|
|---|
| 2006 | PartitionPointerCount db ? ; Count of total Partition Pointers
|
|---|
| 2007 | PartitionXref db partition_count dup (?) ; X-Reference Table
|
|---|
| 2008 | PartitionVolumeLetters db partition_count dup (?) ; Volume-Letters
|
|---|
| 2009 | ; 0 - no LVM support
|
|---|
| 2010 | ; 1 - LVM support, but no letter
|
|---|
| 2011 | ; 'C'-'Z' - assigned drive letter
|
|---|
| 2012 |
|
|---|
| 2013 | TotalHarddiscs db ? ; Total harddrives (by POST)
|
|---|
| 2014 | LBASwitchTable db 128 dup (?) ; Bit 25-18 for CHS/LBA Switching
|
|---|
| 2015 | NewPartitions db ? ; Freshly found partitions
|
|---|
| 2016 | ; Independent of SaveConfiguration
|
|---|
| 2017 |
|
|---|
| 2018 | VideoIO_Segment dw ? ; Segment for Video I/O
|
|---|
| 2019 |
|
|---|
| 2020 | ExtendedAbsPos dd ? ; Extended Partition Absolute Position
|
|---|
| 2021 | ExtendedAbsPosSet db ? ; If Absolute Position set
|
|---|
| 2022 |
|
|---|
| 2023 | CurPartition_Location dw 4 dup (?) ; Where did current partition come from?
|
|---|
| 2024 | CurIO_UseExtension db ? ; 1-Use INT 13h EXTENSIONS
|
|---|
| 2025 | ; (filled out by PreCrap)
|
|---|
| 2026 | CurIO_Scanning db ? ; 1-AiR-BOOT is scanning partitions
|
|---|
| 2027 | ; (for detailed error message)
|
|---|
| 2028 |
|
|---|
| 2029 | ; [Linux support removed since v1.02]
|
|---|
| 2030 | ;GotLinux db ? ; 1-Linux found
|
|---|
| 2031 |
|
|---|
| 2032 | Menu_EntrySelected db ? ; Which partition we boot this time...
|
|---|
| 2033 | Menu_UpperPart db ? ; Which number (Base=0) is the partition upper pos
|
|---|
| 2034 | Menu_AbsoluteX db ? ; Pos where Menu stuff starts
|
|---|
| 2035 | Menu_TotalParts db ? ; Copy of CFG_BootParts
|
|---|
| 2036 | Menu_TotalLines db ? ; Total Lines on Screen used for BootMenu
|
|---|
| 2037 | Menu_EntryDefault db ? ; Default Entry in filtered View
|
|---|
| 2038 | Menu_EntryLast db ? ; LastBooted Entry in filtered View
|
|---|
| 2039 | Menu_EntryAutomatic db ? ; Automatic Entry in filtered View
|
|---|
| 2040 | ; - All adjusted to menu locations
|
|---|
| 2041 |
|
|---|
| 2042 | PartSetup_UpperPart db ? ; Partition-Setup (like Menu_UpperPart)
|
|---|
| 2043 | PartSetup_ActivePart db ? ; Active Partition
|
|---|
| 2044 | PartSetup_HiddenUpper db ? ; (like Menu_UpperPart)
|
|---|
| 2045 | PartSetup_HiddenX db ? ; Pos for Hidden-Setup
|
|---|
| 2046 | PartSetup_HiddenAdd db ? ; Adjust for Hidden-Setup
|
|---|
| 2047 |
|
|---|
| 2048 | TimedBootEnable db ? ; Local Enable/Disable for timed boot
|
|---|
| 2049 | TimedTimeOut dd ? ; TimeOut Timer for TimedBoot (too much time here ;)
|
|---|
| 2050 | TimedSecondLeft db ? ; How many seconds are left till boom ?
|
|---|
| 2051 | TimedSecondBack db ? ; To get a modification noticed
|
|---|
| 2052 | TimedBootUsed db ? ; Timed Boot used for bootup ?
|
|---|
| 2053 | FloppyGetNameTimer dd ? ; Timer for Floppy-Get-Name
|
|---|
| 2054 | SETUP_KeysOnEntry db ? ; which Shift Status was there, when booting ?
|
|---|
| 2055 | SETUP_ExitEvent db ? ; Exit Event to end SETUP
|
|---|
| 2056 | TempPasswordEntry db 17 dup (?)
|
|---|
| 2057 | SETUP_OldPwd db 17 dup (?)
|
|---|
| 2058 | SETUP_NewPwd db 17 dup (?)
|
|---|
| 2059 | SETUP_VerifyPwd db 17 dup (?)
|
|---|
| 2060 | StartSoundPlayed db ?
|
|---|
| 2061 | ChangePartNameSave db ?
|
|---|
| 2062 |
|
|---|
| 2063 | FX_UseCount dw ?
|
|---|
| 2064 | FX_OverallTimer dw ?
|
|---|
| 2065 | FX_WideScrollerTimer dw ?
|
|---|
| 2066 | FX_WideScrollerCurPos dw ?
|
|---|
| 2067 | FX_WideScrollerSpeed db ?
|
|---|
| 2068 | FX_WideScrollerSpeedState db ?
|
|---|
| 2069 | FX_WideScrollerDirection db ?
|
|---|
| 2070 | FX_WideScrollerAbsDirection db ?
|
|---|
| 2071 | FX_WideScrollerBounceSpeed db ?
|
|---|
| 2072 | FX_CooperBarsTimer dw ?
|
|---|
| 2073 |
|
|---|
| 2074 | ; [Linux support removed since v1.02]
|
|---|
| 2075 | ;FAT16_Drive db ? ; FAT-16: Drive of FAT16-partition
|
|---|
| 2076 | ;FAT16_AbsPartitionBegin dd ? ; FAT-16: LBA Begin of Partition
|
|---|
| 2077 | ;FAT16_SecsPerCluster db ? ; FAT-16: Sectors Per Cluster
|
|---|
| 2078 | ;FAT16_NumOfRootEntries dw ? ; FAT-16: Number of Root Entries
|
|---|
| 2079 | ;FAT16_SecsPerFAT dw ? ; FAT-16: Sectors Per FAT
|
|---|
| 2080 | ;FAT16_AbsFATBegin dd ? ; FAT-16: LBA Begin of FAT
|
|---|
| 2081 | ;FAT16_AbsRootBegin dd ? ; FAT-16: LBA Begin of Root
|
|---|
| 2082 | ;FAT16_AbsClusterBegin dd ? ; FAT-16: LBA Begin of Clusters
|
|---|
| 2083 | ;FAT16_FATCacheSector db ? ; FAT-16: FAT-Sector No in Cache
|
|---|
| 2084 | ;FAT16_FATCache db 512 dup (?) ; FAT-16: FAT-Area Cache
|
|---|
| 2085 | ;
|
|---|
| 2086 | ;LINUX_KernelEntries db 680 dup (?) ; 34*20 -> Space for Kernel-Entries
|
|---|
| 2087 | ;LINUX_KernelNo db ? ; Total of Kernels in KernelEntries
|
|---|
| 2088 | ;LINUX_KernelSizeTable db 120 dup (?) ; Size-Table (6 bytes per kernel)
|
|---|
| 2089 | ;EndOfVariables:
|
|---|
| 2090 |
|
|---|
| 2091 | ; Dynamically Generated Tables - do not need to get initialized with NUL
|
|---|
| 2092 | FX_CooperColors db 672 dup (?) ; 7 cooper bars*96 - runtime calculated
|
|---|
| 2093 | FX_CooperState db 7 dup (?)
|
|---|
| 2094 | FX_SinusPos db 7 dup (?)
|
|---|
| 2095 | FX_CooperPos dw 7 dup (?)
|
|---|
| 2096 | CharsetTempBuffer db 4096 dup (?) ; Uninitialized Charset buffer
|
|---|
| 2097 | LVM_CRCTable dd 256 dup (?) ; LVM-CRC (->SPECiAL\LVM.asm)
|
|---|
| 2098 |
|
|---|
| 2099 |
|
|---|
| 2100 |
|
|---|
| 2101 | ;
|
|---|
| 2102 | ; Rousseau: added some stuff.
|
|---|
| 2103 | ;
|
|---|
| 2104 |
|
|---|
| 2105 |
|
|---|
| 2106 | ;EVEN
|
|---|
| 2107 | HugeDisk db MaxDisks dup(?)
|
|---|
| 2108 | TrueSecs dd MaxDisks dup(?)
|
|---|
| 2109 |
|
|---|
| 2110 | ; BIOS geometry of the boot-drive
|
|---|
| 2111 | ; Note that heads cannot be 256 due to legacy DOS/BIOS bug
|
|---|
| 2112 | ; If Int13X is supported those values are used, otherwise the legacy values.
|
|---|
| 2113 | BIOS_Cyls dd MaxDisks dup(?)
|
|---|
| 2114 | BIOS_Heads dd MaxDisks dup(?)
|
|---|
| 2115 | BIOS_Secs dd MaxDisks dup(?)
|
|---|
| 2116 | BIOS_Bytes dw MaxDisks dup(?)
|
|---|
| 2117 | BIOS_TotalSecs dq MaxDisks dup(?)
|
|---|
| 2118 |
|
|---|
| 2119 | ; LBA geometry of the boot-drive
|
|---|
| 2120 | ; Note that these values are taken from the BPB of a partition boot-record
|
|---|
| 2121 | LVM_Cyls dd MaxDisks dup(?)
|
|---|
| 2122 | LVM_Heads dd MaxDisks dup(?)
|
|---|
| 2123 | LVM_Secs dd MaxDisks dup(?)
|
|---|
| 2124 | LVM_Bytes dw MaxDisks dup(?)
|
|---|
| 2125 | LVM_TotalSecs dq MaxDisks dup(?)
|
|---|
| 2126 |
|
|---|
| 2127 | ; OS/2 geometry of the boot-drive
|
|---|
| 2128 | ; Note that these values are taken from the BPB of a partition boot-record
|
|---|
| 2129 | LOG_Cyls dd MaxDisks dup(?)
|
|---|
| 2130 | LOG_Heads dd MaxDisks dup(?)
|
|---|
| 2131 | LOG_Secs dd MaxDisks dup(?)
|
|---|
| 2132 | LOG_Bytes dw MaxDisks dup(?)
|
|---|
| 2133 | LOG_TotalSecs dq MaxDisks dup(?)
|
|---|
| 2134 |
|
|---|
| 2135 | ; Rousseau: moved here
|
|---|
| 2136 | EndOfVariables:
|
|---|
| 2137 |
|
|---|
| 2138 | ; Temporary buffer for 48h INT13X bios call
|
|---|
| 2139 | ; Word aligned
|
|---|
| 2140 | ;even
|
|---|
| 2141 | ;align 2
|
|---|
| 2142 |
|
|---|
| 2143 | ;db 1 dup(?)
|
|---|
| 2144 |
|
|---|
| 2145 | i13xbuf dw 1 dup (?) ; Size of the buffer;
|
|---|
| 2146 | ; this param *must* be present.
|
|---|
| 2147 | ; Code inserts it.
|
|---|
| 2148 | db 126 dup(?) ; The buffer itself.
|
|---|
| 2149 | i13xbuf_size = $-offset i13xbuf-2 ; Size of buffer
|
|---|
| 2150 | ; (excluding the size word at the start).
|
|---|
| 2151 |
|
|---|
| 2152 | eobss:
|
|---|
| 2153 |
|
|---|
| 2154 | IFDEF SEGMENTED
|
|---|
| 2155 | VOLATILE ENDS
|
|---|
| 2156 | ELSE
|
|---|
| 2157 | IMAGE ENDS
|
|---|
| 2158 | ENDIF
|
|---|
| 2159 | END AIR_BOOT
|
|---|
| 2160 |
|
|---|
| 2161 |
|
|---|
| 2162 |
|
|---|