| [29] | 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 | ;
|
|---|
| [7] | 18 |
|
|---|
| [30] | 19 | ; -------------------
|
|---|
| 20 | ; Rousseau: # Fixes #
|
|---|
| 21 | ; -------------------
|
|---|
| 22 | ; # Huge Drives and LVM #
|
|---|
| 23 | ; When using disks >512GB under eComStation, the drive geometry changes to
|
|---|
| 24 | ; 127 or 255 sectors per track. Since LVM-info is written at the last sector
|
|---|
| 25 | ; of a track, and AiR-BOOT uses the geometry of the MBR, it cannot find the
|
|---|
| 26 | ; LVM-info and the eCS partition / volume bootsector.
|
|---|
| 27 | ; This has been fixed.
|
|---|
| 28 | ; Now, when an eCS-partition is discovered and the drive is >512GB, AiR-BOOT
|
|---|
| 29 | ; will use the eCS geometry to locate the LVM-info and the bootsector.
|
|---|
| 30 | ;
|
|---|
| 31 | ; # Special loader handling #
|
|---|
| 32 | ; The special handling of partition boot-loaders has been enhanced to
|
|---|
| 33 | ; enable booting of legacy sysems on huge drives with or without OS/2
|
|---|
| 34 | ; extended geometry.
|
|---|
| 35 | ;
|
|---|
| 36 | ; # eComStation boot-through after phase 1 #
|
|---|
| 37 | ; A special functionality is implemented to directly boot the newly
|
|---|
| 38 | ; installed system ; when installing eCS without showing the Boot Menu,
|
|---|
| 39 | ; independant of user settings.
|
|---|
| 40 | ; This works in conjuntion with the OS/2 specific SETABOOT.EXE program,
|
|---|
| 41 | ; also part of this AiR-BOOT package.
|
|---|
| 42 | ;
|
|---|
| 43 | ; # Math, Debug, Conv and Aux modules #
|
|---|
| 44 | ; These are used for 32-bit arithmatic on 16-bit code,
|
|---|
| 45 | ; debug the booting process, converting between data-types
|
|---|
| 46 | ; and outputting log-data to the com-port.
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| [7] | 50 | ;---------------------------------------------------------------------------
|
|---|
| 51 | ; AiR-BOOT / MAIN-CODE
|
|---|
| 52 | ;---------------------------------------------------------------------------
|
|---|
| [30] | 53 | ;
|
|---|
| [7] | 54 |
|
|---|
| [30] | 55 |
|
|---|
| 56 | ; ----------------------------
|
|---|
| 57 | ; Rousseau: # JUMPS disabled #
|
|---|
| 58 | ; ----------------------------
|
|---|
| 59 | ; We actually don't want to use this directive because it generates extra
|
|---|
| 60 | ; NOP instructions that we can do without.
|
|---|
| 61 | ; Relative conditional jumps that are out-of-range are manually reworked by
|
|---|
| 62 | ; skipping an unconditional jump to the target on base of complementary
|
|---|
| 63 | ; condition logic and temporary labels.
|
|---|
| 64 | ; TASM also has a bug in that when the .ERR2 directive is used when the .386 directive
|
|---|
| 65 | ; is in effect, the JUMPS directive is also active and cannot be turned off.
|
|---|
| 66 | ; NOJUMPS seems to have no effect in this situation.
|
|---|
| 67 | ; In this case 4 NOP instructions are generated after forward referencing jump
|
|---|
| 68 | ; instructions, to allow for automatic recoding by TASM.
|
|---|
| 69 | ; This seems to be a TASM bug. (v2,v3,v4, dunno v5)
|
|---|
| 70 | ;
|
|---|
| 71 | ;JUMPS
|
|---|
| 72 | ;
|
|---|
| 73 |
|
|---|
| 74 | ;
|
|---|
| 75 | ; If defined then each module is prefixed with it's name.
|
|---|
| 76 | ; This is used for debugging purposes.
|
|---|
| 77 | ; It should be off in release code.
|
|---|
| 78 | ;
|
|---|
| 79 | ;ModuleNames equ 1
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 | ;
|
|---|
| 84 | ; The first harddisk is BIOS coded 80h.
|
|---|
| 85 | ; This makes a total of 128 disk could be supported using this coding.
|
|---|
| 86 | ; This value is used to store disk-information and this info is allocated
|
|---|
| 87 | ; in the BSS.
|
|---|
| 88 | ;
|
|---|
| 89 | MaxDisks equ 16
|
|---|
| 90 |
|
|---|
| 91 | ;
|
|---|
| 92 | ; If defined then include DEBUG.ASM and output debug-info to serial-port.
|
|---|
| 93 | ;
|
|---|
| 94 | AuxDebug equ 1
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 | BiosComPort equ 0 ; Com-port for debugging, 0 is disabled
|
|---|
| 98 |
|
|---|
| 99 | ; bits 7-5 = datarate (000=110,001=150,010=300,011=600,100=1200,101=2400,110=4800,111=9600 bps)
|
|---|
| 100 | ; bits 4-3 = parity (00 or 10 = none, 01 = odd, 11 = even)
|
|---|
| 101 | ; bit 2 = stop-bits (set = 2 stop-bits, clear = 1 stop-bit)
|
|---|
| 102 | ; bits 1-0 = data-bits (00 = 5, 01 = 6, 10 = 7, 11 = 8)
|
|---|
| 103 | AuxInitParms equ 11100011b ; 9600 bps, no parity, 1 stop-bit, 8 bits per char
|
|---|
| 104 |
|
|---|
| 105 | BIOS_AuxParmsDefault equ (AuxInitParms SHL 8) OR BiosComPort ; Default word value for offset 77FEh (BIOS_AuxParms)
|
|---|
| 106 | ;
|
|---|
| [7] | 107 | ; If ReleaseCode is not defined, it will produce debug-able code...
|
|---|
| [30] | 108 | ;
|
|---|
| 109 | ReleaseCode equ -1 ; Rousseau: this should be replaced
|
|---|
| 110 | ; by the complementary debug logic some day.
|
|---|
| 111 | ; Then instead of being on or off it would be
|
|---|
| 112 | ; more handy to use positive integers with each
|
|---|
| 113 | ; higher number increasing the debug functionality.
|
|---|
| [7] | 114 |
|
|---|
| [30] | 115 | ;
|
|---|
| [7] | 116 | ; All Special Equs for this project
|
|---|
| [30] | 117 | ;
|
|---|
| [7] | 118 |
|
|---|
| [30] | 119 | ; Use different addresses depending on whether in pre-boot or debug environment.
|
|---|
| [7] | 120 | IFDEF ReleaseCode
|
|---|
| [30] | 121 | StartBaseSeg equ 00000h ; Pre-boot, so we are in low memory
|
|---|
| 122 | StartBasePtr equ 07C00h ; BIOS starts our MBR at 0:7C00
|
|---|
| [7] | 123 | ELSE
|
|---|
| [30] | 124 | StartBaseSeg equ 03A98h ; Adjust to DOS segment ; Rousseau: where does this value come from ? (should be CS; rectified in actual code by ignoring this value)
|
|---|
| 125 | StartBasePtr equ 00100h ; We are a .com file, some DOS is active
|
|---|
| [7] | 126 | ENDIF
|
|---|
| 127 |
|
|---|
| [30] | 128 | ; Address labels after code-move
|
|---|
| 129 | BootBaseSeg equ 8000h ; Pre-boot, somewhere in the low 640K
|
|---|
| 130 | BootBasePtr equ 0h ; We put our MBR to this location
|
|---|
| 131 | BootBaseExec equ BootBasePtr+offset MBR_RealStart
|
|---|
| 132 | StackSeg equ 7000h ; Put the stack below the code
|
|---|
| 133 |
|
|---|
| 134 | ; Video pages, no INT 10h is used for menu-drawing etc.
|
|---|
| [7] | 135 | VideoIO_Page0 equ 0B800h
|
|---|
| 136 | VideoIO_Page1 equ 0B900h
|
|---|
| 137 | VideoIO_Page2 equ 0BA00h
|
|---|
| 138 | VideoIO_Page4 equ 0BC00h
|
|---|
| 139 | VideoIO_FXSegment equ 0A000h
|
|---|
| 140 |
|
|---|
| [30] | 141 | ; Include
|
|---|
| [29] | 142 | Include ..\INCLUDE\asm.inc
|
|---|
| [30] | 143 | ;Include ..\INCLUDE\DOS\airboot.inc ; does not exist anymore
|
|---|
| [7] | 144 |
|
|---|
| [30] | 145 | ; Special line-drawing characters
|
|---|
| [7] | 146 | TextChar_WinLineRight equ 0C4h ; 'Ä'
|
|---|
| 147 | TextChar_WinLineDown equ 0B3h ; '³'
|
|---|
| 148 | TextChar_WinRep1 equ 0D1h ; 'Ñ'
|
|---|
| 149 | TextChar_WinRep2 equ 0C5h ; 'Å'
|
|---|
| 150 | TextChar_WinRep3 equ 0CFh ; 'Ï'
|
|---|
| 151 | TextChar_WinRep4 equ 0B5h ; 'µ'
|
|---|
| 152 | TextChar_WinRep5 equ 0C6h ; 'Æ'
|
|---|
| 153 | TextChar_WinRep6 equ 0D8h ; 'Ø'
|
|---|
| 154 |
|
|---|
| 155 | ; Offsets for Partition-Entries in MBR/EPRs
|
|---|
| [30] | 156 | LocBRPT_LenOfEntry equ 16 ; Length of a standard MBR or EPR entry
|
|---|
| 157 | LocBRPT_Flags equ 0 ; Bootable, Hidden, etc.
|
|---|
| 158 | LocBRPT_BeginCHS equ 1 ; Combined 10-bits cyl with 6 bits
|
|---|
| 159 | LocBRPT_BeginHead equ 1 ; Start head (0<=H<255) 255 is invalid !
|
|---|
| 160 | LocBRPT_BeginSector equ 2 ; Start sector (1<=S<=255)
|
|---|
| 161 | LocBRPT_BeginCylinder equ 3 ; Start cylinder (0<=C<[1024,16384,65536,n])
|
|---|
| 162 | LocBRPT_SystemID equ 4 ; Type of system using the partition
|
|---|
| 163 | LocBRPT_EndCHS equ 5 ; Same for end of partition
|
|---|
| [7] | 164 | LocBRPT_EndHead equ 5
|
|---|
| 165 | LocBRPT_EndSector equ 6
|
|---|
| 166 | LocBRPT_EndCylinder equ 7
|
|---|
| [30] | 167 | LocBRPT_RelativeBegin equ 8 ; Where the ...
|
|---|
| 168 | LocBRPT_AbsoluteLength equ 12 ; ?
|
|---|
| [7] | 169 |
|
|---|
| [30] | 170 | LocBR_Magic equ 510 ; ?
|
|---|
| [7] | 171 |
|
|---|
| [29] | 172 | ; Offsets for LVM Information Sector
|
|---|
| [30] | 173 | LocLVM_SignatureStart equ 0 ;
|
|---|
| 174 | LocLVM_SignatureByte0 equ 2 ;
|
|---|
| 175 | LocLVM_CRC equ 8 ; CRC is a DWORD
|
|---|
| 176 | LocLVM_MaxEntries equ 4 ; Max entries in the track0 LVM-sector
|
|---|
| 177 | LocLVM_StartOfEntries equ 60 ; (contains maximum of 4 entries)
|
|---|
| 178 | LocLVM_LenOfEntry equ 60 ; ?
|
|---|
| 179 | LocLVM_VolumeID equ 0 ; is DWORD
|
|---|
| 180 | LocLVM_PartitionID equ 4 ; is DWORD
|
|---|
| 181 | LocLVM_PartitionSize equ 8 ; is DWORD
|
|---|
| 182 | LocLVM_PartitionStart equ 12 ; is DWORD
|
|---|
| 183 | LocLVM_VolumeLetter equ 18 ; is BYTE (Letter C-Z or 0) (relative to entry)
|
|---|
| [29] | 184 |
|
|---|
| [30] | 185 | ; Rousseau: added (index in LVM-sector)
|
|---|
| 186 | LocLVM_Secs equ 20h ; Sectors per Track ; Rousseau: this one is used for the OS/2 extended geometry
|
|---|
| 187 | LocLVM_Heads equ 1ch ; Number of heads
|
|---|
| 188 | LocLVM_VolumeLetter2 equ 78 ; is BYTE (Letter C-Z or 0) ; FOUT !! niet entry relative !
|
|---|
| 189 | LocLVM_Startable equ 77 ; is startable (newly installed system) ; FOUT !! niet entry relative !
|
|---|
| 190 | LocLVM_OnBootMenu equ 76 ; is on bootmenu ; FOUT !! niet entry relative !
|
|---|
| 191 |
|
|---|
| 192 | LocLVM_VolumeName equ 20 ; 20 bytes
|
|---|
| 193 | LocLVM_PartitionName equ 40 ; 20 bytes
|
|---|
| 194 |
|
|---|
| 195 |
|
|---|
| 196 |
|
|---|
| 197 |
|
|---|
| [7] | 198 | ; Offsets for IPT (Internal Partition Table)
|
|---|
| [30] | 199 | LocIPT_MaxPartitions equ partition_count ; Maximum LocIPT_MaxPartitions
|
|---|
| 200 | LocIPT_LenOfSizeElement equ 6 ; Size of one Size-Element
|
|---|
| 201 | LocIPT_LenOfIPT equ 34 ; Length of an IPT-entry
|
|---|
| 202 | LocIPT_Serial equ 0 ; Serial from MBR ?
|
|---|
| 203 | LocIPT_Name equ 4 ; Name from FS or LVM (part/vol)
|
|---|
| 204 | LocIPT_Drive equ 15 ; Drive-ID (80h,81h etc. sub 7fh to get 1-based disk-number)
|
|---|
| 205 | LocIPT_SystemID equ 16 ; Partition-Type (06,07,etc)
|
|---|
| 206 | LocIPT_Flags equ 17 ; AiR-BOOT Flags for partition (see below)
|
|---|
| 207 | LocIPT_BootRecordCRC equ 18 ; CRC of Boot-Record
|
|---|
| 208 | LocIPT_LocationBegin equ 20 ; Begin of Partition
|
|---|
| 209 | LocIPT_LocationPartTable equ 23 ; PartitionTable of Partition
|
|---|
| 210 | LocIPT_AbsoluteBegin equ 26 ; Absolute Sector of Begin
|
|---|
| 211 | LocIPT_AbsolutePartTable equ 30 ; Absolute Sector of PartTable
|
|---|
| [7] | 212 |
|
|---|
| [30] | 213 | ; AiR-BOOT IPT-Flags
|
|---|
| 214 | LocIPT_DefaultFlags equ 00000011b ; Don't know if boot-able :)
|
|---|
| 215 | LocIPT_DefaultNonBootFlags equ 00000010b ; ...VIBR Detection is always on
|
|---|
| [7] | 216 |
|
|---|
| 217 | Flags_BootAble equ 00000001b
|
|---|
| 218 | Flags_VIBR_Detection equ 00000010b
|
|---|
| 219 | Flags_HideFeature equ 00000100b
|
|---|
| [30] | 220 | Flags_DriveLetter equ 00001000b ; OS/2 FAT16/HPFS only
|
|---|
| 221 | Flags_ExtPartMShack equ 00010000b ; Extended Partition M$-Hack req ?
|
|---|
| [7] | 222 | Flags_NoPartName equ 01000000b
|
|---|
| [30] | 223 | Flags_NowFound equ 10000000b ; temp only in OldPartTable
|
|---|
| 224 | Flags_SpecialMarker equ 10000000b ; temp only for HiddenSetup
|
|---|
| [7] | 225 |
|
|---|
| [30] | 226 | FileSysFlags_BootAble equ 00000001b ; Is this Partition boot-able ?
|
|---|
| 227 | FileSysFlags_FAT32 equ 00010000b ; FAT 32 specific name getting
|
|---|
| 228 | FileSysFlags_NoName equ 00100000b ; No Name - use PartitionName
|
|---|
| 229 | FileSysFlags_DriveLetter equ 01000000b ; DriveLetter Feature possible
|
|---|
| [7] | 230 |
|
|---|
| [30] | 231 | ; Navigation keys
|
|---|
| [7] | 232 | Keys_Up equ 48h
|
|---|
| 233 | Keys_Down equ 50h
|
|---|
| 234 | Keys_Left equ 4Bh
|
|---|
| 235 | Keys_Right equ 4Dh
|
|---|
| 236 | Keys_PageUp equ 49h
|
|---|
| 237 | Keys_PageDown equ 51h
|
|---|
| 238 | Keys_GrayPlus equ 4Eh
|
|---|
| 239 | Keys_GrayMinus equ 4Ah
|
|---|
| 240 | Keys_Plus equ 1Bh
|
|---|
| 241 | Keys_Minus equ 35h
|
|---|
| 242 | Keys_Enter equ 1Ch
|
|---|
| 243 | Keys_ESC equ 1h
|
|---|
| 244 | Keys_F1 equ 3Bh
|
|---|
| 245 | Keys_F10 equ 44h
|
|---|
| 246 | Keys_C equ 2Eh ; Add. Check auf Ctrl!
|
|---|
| 247 | Keys_Y equ 2Ch
|
|---|
| 248 | Keys_Z equ 15h
|
|---|
| 249 | Keys_N equ 31h
|
|---|
| 250 | Keys_TAB equ 0Fh
|
|---|
| 251 | Keys_Delete equ 53h
|
|---|
| 252 | Keys_Backspace equ 0Eh
|
|---|
| 253 | Keys_Space equ 20h
|
|---|
| 254 |
|
|---|
| 255 | Keys_Flags_EnterSetup equ 1100b ; Strg+Alt (AL)
|
|---|
| 256 |
|
|---|
| 257 |
|
|---|
| [30] | 258 | ; ------------------------------------------
|
|---|
| 259 | ; Rousseau: # Changed this from .386 to .286
|
|---|
| 260 | ; ------------------------------------------
|
|---|
| 261 | ; Because of the TASM-bug the processor had to be changed to turn JUMPS
|
|---|
| 262 | ; off. Existing movzx instructions were replaced with 286 equivalent code.
|
|---|
| 263 | ; Out of range relative jumps have been recoded.
|
|---|
| 264 | ; AiR-BOOT can now run on a 286 processor :-)
|
|---|
| 265 | .286
|
|---|
| 266 |
|
|---|
| 267 | ; This influences the uses directive and other stuff,
|
|---|
| 268 | ; like calling-style.
|
|---|
| 269 | ; The model itself,large, has no effect because we generate
|
|---|
| 270 | ; a binairy image and not a segmented executable.
|
|---|
| 271 | .model large, basic
|
|---|
| 272 |
|
|---|
| 273 | ; Our code-segment starts here.
|
|---|
| 274 | ; We are running in 16-bit and we like it
|
|---|
| [7] | 275 | code_seg segment public use16
|
|---|
| 276 | assume cs:code_seg, ds:code_seg, es:nothing, ss:nothing
|
|---|
| 277 |
|
|---|
| [30] | 278 |
|
|---|
| 279 |
|
|---|
| 280 | ;===============================================================================
|
|---|
| 281 | ; Sector 1
|
|---|
| 282 |
|
|---|
| 283 |
|
|---|
| 284 | ; We are not a .com file at 100h but a binary image
|
|---|
| 285 | ; of which only the 1st sector gets loaded at 07c00h.
|
|---|
| 286 | org 00000h ; Sector 1
|
|---|
| 287 |
|
|---|
| 288 | ; Start of sector 1
|
|---|
| 289 | ; This is the MBR, note the AiRBOOT signature, it's date (2006), version and
|
|---|
| 290 | ; language.
|
|---|
| 291 | ; Version 1.07 was intruduced in 2011.
|
|---|
| 292 | ; It fixes issues with huge drives and lvm and more.
|
|---|
| 293 |
|
|---|
| 294 | sos1:
|
|---|
| 295 |
|
|---|
| 296 | ; ---------------------------------------------
|
|---|
| 297 | ; Rousseau: # Combined letter and jump offset #
|
|---|
| 298 | ; ---------------------------------------------
|
|---|
| 299 | ; My guess is Martin had a short jump followed by the AiRBOOT signature at first.
|
|---|
| 300 | ; Then he encountered strange behaviour by some M$ operating-systems if the
|
|---|
| 301 | ; the first insruction was not a CLI.
|
|---|
| 302 | ; But there was no room to insert the CLI and of course he did not want to
|
|---|
| 303 | ; change the location of the AiRBOOT signature.
|
|---|
| 304 | ; He solved this by inserting the M$ needed CLI at offset 0 followed by a short
|
|---|
| 305 | ; jump that uses the 'A' of the AiRBOOT signature as the jump displacement.
|
|---|
| 306 |
|
|---|
| 307 |
|
|---|
| [7] | 308 | ;---------------------------------------------------------------------------
|
|---|
| [30] | 309 | AiR_BOOT: cli ; Some M$ operating systems need a CLI
|
|---|
| 310 | ; here otherwise they will go beserk ; Rousseau: M$ osses are beserk by definition.
|
|---|
| 311 | ; and will do funny things during
|
|---|
| 312 | ; boot phase, it's laughable!
|
|---|
| 313 | db 0EBh ; JMP-Short -> MBR_Start ; Rousseau: uses the 'A' as the displacement !
|
|---|
| 314 | db 'AiRBOOT', 13h, 03h, 20h, 06h, 01h, 07h, TXT_LanguageID ; Rousseau: version adjusted to v1.07
|
|---|
| 315 |
|
|---|
| [7] | 316 | ; ID String, Date and Version Number, U for US version
|
|---|
| [30] | 317 | db 1 ; Total Sectors Count,
|
|---|
| 318 | ; Will get overwritten by FIXBSET.exe
|
|---|
| 319 | MBR_CheckCode dw 0 ; Check-Sum for Code
|
|---|
| [7] | 320 |
|
|---|
| [30] | 321 | ;
|
|---|
| 322 | ; This label is jumped to from the jump after 'eCSRocks'.
|
|---|
| 323 | ; No single instruction below should be changed, added or removed in the code
|
|---|
| 324 | ; below as this will cause the jump-link to go haywire.
|
|---|
| 325 | MBR_Start: sti ; This opcode is dedicated to:
|
|---|
| 326 | cld ; =MICROSOFT JUMP DEPARTMENT=
|
|---|
| 327 |
|
|---|
| 328 | ; Setup some base stuff
|
|---|
| 329 | ; AX got loaded wrongly for debug, changed the instructions
|
|---|
| 330 | ; without modifying the number of bytes.
|
|---|
| 331 | ; Don't comment-out the redundant instruction below because this *will*
|
|---|
| 332 | ; change the number of bytes and break the jump-chain.
|
|---|
| 333 | mov ax, StartBaseSeg ; The segment we are moving ourself from (NOT USED)
|
|---|
| 334 | ;mov ds, ax
|
|---|
| 335 | push cs
|
|---|
| 336 | pop ds
|
|---|
| 337 | mov si, StartBasePtr ; The offset we are moving ourself from
|
|---|
| 338 | mov ax, BootBaseSeg ; The target segment we are moving ourself to
|
|---|
| [29] | 339 | mov es, ax
|
|---|
| [30] | 340 | mov di, BootBasePtr ; The target offset we are moving ourself to
|
|---|
| 341 |
|
|---|
| 342 | ; Depending on pre-boot or debug,
|
|---|
| 343 | ; only move first 512 bytes or the whole she-bang++ (65400 bytes)
|
|---|
| [7] | 344 | IFDEF ReleaseCode
|
|---|
| [30] | 345 | mov cx, 256 ; Pre-boot environment
|
|---|
| [7] | 346 | ELSE
|
|---|
| [30] | 347 | mov cx, 32700 ; Debug environment ; Rousseau: where does 32700 come from ? (30720)
|
|---|
| [7] | 348 | ENDIF
|
|---|
| [30] | 349 |
|
|---|
| 350 | ;
|
|---|
| 351 | ; LET's MOVE OURSELVES !
|
|---|
| 352 | ;
|
|---|
| [7] | 353 | rep movsw
|
|---|
| [30] | 354 |
|
|---|
| 355 | ; Code a jump to the
|
|---|
| [7] | 356 | db 0EAh
|
|---|
| [30] | 357 | dw BootBaseExec ; This is MBR_RealStart + BootBasePtr
|
|---|
| 358 | dw BootBaseSeg ; This is 08000h
|
|---|
| [7] | 359 | ; jmp far ptr BootBaseSeg:BootBaseExec
|
|---|
| 360 |
|
|---|
| [30] | 361 |
|
|---|
| 362 | ;
|
|---|
| 363 | ; Some MBR-functions to provide absolute minimum functionality.
|
|---|
| 364 | ;
|
|---|
| 365 |
|
|---|
| 366 | ;
|
|---|
| 367 | ; Entry-point for halting the system.
|
|---|
| 368 | ;
|
|---|
| [7] | 369 | MBR_HaltSystem:
|
|---|
| 370 | mov ax, 8600h
|
|---|
| 371 | xor cx, cx
|
|---|
| 372 | mov dx, 500
|
|---|
| 373 | int 15h ; Wait to display the whole screen :]
|
|---|
| [29] | 374 | MBR_HaltSys: cli
|
|---|
| 375 | jmp MBR_HaltSys
|
|---|
| [7] | 376 |
|
|---|
| [30] | 377 | ;
|
|---|
| 378 | ; Never let this part change it's offset,
|
|---|
| 379 | ; or the first MBR jump will go haywire.
|
|---|
| 380 | ;
|
|---|
| 381 |
|
|---|
| 382 | ; db 'FUCKMS:>' ; Sorry Martin, we had to change this.
|
|---|
| 383 | db 'eCSRocks' ; Hope you like this one too :-)
|
|---|
| [29] | 384 | jmp MBR_Start ; We jump here, because I needed to
|
|---|
| 385 | ; insert a CLI on start and did not
|
|---|
| 386 | ; want to change AiR-BOOT detection
|
|---|
| 387 | ; because of Microsoft inventions...
|
|---|
| [30] | 388 | ;
|
|---|
| 389 | ; Entry-point when loading fails.
|
|---|
| 390 | ;
|
|---|
| [7] | 391 | db 'LOAD ERROR!', 0
|
|---|
| [30] | 392 | MBR_LoadError Proc Near
|
|---|
| 393 | mov si, offset $-12
|
|---|
| 394 | push cs
|
|---|
| 395 | pop ds
|
|---|
| 396 | call MBR_Teletype
|
|---|
| 397 | MBRLE_Halt:
|
|---|
| 398 | jmp MBRLE_Halt
|
|---|
| 399 | MBR_LoadError EndP
|
|---|
| [7] | 400 |
|
|---|
| [30] | 401 |
|
|---|
| 402 | ;
|
|---|
| 403 | ; Entry-point when saving fails.
|
|---|
| 404 | ;
|
|---|
| [7] | 405 | db 'SAVE ERROR!', 0
|
|---|
| [30] | 406 | MBR_SaveError Proc Near
|
|---|
| 407 | mov si, offset $-12
|
|---|
| 408 | push cs
|
|---|
| 409 | pop ds
|
|---|
| 410 | call MBR_Teletype
|
|---|
| 411 | MBRSE_Halt:
|
|---|
| 412 | jmp MBRSE_Halt
|
|---|
| 413 | MBR_SaveError EndP
|
|---|
| [7] | 414 |
|
|---|
| [30] | 415 |
|
|---|
| 416 | ; Put text on the screen using the BIOS tele-type function.
|
|---|
| 417 | ; No attributes like color are supported.
|
|---|
| [7] | 418 | ; In: SI - Pointer to begin of string (EOS is 0)
|
|---|
| 419 | ; Destroyed: SI
|
|---|
| 420 | MBR_Teletype Proc Near Uses ax bx cx
|
|---|
| [30] | 421 | mov ah, 0Eh
|
|---|
| 422 | mov bx, 7
|
|---|
| 423 | MBRT_Loop:
|
|---|
| 424 | lodsb
|
|---|
| 425 | or al, al
|
|---|
| 426 | jz MBRT_End
|
|---|
| 427 | int 10h
|
|---|
| 428 | jmp MBRT_Loop
|
|---|
| 429 | MBRT_End:
|
|---|
| 430 | ret
|
|---|
| [7] | 431 | MBR_Teletype EndP
|
|---|
| 432 |
|
|---|
| [30] | 433 | ;
|
|---|
| 434 | ; Rousseau: DO NOT ADD CODE TO THIS SECTION !
|
|---|
| 435 | ;
|
|---|
| 436 |
|
|---|
| [7] | 437 | ; In: BX - Base Check, DS:SI - Pointer to 512-byte-area to be included
|
|---|
| 438 | ; Out: BX - Base Check Result
|
|---|
| 439 | ; Destroyed: SI will get updated (+512)
|
|---|
| 440 | MBR_GetCheckOfSector Proc Near Uses ax cx
|
|---|
| 441 | mov cx, 256
|
|---|
| 442 | MBRGCOS_Loop:
|
|---|
| 443 | lodsw
|
|---|
| 444 | xor ax, 0BABEh
|
|---|
| 445 | xor bx, ax
|
|---|
| 446 | loop MBRGCOS_Loop
|
|---|
| 447 | or bx, bx
|
|---|
| 448 | jnz MBRGCOS_NoFixUp
|
|---|
| 449 | mov bx, 1 ; dont allow 0, cause 0 == empty
|
|---|
| 450 | MBRGCOS_NoFixUp:
|
|---|
| 451 | ret
|
|---|
| 452 | MBR_GetCheckOfSector EndP
|
|---|
| 453 |
|
|---|
| [30] | 454 |
|
|---|
| 455 |
|
|---|
| 456 |
|
|---|
| 457 |
|
|---|
| 458 |
|
|---|
| 459 | ;
|
|---|
| 460 | ; This is where the rest of AiR-BOOT gets loaded.
|
|---|
| 461 | ;
|
|---|
| 462 |
|
|---|
| [7] | 463 | ;---------------------------------------------------------------------------
|
|---|
| 464 | MBR_RealStart:
|
|---|
| [30] | 465 | mov ax, StackSeg ; 07000h, below the moved code
|
|---|
| [7] | 466 | mov ss, ax
|
|---|
| [30] | 467 | ;mov sp, 7FFFh ; Odd stack-pointer ??
|
|---|
| 468 | mov sp, 7FFEh ; Safe value, could also be 8000h because SP is decremented by 2 before push
|
|---|
| 469 | mov ax, es ; ES holds segment where we moved ourself to.
|
|---|
| 470 | mov ds, ax ; Set DS==ES to Code Segment
|
|---|
| 471 |
|
|---|
| 472 | ; If we are in debug-mode, all code is moved already,
|
|---|
| 473 | ; so we can directly jump to it.
|
|---|
| 474 | ; One difference is that in debug-mode, the whole .com image is loaded by dos while
|
|---|
| 475 | ; when air-boot is active from the MBR it does the loading itself.
|
|---|
| 476 | ; When active from the MBR air-boot does not load all sectors !
|
|---|
| 477 | ; This means that i.e. a value stored at 77E0h is present in the debug-version because the whole
|
|---|
| 478 | ; image is loaded, but is not present in running-mode because this sector is not loaded.
|
|---|
| [7] | 479 | IFNDEF ReleaseCode
|
|---|
| 480 | jmp AiR_BOOT_Start
|
|---|
| 481 | ENDIF
|
|---|
| [30] | 482 |
|
|---|
| 483 |
|
|---|
| [7] | 484 | ; Load missing parts from harddrive...
|
|---|
| [30] | 485 | mov ax, cs ; actually obsolete
|
|---|
| 486 | mov es, ax ; actually obsolete
|
|---|
| 487 |
|
|---|
| 488 | ; Load the configuration-sectors from disk.
|
|---|
| [7] | 489 | mov bx, offset Configuration
|
|---|
| [30] | 490 | mov dx, 0080h ; First harddrive, Sector 55
|
|---|
| 491 | mov cx, 0037h ; Is 55d is config-sector
|
|---|
| 492 |
|
|---|
| 493 |
|
|---|
| 494 |
|
|---|
| 495 | IF image_size EQ image_size_60secs
|
|---|
| 496 | mov ax, 0205h ; Read 5 sectors (55 - 59)
|
|---|
| 497 | ELSE
|
|---|
| 498 | mov ax, 0207h ; Read 7 sectors (55 - 61)
|
|---|
| 499 | ENDIF
|
|---|
| 500 |
|
|---|
| [7] | 501 | int 13h
|
|---|
| 502 | jnc MBR_ConfigCopy_NoError
|
|---|
| [30] | 503 |
|
|---|
| 504 | ; Some error occured
|
|---|
| [29] | 505 | MBR_ConfigCopy_LoadError:
|
|---|
| [30] | 506 | call MBR_LoadError ; Will Abort BootUp
|
|---|
| 507 |
|
|---|
| 508 | ; Load the code sectors
|
|---|
| [7] | 509 | MBR_ConfigCopy_NoError:
|
|---|
| 510 | mov bx, offset FurtherMoreLoad
|
|---|
| [30] | 511 | mov dx, 0080h ; First harddrive
|
|---|
| 512 | mov cx, 0002h ; Second sector
|
|---|
| [7] | 513 | mov ah, 02h
|
|---|
| [30] | 514 |
|
|---|
| 515 | mov al, ds:[10h] ; 34h = 52d sectors (35h in extended version)
|
|---|
| [7] | 516 | int 13h
|
|---|
| 517 | jnc MBR_RealStart_NoError
|
|---|
| [29] | 518 | jmp MBR_ConfigCopy_LoadError
|
|---|
| 519 | ; [v1.05+]
|
|---|
| 520 | ; Signature for IBM's LVM to detect our "powerful" features ;)
|
|---|
| 521 | db 'I13X'
|
|---|
| [7] | 522 | MBR_RealStart_NoError:
|
|---|
| 523 | ; Now Check Code with CheckSum
|
|---|
| 524 | mov si, offset FurtherMoreLoad
|
|---|
| [30] | 525 |
|
|---|
| 526 | ;movzx cx, bptr ds:[10h]
|
|---|
| 527 | mov cl, ds:[10h]
|
|---|
| 528 | mov ch,0
|
|---|
| 529 |
|
|---|
| [7] | 530 | xor bx, bx
|
|---|
| 531 | MBR_RealStart_CheckCodeLoop:
|
|---|
| 532 | call MBR_GetCheckOfSector
|
|---|
| 533 | loop MBR_RealStart_CheckCodeLoop
|
|---|
| 534 | cmp MBR_CheckCode, bx
|
|---|
| 535 | je MBR_RealStart_CheckSuccess
|
|---|
| 536 | mov si, offset TXT_ERROR_Attention
|
|---|
| 537 | call MBR_Teletype
|
|---|
| 538 | mov si, offset TXT_ERROR_CheckCode
|
|---|
| 539 | call MBR_Teletype
|
|---|
| 540 | mov si, offset TXT_ERROR_CheckFailed
|
|---|
| 541 | call MBR_Teletype
|
|---|
| 542 | jmp MBR_HaltSystem
|
|---|
| 543 | MBR_RealStart_CheckSuccess:
|
|---|
| 544 | jmp AiR_BOOT_Start
|
|---|
| 545 |
|
|---|
| [30] | 546 |
|
|---|
| 547 |
|
|---|
| 548 |
|
|---|
| [7] | 549 | ;---------------------------------------------------------------------------
|
|---|
| 550 | Include TEXT\TXTMBR.asm ; All translateable Text in MBR
|
|---|
| 551 | ;---------------------------------------------------------------------------
|
|---|
| [30] | 552 |
|
|---|
| 553 |
|
|---|
| 554 |
|
|---|
| 555 | ; Comport settings
|
|---|
| 556 | ; DO NOT MOVE THIS VARIABLE !!
|
|---|
| 557 | ; It cannot be in the config-area (sector 55) because that area
|
|---|
| 558 | ; is crc-protected.
|
|---|
| 559 | org 001B0h
|
|---|
| 560 | BIOS_AuxParms dw BIOS_AuxParmsDefault ; Initialized at start when developing
|
|---|
| 561 |
|
|---|
| 562 | org 00200h
|
|---|
| 563 | ; End of sector 1
|
|---|
| 564 | eos1:
|
|---|
| 565 |
|
|---|
| 566 | ; Check for overlap
|
|---|
| 567 | slack01 = sos2 - eos1
|
|---|
| 568 | IF slack01 LT 0
|
|---|
| 569 | .ERR2 "Location Overlap slack01 !"
|
|---|
| 570 | ENDIF
|
|---|
| 571 |
|
|---|
| 572 |
|
|---|
| 573 | ;===============================================================================
|
|---|
| 574 | ; Sector 2
|
|---|
| 575 |
|
|---|
| 576 | ;
|
|---|
| 577 | ; Here starts the second sector, sector 2
|
|---|
| 578 | ;
|
|---|
| 579 | org 00200h
|
|---|
| 580 | ; Start of sector 2.
|
|---|
| 581 | sos2:
|
|---|
| 582 |
|
|---|
| 583 |
|
|---|
| [7] | 584 | ; Everything beyond this point is loaded on startup and is NOT existant at first
|
|---|
| 585 | FurtherMoreLoad:
|
|---|
| [30] | 586 |
|
|---|
| 587 | ;
|
|---|
| 588 | ; Filesystem table correlating id with name.
|
|---|
| 589 | ;
|
|---|
| 590 |
|
|---|
| [7] | 591 | ; first Normal-Partition-ID, Hidden-Partition-ID
|
|---|
| 592 | ; and Default-Partition-Flags.
|
|---|
| 593 | ; 01h -> Boot-Able
|
|---|
| 594 | ; 10h -> FAT32 - Name Getting Scheme
|
|---|
| 595 | ; 20h -> No Name To Get (use Partition Name)
|
|---|
| [29] | 596 | ; 40h -> 'L' flag possible
|
|---|
| [7] | 597 | db 'AiRSYS-TABLE'
|
|---|
| [29] | 598 | FileSysIDs: db 01h, 11h,01h, 04h,014h,01h, 06h,016h,41h, 0Eh,00Eh,01h
|
|---|
| 599 | db 07h, 17h,41h, 08h,017h,21h, 35h,035h,20h,0FCh,017h,41h
|
|---|
| 600 | db 09h, 19h,11h, 0Bh,01Bh,11h, 0Ch,01Ch,11h,0EBh,0EBh,01h
|
|---|
| [7] | 601 | db 63h, 63h,21h, 81h,081h,21h, 83h,083h,21h, 40h,040h,21h
|
|---|
| 602 | db 0A5h,0A5h,21h,0A6h,0A6h,21h, 82h,082h,20h,0A7h,0A7h,21h
|
|---|
| 603 | db 63h, 63h,21h, 4Dh,04Dh,21h, 4Eh,04Eh,21h, 4Fh,04Fh,21h
|
|---|
| 604 | db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
|
|---|
| 605 | db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
|
|---|
| 606 | db 01h, 01h,01h, 01h,001h,01h, 01h,001h,01h, 01h,001h,01h
|
|---|
| 607 | db 01h, 01h,01h,0FDh,0FDh,20h, 84h,084h,20h,0A0h,0A0h,20h
|
|---|
| 608 | db 0Ah, 0Ah,20h,0FEh,0FEh,21h,0FFh,0FFh,21h, 00h,000h,21h
|
|---|
| 609 | db 16 dup (0)
|
|---|
| 610 |
|
|---|
| 611 | FileSysNames: db 'FAT12 ', 'FAT16 ', 'FAT16Big', 'FAT16Big'
|
|---|
| [29] | 612 | db 'HPFS ', 'NTFS ', 'LVM-Data', 'JFS '
|
|---|
| 613 | db 'FAT32 ', 'FAT32 ', 'FAT32 ', 'BeOS '
|
|---|
| [7] | 614 | db 'Unix ', 'Minix ', 'Linux ', 'Venix ' ; x row ;)
|
|---|
| 615 | db 'BSD/386 ', 'OpenBSD ', 'LinuxSwp', 'NeXTSTEP'
|
|---|
| 616 | db 'GNU HURD', 'QNX ', 'QNX ', 'QNX '
|
|---|
| 617 | db ' ', ' ', ' ', ' '
|
|---|
| 618 | db ' ', ' ', ' ', ' '
|
|---|
| 619 | db ' ', ' ', ' ', ' '
|
|---|
| 620 | db ' ', 'Kernel ', ' ', '0V-Award'
|
|---|
| 621 | db 'OS/2 Man', 'via BIOS', 'Floppy ', 'Unknown '
|
|---|
| 622 | ; -> 44 Partition-Types
|
|---|
| 623 |
|
|---|
| [30] | 624 | ; End of sector 2.
|
|---|
| 625 | eos2:
|
|---|
| 626 |
|
|---|
| 627 |
|
|---|
| 628 |
|
|---|
| 629 | ; Check for overlap
|
|---|
| 630 | slack02 = sos3 - eos2
|
|---|
| 631 | IF slack02 LT 0
|
|---|
| 632 | .ERR2 "Location Overlap slack02 !"
|
|---|
| 633 | ENDIF
|
|---|
| 634 |
|
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 |
|
|---|
| 638 |
|
|---|
| 639 | ;===============================================================================
|
|---|
| 640 | ; Sector 3
|
|---|
| 641 | org 00400h
|
|---|
| 642 | ; Start of sector 3.
|
|---|
| 643 | sos3:
|
|---|
| 644 |
|
|---|
| 645 |
|
|---|
| 646 |
|
|---|
| 647 |
|
|---|
| 648 |
|
|---|
| 649 |
|
|---|
| 650 |
|
|---|
| 651 |
|
|---|
| 652 |
|
|---|
| 653 |
|
|---|
| 654 |
|
|---|
| 655 |
|
|---|
| 656 |
|
|---|
| 657 |
|
|---|
| 658 |
|
|---|
| 659 | ; ##############################################
|
|---|
| 660 | ; ## ENTRY-POINT AFTER ALL THE INITIAL HASSLE ##
|
|---|
| 661 | ; ##############################################
|
|---|
| 662 |
|
|---|
| 663 |
|
|---|
| 664 |
|
|---|
| 665 | AiR_BOOT_Start: nop
|
|---|
| 666 |
|
|---|
| 667 | ;jmp skip
|
|---|
| 668 |
|
|---|
| 669 | ; Rousseau:
|
|---|
| 670 | ; I should cleanup my garbage here...
|
|---|
| 671 |
|
|---|
| [7] | 672 | ; Initialize Variable-Tables, Detections, etc.
|
|---|
| 673 | call PRECRAP_Main
|
|---|
| [30] | 674 |
|
|---|
| 675 | ; Number of harddisks is now known
|
|---|
| 676 |
|
|---|
| [7] | 677 | call PARTSCAN_ScanForPartitions
|
|---|
| [30] | 678 |
|
|---|
| 679 |
|
|---|
| 680 | ; Number of disks found
|
|---|
| 681 | mov si, offset DisksFound
|
|---|
| 682 | call MBR_Teletype
|
|---|
| 683 |
|
|---|
| 684 | mov al, [TotalHarddiscs]
|
|---|
| 685 | call VideoIO_SyncPos
|
|---|
| 686 | call VideoIO_PrintByteDynamicNumber
|
|---|
| 687 | xor si,si
|
|---|
| 688 | call MBR_TeletypeNL
|
|---|
| 689 |
|
|---|
| 690 | ; Number of bootable systems indicator
|
|---|
| 691 | mov si, offset PartitionsFound
|
|---|
| 692 | call MBR_Teletype
|
|---|
| 693 |
|
|---|
| 694 | mov al, [CFG_Partitions]
|
|---|
| 695 | call VideoIO_SyncPos
|
|---|
| 696 | call VideoIO_PrintByteDynamicNumber
|
|---|
| 697 |
|
|---|
| 698 | xor si,si
|
|---|
| 699 | call MBR_TeletypeNL
|
|---|
| 700 | call MBR_TeletypeNL
|
|---|
| 701 |
|
|---|
| 702 | call VideoIO_SyncPos
|
|---|
| 703 |
|
|---|
| 704 | mov dl,80h
|
|---|
| 705 | call VideoIO_DumpDiskInfo
|
|---|
| 706 |
|
|---|
| 707 | ;
|
|---|
| 708 | ; Enumberate Bootable Systemen by name
|
|---|
| 709 | ; And prepare Phase 1 if active
|
|---|
| 710 | ;
|
|---|
| 711 | mov si, offset PartitionTable
|
|---|
| 712 | xor cx,cx
|
|---|
| 713 | mov cl,[CFG_Partitions]
|
|---|
| 714 | MBR_Parts:
|
|---|
| 715 | add si, 4
|
|---|
| 716 | push si
|
|---|
| 717 | push si
|
|---|
| 718 | ;call MBR_TeletypeVolName
|
|---|
| 719 | pop si
|
|---|
| 720 | call PART_IsInstallVolume
|
|---|
| 721 | jnc MBR_Parts_NI
|
|---|
| 722 |
|
|---|
| 723 | ; install volume
|
|---|
| 724 | mov al,' '
|
|---|
| 725 | mov bl,7
|
|---|
| 726 | mov ah, 0eh
|
|---|
| 727 | int 10h
|
|---|
| 728 |
|
|---|
| 729 | mov al,'('
|
|---|
| 730 | mov bl,7
|
|---|
| 731 | mov ah, 0eh
|
|---|
| 732 | int 10h
|
|---|
| 733 |
|
|---|
| 734 | mov al,[CFG_Partitions]
|
|---|
| 735 | sub al,cl
|
|---|
| 736 | ;inc al
|
|---|
| 737 | ;mov [Menu_EntryAutomatic],al
|
|---|
| 738 | mov [CFG_PartAutomatic],al ; Rousseau: setup entry for install-volume
|
|---|
| 739 | mov [CFG_PartLast],al
|
|---|
| 740 | mov ah, [eCS_InstallVolume] ; 1st byte is 0 if no phase 1 active
|
|---|
| 741 | test ah,ah ; test the byte, ZF is 0 if phase 1 active
|
|---|
| 742 | lahf ; flags in ah
|
|---|
| 743 | xor ah, 40h ; complement ZF
|
|---|
| 744 | and ah, 40h ; mask ZF
|
|---|
| 745 | shr ah, 6 ; move ZF to LSB
|
|---|
| 746 | mov [CFG_AutomaticBoot], ah ; automatic boot if phase 1 is active
|
|---|
| 747 | mov [eCS_InstallVolume], 0 ; disable phase 1 for next boot
|
|---|
| 748 |
|
|---|
| 749 | add al,'1'
|
|---|
| 750 | mov bl,7
|
|---|
| 751 | mov ah, 0eh
|
|---|
| 752 | int 10h
|
|---|
| 753 |
|
|---|
| 754 | mov al,')'
|
|---|
| 755 | mov bl,7
|
|---|
| 756 | mov ah, 0eh
|
|---|
| 757 | int 10h
|
|---|
| 758 |
|
|---|
| 759 | mov bx,cx
|
|---|
| 760 |
|
|---|
| 761 | MBR_Parts_NI:
|
|---|
| 762 | xor si,si
|
|---|
| 763 | ;call MBR_TeletypeNL
|
|---|
| 764 | pop si
|
|---|
| 765 | add si, 30
|
|---|
| 766 | loop MBR_Parts
|
|---|
| 767 |
|
|---|
| 768 |
|
|---|
| 769 |
|
|---|
| 770 |
|
|---|
| 771 | ; Index of automatic start partition
|
|---|
| 772 | ; mov si, offset AutoStartPart
|
|---|
| 773 | ;call MBR_Teletype
|
|---|
| 774 |
|
|---|
| 775 | mov al, [CFG_PartAutomatic]
|
|---|
| 776 | add al, 31h
|
|---|
| 777 | mov ah, 09h
|
|---|
| 778 | mov bx, 15
|
|---|
| 779 | mov cx, 1
|
|---|
| 780 | ;int 10h
|
|---|
| 781 |
|
|---|
| 782 | mov al, [CFG_PartAutomatic]
|
|---|
| 783 | add al, 31h
|
|---|
| 784 | mov ah, 0eh
|
|---|
| 785 | mov bx, 15
|
|---|
| 786 | mov cx, 1
|
|---|
| 787 | ;int 10h
|
|---|
| 788 |
|
|---|
| 789 | xor si,si
|
|---|
| 790 | call MBR_TeletypeNL
|
|---|
| 791 | xor si,si
|
|---|
| 792 | call MBR_TeletypeNL
|
|---|
| 793 |
|
|---|
| 794 | mov ax,[BIOS_AuxParms]
|
|---|
| 795 | ;call VideoIO_SyncPos
|
|---|
| 796 | push ax
|
|---|
| 797 | add al,'0'
|
|---|
| 798 | mov bl,7
|
|---|
| 799 | mov ah, 0eh
|
|---|
| 800 | ;int 10h
|
|---|
| 801 | pop ax
|
|---|
| 802 | xchg al,ah
|
|---|
| 803 | sub al,0a2h
|
|---|
| 804 | mov bl,7
|
|---|
| 805 | mov ah, 0eh
|
|---|
| 806 | ;int 10h
|
|---|
| 807 |
|
|---|
| 808 |
|
|---|
| 809 | call MBR_TeletypeSyncPos
|
|---|
| 810 |
|
|---|
| 811 | xor si,si
|
|---|
| 812 | call MBR_TeletypeNL
|
|---|
| 813 | call MBR_TeletypeNL
|
|---|
| 814 |
|
|---|
| 815 |
|
|---|
| 816 |
|
|---|
| 817 | mov si, offset ShowMenu
|
|---|
| 818 | call MBR_TeletypeBold
|
|---|
| 819 |
|
|---|
| 820 |
|
|---|
| 821 | skip:
|
|---|
| 822 |
|
|---|
| 823 |
|
|---|
| 824 |
|
|---|
| 825 | ;
|
|---|
| 826 | ; ########################### WAIT FOR KEY ################################
|
|---|
| 827 | ;
|
|---|
| 828 |
|
|---|
| 829 |
|
|---|
| 830 | ; Rousseau:
|
|---|
| 831 | ; Wait for key so we can see debug log if ab-menu hangs.
|
|---|
| 832 | ;;xor ax, ax
|
|---|
| 833 | ;;int 16h
|
|---|
| 834 |
|
|---|
| 835 | ;call SOUND_Beep
|
|---|
| 836 |
|
|---|
| 837 | ; Rousseau: delayed save of video-page
|
|---|
| 838 |
|
|---|
| 839 | mov ax, VideoIO_Page1
|
|---|
| 840 | call VideoIO_BackUpTo ; Copy BIOS POST to Second Page
|
|---|
| 841 |
|
|---|
| 842 | ;call SOUND_Beep
|
|---|
| 843 |
|
|---|
| 844 |
|
|---|
| 845 | ;
|
|---|
| 846 | ; COM-PORT DEBUG
|
|---|
| 847 | ;
|
|---|
| 848 | call AuxIO_TeletypeNL
|
|---|
| 849 | mov si, offset PartitionTable
|
|---|
| 850 | call AuxIO_DumpSector
|
|---|
| 851 | call AuxIO_TeletypeNL
|
|---|
| 852 |
|
|---|
| 853 | ;
|
|---|
| 854 | ; RE-ENTER SETUP
|
|---|
| 855 | ;
|
|---|
| 856 | MBR_Main_ReEnterSetup: ; Rousseau: SETUP re-enters here !
|
|---|
| [7] | 857 | call SETUP_CheckEnterSETUP
|
|---|
| 858 |
|
|---|
| [30] | 859 | ;call SOUND_Beep
|
|---|
| 860 |
|
|---|
| 861 |
|
|---|
| 862 |
|
|---|
| 863 |
|
|---|
| 864 | ; Rousseau: Prematurely save configuration
|
|---|
| 865 | call DriveIO_SaveConfiguration ; Rousseau: added SAVE CONFIG
|
|---|
| 866 |
|
|---|
| 867 |
|
|---|
| 868 | call AFTERCRAP_Main ; Rousseau: Every time I see "AfterCrap" I have to laugh :-)
|
|---|
| 869 |
|
|---|
| [29] | 870 | ; [Linux support removed since v1.02]
|
|---|
| 871 | ; ; Now get FAT16-Linux Kernel Partition, If requested
|
|---|
| 872 | ; cmp [CFG_LinuxKrnlPartition], 0FFh
|
|---|
| 873 | ; je MBR_Main_NoLinuxKrnlPartition
|
|---|
| 874 | ; call LINUX_InitFAT16access
|
|---|
| 875 | ; MBR_Main_NoLinuxKrnlPartition:
|
|---|
| [7] | 876 |
|
|---|
| [30] | 877 |
|
|---|
| 878 | MBR_Main_ReEnterBootMenuPre:
|
|---|
| 879 |
|
|---|
| [7] | 880 | ; SetUp PartitionPointers for BootMenu (filter non-bootable)
|
|---|
| 881 | call PART_CalculateMenuPartPointers
|
|---|
| 882 |
|
|---|
| 883 | ; ...and count that one...
|
|---|
| 884 | cmp PartitionPointerCount, 0
|
|---|
| 885 | jne MBR_Main_SomethingBootAble
|
|---|
| 886 | mov si, offset TXT_NoBootAble
|
|---|
| 887 | call MBR_Teletype
|
|---|
| 888 | jmp MBR_HaltSystem
|
|---|
| [30] | 889 |
|
|---|
| [7] | 890 | MBR_Main_SomethingBootAble:
|
|---|
| 891 | ; FixUp Values, define Timed Setup booting, etc.
|
|---|
| 892 | call PART_FixUpDefaultPartitionValues
|
|---|
| 893 |
|
|---|
| [30] | 894 |
|
|---|
| 895 |
|
|---|
| [7] | 896 | ; -------------------------------------------------- BOOT-MENU
|
|---|
| 897 | MBR_Main_ReEnterBootMenu:
|
|---|
| 898 | call BOOTMENU_ResetMenuVars ; reset has to be done
|
|---|
| 899 | test CFG_AutomaticBoot, 1
|
|---|
| 900 | jz MBR_Main_NoAutomaticBooting
|
|---|
| 901 | ; ------------------------------------------ AUTOMATIC BOOTING
|
|---|
| 902 | ; Select automatic partition, disable automatic booting for
|
|---|
| 903 | ; next time and boot system...
|
|---|
| 904 | mov CFG_AutomaticBoot, 0
|
|---|
| 905 | call PASSWORD_AskSystemPwd
|
|---|
| 906 | mov al, Menu_EntryAutomatic
|
|---|
| [30] | 907 |
|
|---|
| 908 | ;mov al, 2 ; Rousseau: 0-based
|
|---|
| 909 |
|
|---|
| [7] | 910 | mov Menu_EntrySelected, al
|
|---|
| [30] | 911 | jmp MBR_Main_NoBootMenu ; Rousseau: NO-BOOT-MENU
|
|---|
| [7] | 912 |
|
|---|
| 913 | MBR_Main_NoAutomaticBooting:
|
|---|
| [30] | 914 |
|
|---|
| 915 | ;call SOUND_Beep
|
|---|
| 916 |
|
|---|
| [7] | 917 | test CFG_BootMenuActive, 0FFh
|
|---|
| 918 | jnz MBR_Main_GotBootMenu
|
|---|
| 919 | ; ----------------------------------------------- NO BOOT-MENU
|
|---|
| 920 | ; Select default partition and boot system...
|
|---|
| 921 | call PASSWORD_AskSystemPwd
|
|---|
| [30] | 922 |
|
|---|
| 923 | ;call VideoIO_DBG_WriteString2 ; Rousseau
|
|---|
| 924 |
|
|---|
| [7] | 925 | mov al, Menu_EntryDefault
|
|---|
| [30] | 926 | ;mov al,0 ; Rousseau: 0-based
|
|---|
| [7] | 927 | mov Menu_EntrySelected, al
|
|---|
| 928 | jmp MBR_Main_NoBootMenu
|
|---|
| 929 |
|
|---|
| 930 | MBR_Main_GotBootMenu:
|
|---|
| 931 | ; ------------------------------------------ BOOT-MENU VISUALS
|
|---|
| 932 | call FX_StartScreen
|
|---|
| [30] | 933 |
|
|---|
| 934 | ;call SOUND_Beep
|
|---|
| 935 |
|
|---|
| [7] | 936 | call BOOTMENU_BuildBackground
|
|---|
| 937 | call BOOTMENU_BuildMain
|
|---|
| 938 | call FX_EndScreenRight
|
|---|
| 939 | call PASSWORD_AskSystemPwd
|
|---|
| 940 | call BOOTMENU_ResetTimedBoot
|
|---|
| [30] | 941 |
|
|---|
| 942 | ;call SOUND_Beep
|
|---|
| 943 |
|
|---|
| [7] | 944 | call BOOTMENU_Execute
|
|---|
| [30] | 945 |
|
|---|
| 946 | ;call SOUND_Beep
|
|---|
| 947 |
|
|---|
| [7] | 948 | jc MBR_Main_ReEnterSetup
|
|---|
| 949 | call BOOTMENU_SetVarsAfterMenu
|
|---|
| [30] | 950 |
|
|---|
| 951 | ;call SOUND_Beep
|
|---|
| 952 |
|
|---|
| [7] | 953 | ; ------------------------------------------------- BOOTING...
|
|---|
| 954 | MBR_Main_NoBootMenu:
|
|---|
| 955 | call FX_StartScreen
|
|---|
| 956 | call BOOTMENU_BuildGoodBye
|
|---|
| 957 | call FX_EndScreenRight
|
|---|
| 958 | call PASSWORD_AskChangeBootPwd
|
|---|
| 959 |
|
|---|
| 960 | IFNDEF ReleaseCode
|
|---|
| [29] | 961 | ; Debug Code to terminate DOS .COM program - used for
|
|---|
| 962 | ; testing AiR-BOOT
|
|---|
| 963 | int 3
|
|---|
| [7] | 964 | mov ax, 6200h
|
|---|
| 965 | int 21h
|
|---|
| 966 | mov es, bx
|
|---|
| 967 | mov ax, 4C00h ; Quit program
|
|---|
| 968 | int 21h
|
|---|
| 969 | ENDIF
|
|---|
| 970 | call ANTIVIR_SaveBackUpMBR
|
|---|
| 971 | mov dl, Menu_EntrySelected
|
|---|
| [30] | 972 | call PART_StartPartition ; Rousseau: START PARTITION
|
|---|
| [7] | 973 |
|
|---|
| [30] | 974 |
|
|---|
| 975 |
|
|---|
| 976 | ;
|
|---|
| 977 | ; Include other code-modules here.
|
|---|
| 978 | ; Because TASM is a multiple pass assembler, forward references
|
|---|
| 979 | ; are possible.
|
|---|
| 980 | ;
|
|---|
| 981 | b_std_txt:
|
|---|
| [7] | 982 | Include REGULAR\STD_TEXT.asm ; Standard (non-translateable text)
|
|---|
| [30] | 983 | size_std_txt = $-b_std_txt
|
|---|
| 984 |
|
|---|
| 985 | b_driveio:
|
|---|
| [7] | 986 | Include REGULAR\DRIVEIO.asm ; Drive I/O, Config Load/Save
|
|---|
| [30] | 987 | size_driveio = $-b_driveio
|
|---|
| 988 |
|
|---|
| 989 | b_videoio:
|
|---|
| [7] | 990 | Include REGULAR\ViDEOIO.asm ; Video I/O
|
|---|
| [30] | 991 | size_videoio = $-b_videoio
|
|---|
| 992 |
|
|---|
| 993 | b_timer:
|
|---|
| [7] | 994 | Include REGULAR\TIMER.asm ; Timer
|
|---|
| [30] | 995 | size_timer = $-b_timer
|
|---|
| 996 |
|
|---|
| 997 | b_partmain:
|
|---|
| [7] | 998 | Include REGULAR\PARTMAIN.asm ; Regular Partition Routines
|
|---|
| [30] | 999 | size_partmain = $-b_partmain
|
|---|
| 1000 |
|
|---|
| 1001 | b_partscan:
|
|---|
| [7] | 1002 | Include REGULAR\PARTSCAN.asm ; Partition Scanning
|
|---|
| [30] | 1003 | size_partscan = $-b_partscan
|
|---|
| 1004 |
|
|---|
| 1005 | b_bootmenu:
|
|---|
| [7] | 1006 | Include REGULAR\BOOTMENU.asm ; Boot-Menu
|
|---|
| [30] | 1007 | size_bootmenu = $-b_bootmenu
|
|---|
| 1008 |
|
|---|
| 1009 | b_password:
|
|---|
| [7] | 1010 | Include REGULAR\PASSWORD.asm ; Password related
|
|---|
| [30] | 1011 | size_password = $-b_password
|
|---|
| 1012 |
|
|---|
| 1013 | b_other:
|
|---|
| [7] | 1014 | Include REGULAR\OTHER.asm ; Other Routines
|
|---|
| [30] | 1015 | size_other = $-b_other
|
|---|
| [7] | 1016 |
|
|---|
| [30] | 1017 | ; Rousseau: Special modules moved upwards.
|
|---|
| 1018 | b_main:
|
|---|
| [7] | 1019 | Include SETUP\MAiN.ASM ; The whole AiR-BOOT SETUP
|
|---|
| [30] | 1020 | size_main = $-b_main
|
|---|
| 1021 |
|
|---|
| 1022 |
|
|---|
| 1023 | IFDEF TXT_IncludeCyrillic
|
|---|
| 1024 | b_ccharset:
|
|---|
| 1025 | Include SPECiAL\CHARSET.asm ; Charset Support (e.g. Cyrillic)
|
|---|
| 1026 | size_ccharset = $-b_ccharset
|
|---|
| 1027 | ENDIF
|
|---|
| 1028 |
|
|---|
| 1029 | b_math:
|
|---|
| 1030 | Include REGULAR\MATH.ASM ; Math functions (like 32-bit multiply)
|
|---|
| 1031 | size_math = $-b_math
|
|---|
| 1032 |
|
|---|
| 1033 | b_conv:
|
|---|
| 1034 | Include REGULAR\CONV.ASM ; Various conversion routines
|
|---|
| 1035 | size_conv = $-b_conv
|
|---|
| 1036 |
|
|---|
| 1037 | IFDEF AuxDebug
|
|---|
| 1038 | b_debug:
|
|---|
| 1039 | Include REGULAR\DEBUG.ASM ; Various debugging routines, uses AUXIO and CONV
|
|---|
| 1040 | size_debug = $-b_debug
|
|---|
| 1041 | ENDIF
|
|---|
| 1042 |
|
|---|
| 1043 | b_auxio:
|
|---|
| 1044 | Include REGULAR\AUXIO.ASM ; Com-port support for debugging
|
|---|
| 1045 | size_auxio = $-b_auxio
|
|---|
| 1046 |
|
|---|
| 1047 | ; Rousseau: moved upwards
|
|---|
| 1048 | ;IFDEF TXT_IncludeCyrillic
|
|---|
| 1049 | ; Include SPECiAL\CHARSET.asm ; Charset Support (e.g. Cyrillic)
|
|---|
| 1050 | ;ENDIF
|
|---|
| 1051 |
|
|---|
| 1052 | ; End of sector 3.
|
|---|
| 1053 | eos3:
|
|---|
| 1054 |
|
|---|
| 1055 |
|
|---|
| 1056 | ; Check for overlap
|
|---|
| 1057 | slack03 = sos36 - eos3
|
|---|
| 1058 | IF slack03 LT 0
|
|---|
| 1059 | .ERR2 "Location Overlap slack03 !"
|
|---|
| 1060 | ENDIF
|
|---|
| 1061 |
|
|---|
| 1062 |
|
|---|
| 1063 | ;===============================================================================
|
|---|
| 1064 |
|
|---|
| 1065 | ;
|
|---|
| 1066 | ; This is the AiR-BOOT MBR-Protection Image.
|
|---|
| 1067 | ; 04600 / 200h = 23h = 35d sectors are before this point.
|
|---|
| 1068 | ; The stuff generated here gets overwritten when the MBR_PROT.ASM
|
|---|
| 1069 | ; module, which is assembled separately, gets merged.
|
|---|
| 1070 | ; So you won't find the string below in the generated binary.
|
|---|
| 1071 | ;
|
|---|
| 1072 | org 04600h ; Sector 36-37
|
|---|
| 1073 |
|
|---|
| 1074 | ; Start of sector 36.
|
|---|
| 1075 | sos36:
|
|---|
| 1076 |
|
|---|
| 1077 | MBR_Protection: db 'AiR-BOOT MBR-Protection Image'
|
|---|
| 1078 | ; Hardcoded to 1k (1024 bytes)
|
|---|
| 1079 | db 1024-($-MBR_Protection) dup('X')
|
|---|
| 1080 |
|
|---|
| 1081 | ; End of sector 37, yes this section is 2 sectors long.
|
|---|
| 1082 | eos37:
|
|---|
| 1083 |
|
|---|
| 1084 |
|
|---|
| 1085 |
|
|---|
| 1086 | ; Check for overlap
|
|---|
| 1087 | slack04 = sos38 - eos37
|
|---|
| 1088 | IF slack04 LT 0
|
|---|
| 1089 | .ERR2 "Location Overlap slack04 !"
|
|---|
| 1090 | ENDIF
|
|---|
| 1091 |
|
|---|
| 1092 |
|
|---|
| 1093 |
|
|---|
| 1094 |
|
|---|
| 1095 | ;===============================================================================
|
|---|
| 1096 | ; Sector 38-x
|
|---|
| 1097 | ;
|
|---|
| 1098 | ; This section contains translatable texts.
|
|---|
| 1099 | ;
|
|---|
| 1100 | org 04A00h
|
|---|
| 1101 |
|
|---|
| 1102 | ; Start of sector 28.
|
|---|
| 1103 | sos38:
|
|---|
| 1104 |
|
|---|
| 1105 | b_txtother:
|
|---|
| 1106 | Include TEXT\TXTOTHER.asm ; All translateable Text-Strings
|
|---|
| 1107 | size_txtother = $-b_txtother
|
|---|
| 1108 |
|
|---|
| 1109 | b_txtmenus:
|
|---|
| 1110 | Include TEXT\TXTMENUS.asm ; All translateable Menu-text
|
|---|
| 1111 | size_txtmenus = $-b_txtmenus
|
|---|
| 1112 |
|
|---|
| 1113 | b_charset:
|
|---|
| 1114 | Include TEXT\CHARSET.asm ; Special Video Charsets (if needed)
|
|---|
| 1115 | size_charset = $-b_charset
|
|---|
| 1116 |
|
|---|
| 1117 |
|
|---|
| 1118 | ;
|
|---|
| 1119 | ; Here is room for more code.
|
|---|
| 1120 | ; Let's move the special modules here...
|
|---|
| 1121 | ; The come from the previous section.
|
|---|
| 1122 | ;
|
|---|
| 1123 | b_virus:
|
|---|
| [7] | 1124 | Include SPECiAL\ViRUS.asm ; Virus Detection / Anti-Virus
|
|---|
| [30] | 1125 | size_virus = $-b_virus
|
|---|
| [29] | 1126 | ; [Linux support removed since v1.02]
|
|---|
| 1127 | ;Include SPECiAL\FAT16.asm ; FAT-16 Support
|
|---|
| 1128 | ;Include SPECiAL\LINUX.asm ; Linux Kernel Support
|
|---|
| [30] | 1129 | b_billsuxx:
|
|---|
| [29] | 1130 | Include SPECiAL\F00K\BILLSUXX.asm ; Extended Partition - Microsoft-Hack
|
|---|
| [30] | 1131 | size_billsuxx = $-b_billsuxx
|
|---|
| 1132 |
|
|---|
| 1133 | b_sound:
|
|---|
| [7] | 1134 | Include SPECiAL\SOUND.asm ; Sound
|
|---|
| [30] | 1135 | size_sound = $-b_sound
|
|---|
| 1136 |
|
|---|
| 1137 | b_apm:
|
|---|
| [7] | 1138 | Include SPECiAL\APM.asm ; Power Managment Support
|
|---|
| [30] | 1139 | size_apm = $-b_apm
|
|---|
| 1140 |
|
|---|
| 1141 | b_fx:
|
|---|
| [7] | 1142 | Include SPECiAL\FX.asm ; l33t Cooper-Bars/Scrolling <bg>
|
|---|
| [30] | 1143 | size_fx = $-b_fx
|
|---|
| 1144 |
|
|---|
| 1145 | b_lvm:
|
|---|
| [29] | 1146 | Include SPECiAL\LVM.asm ; LVM-specific code
|
|---|
| [30] | 1147 | size_lvm = $-b_lvm
|
|---|
| 1148 |
|
|---|
| 1149 |
|
|---|
| 1150 |
|
|---|
| 1151 |
|
|---|
| 1152 |
|
|---|
| 1153 | ;
|
|---|
| 1154 | ; Let's make this always the last module in this section.
|
|---|
| 1155 | ;
|
|---|
| 1156 | Include BLDDATE.asm ; Build Date generated by _build.cmd
|
|---|
| 1157 |
|
|---|
| 1158 | ; End of sector x depending on size of translatable texts.
|
|---|
| 1159 | eosx:
|
|---|
| 1160 |
|
|---|
| 1161 | org 06A00h - 4
|
|---|
| 1162 | ;db 'BABE'
|
|---|
| 1163 |
|
|---|
| 1164 | org 06A00h
|
|---|
| 1165 | ; db 'FACE'
|
|---|
| 1166 |
|
|---|
| 1167 | ; Check for overlap
|
|---|
| 1168 | slack05 = sos55 - eosx
|
|---|
| 1169 | IF slack05 LT 0
|
|---|
| 1170 | .ERR2 "Location Overlap slack05 !"
|
|---|
| [7] | 1171 | ENDIF
|
|---|
| 1172 |
|
|---|
| 1173 |
|
|---|
| 1174 |
|
|---|
| [30] | 1175 | ;===============================================================================
|
|---|
| 1176 | ; Sector 55
|
|---|
| 1177 |
|
|---|
| 1178 | ;
|
|---|
| 1179 | ; This section contains the AiR-BOOT configuration.
|
|---|
| 1180 | ; Note that it has a version that should be updated
|
|---|
| 1181 | ; when stuff is added.
|
|---|
| 1182 | ; Also add stuff to the end so that offsets of other
|
|---|
| 1183 | ; variables remain vaild.
|
|---|
| 1184 | ;
|
|---|
| 1185 | org 06C00h
|
|---|
| 1186 | sos55:
|
|---|
| 1187 |
|
|---|
| 1188 |
|
|---|
| [7] | 1189 | Configuration:
|
|---|
| [30] | 1190 | db 'AiRCFG-TABLE' ; Rousseau: THERE IS AN INVISIBLE CHAR HERE !!
|
|---|
| 1191 | db 01h, 07h, 'U' ; "Compressed" ID String
|
|---|
| 1192 | ; This is now version 1.07 to have it in sync with the new code version for eCS.
|
|---|
| 1193 | ; Version 1.02 was for code 1.06, 1.03 was internal and 1.04,1.05 and 1.06 do not exist.
|
|---|
| 1194 | ; It is not required for the config to have the same version as the code, so in the future
|
|---|
| 1195 | ; the code version might be higher than the config version if there are no changes to the latter.
|
|---|
| [7] | 1196 |
|
|---|
| 1197 | CFG_LastTimeEditLow dw 0 ; Last Time Edited Stamp (will incr every setup)
|
|---|
| 1198 | CFG_LastTimeEditHi dw 0 ; second 16 bit part...
|
|---|
| 1199 |
|
|---|
| 1200 | CFG_CheckConfig dw 0 ; Check-Sum for Configuration
|
|---|
| 1201 |
|
|---|
| 1202 | CFG_Partitions db 0 ; Count of partitions in IPT
|
|---|
| 1203 | db 0 ; Was BootParts - Removed since v0.28b
|
|---|
| 1204 | CFG_PartDefault db 0 ; Default-Partition (Base=0)
|
|---|
| 1205 |
|
|---|
| 1206 | CFG_PartLast db 0 ; Which Partition was booted last time ? (Base=0)
|
|---|
| 1207 | CFG_TimedBoot db 1 ; Timed Boot Enable (for REAL Enable look TimedBootEnable)
|
|---|
| 1208 | CFG_TimedSecs db 15 ; Timed Boot - How Many Seconds Till Boot
|
|---|
| 1209 | CFG_TimedDelay dw 123 ; Timed Boot - Delay
|
|---|
| [30] | 1210 | CFG_TimedBootLast db 1 ; Timed Boot - Boot From Last Drive Booted From
|
|---|
| [7] | 1211 | CFG_RememberBoot db 1 ; Remember Manual Boot Choice
|
|---|
| 1212 | CFG_RememberTimed db 0 ; Remember if Timed Boot (if both disabled: Boot Default)
|
|---|
| [30] | 1213 | CFG_IncludeFloppy db 0 ; Include Floppy Drives in Boot-Menu
|
|---|
| [7] | 1214 | CFG_BootMenuActive db 1 ; Display Boot-Menu (if Disabled: Boot Default)
|
|---|
| 1215 | ; v0.29+ -> 2 - Detailed Bootmenu
|
|---|
| 1216 | CFG_PartitionsDetect db 1 ; Autodetect New Partitions (Auto-Add!)
|
|---|
| 1217 | CFG_PasswordSetup db 0 ; Ask Password when entering Setup
|
|---|
| 1218 | CFG_PasswordSystem db 0 ; Ask Password when booting System
|
|---|
| 1219 | CFG_PasswordChangeBoot db 0 ; Ask Password when changing boot partition
|
|---|
| 1220 | CFG_ProtectMBR db 0 ; Protect MBR via TSR ?
|
|---|
| 1221 | CFG_IgnoreWriteToMBR db 0 ; Just ignore writes to MBR, otherwise crash
|
|---|
| 1222 | CFG_FloppyBootGetName db 0 ; Gets floppy name for display purposes
|
|---|
| [30] | 1223 | CFG_DetectVirus db 0 ; Detect Virus ? // Rousseau: disabled
|
|---|
| 1224 | CFG_DetectStealth db 0 ; Detect Stealth-Virus ? // Rousseau: disabled
|
|---|
| 1225 | CFG_DetectVIBR db 0 ; Detect BootRecord-Virus ? // Rousseau: disabled
|
|---|
| 1226 | CFG_AutoEnterSetup db 0 ; Automatic Enter Setup (first install!) // Rousseau: disabled
|
|---|
| [7] | 1227 | CFG_MasterPassword dw 0101Fh ; Encoded Password (this is just CR)
|
|---|
| 1228 | dw 07A53h
|
|---|
| 1229 | dw 0E797h
|
|---|
| 1230 | dw 0A896h
|
|---|
| 1231 | CFG_BootPassword dw 0101Fh ; Another CR... ;-)
|
|---|
| 1232 | dw 07A53h
|
|---|
| 1233 | dw 0E797h
|
|---|
| 1234 | dw 0A896h
|
|---|
| 1235 | db 0 ; Rude-Protection - Removed since v0.28b
|
|---|
| 1236 | CFG_LinuxRootPartition db 0 ; Linux Root Partition (Base=0)
|
|---|
| 1237 | CFG_TimedKeyHandling db 0 ; Timed Key Handling (for Timed Boot)
|
|---|
| 1238 | ; 0 - Do Nothing
|
|---|
| 1239 | ; 1 - Reset Time
|
|---|
| 1240 | ; 2 - Stop Time
|
|---|
| 1241 | CFG_MakeSound db 0 ; Should be clear ;)
|
|---|
| 1242 | CFG_FloppyBootGetTimer db 0 ; Floppy Name will get updated every 2 secs
|
|---|
| 1243 | CFG_ResumeBIOSbootSeq db 0 ; If BIOS Boot Sequence should be resumed
|
|---|
| 1244 | ; 0 - Disabled
|
|---|
| 1245 | ; 1 - CD-ROM
|
|---|
| 1246 | ; 2 - Network
|
|---|
| 1247 | ; 3 - ZIP/LS120
|
|---|
| 1248 | CFG_CooperBars db 0 ; If Cooper Bars should be shown
|
|---|
| 1249 | CFG_LinuxCommandLine db 75 dup (0) ; Linux Command Line
|
|---|
| 1250 | CFG_LinuxKrnlPartition db 0FFh ; FAT-16 Linux Kernel Partition (Base=0)
|
|---|
| 1251 | ; FFh -> Disabled
|
|---|
| 1252 | CFG_LinuxDefaultKernel db 'DEFAULT', 4 dup (32), 0 ; Default Kernel Name
|
|---|
| 1253 | CFG_LinuxLastKernel db 11 dup (32), 0 ; Last-Booted Kernel Name
|
|---|
| 1254 | CFG_ExtPartitionMShack db 0 ; Extended Partition M$-Hack Global Enable
|
|---|
| 1255 | CFG_AutomaticBoot db 0 ; Automatic Booting (only one bootup)
|
|---|
| 1256 | CFG_PartAutomatic db 0 ; Partition-No for automatic booting
|
|---|
| [30] | 1257 | CFG_ForceLBAUsage db 1 ; LBA-BIOS-API forced on any HDD I/O // Rousseau: enabled config (LBA)
|
|---|
| [29] | 1258 | CFG_IgnoreLVM db 0 ; Ignores any LVM-Information
|
|---|
| [7] | 1259 |
|
|---|
| [30] | 1260 |
|
|---|
| 1261 | ;
|
|---|
| 1262 | ; THERE IS ROOM RESERVED HERE FOR MORE VARIABLES
|
|---|
| 1263 | ;
|
|---|
| 1264 |
|
|---|
| 1265 |
|
|---|
| 1266 | eoc:
|
|---|
| 1267 |
|
|---|
| 1268 | ; Check for overlap
|
|---|
| 1269 | slack05a = soiv - eoc
|
|---|
| 1270 | IF slack05a LT 0
|
|---|
| 1271 | .ERR2 "Location Overlap slack05a !"
|
|---|
| 1272 | ENDIF
|
|---|
| 1273 |
|
|---|
| 1274 | ; Allways have the name of the installation volume
|
|---|
| 1275 | ; at this offset.
|
|---|
| 1276 | ; So future config changes will not break auto-install.
|
|---|
| 1277 | org 06D00h
|
|---|
| 1278 |
|
|---|
| 1279 | soiv:
|
|---|
| 1280 |
|
|---|
| 1281 | ; Rousseau: added
|
|---|
| 1282 | ;eCS_InstallVolume db 12 dup (0) ; Rousseau: new install-volume
|
|---|
| 1283 | ;eCS_InstallVolume db 'HIGHLOG' ,0 ; Rousseau: new install-volume
|
|---|
| 1284 | eCS_InstallVolume db 0,'NOPHASEONE' ,0 ; Rousseau: new install-volume
|
|---|
| 1285 | ;eCS_InstallVolume db 'ECS-MIDDLE',0,0 ; Rousseau: new install-volume
|
|---|
| 1286 | ;eCS_InstallVolume db 'ECS-HIGH',0,0,0,0 ; Rousseau: new install-volume
|
|---|
| 1287 | ;eCS_InstallVolume db 'ECS-HIGH',0,'NO',0 ; Rousseau: new install-volume
|
|---|
| 1288 |
|
|---|
| 1289 |
|
|---|
| 1290 |
|
|---|
| 1291 | ; End of sector 55.
|
|---|
| 1292 | eos55:
|
|---|
| 1293 |
|
|---|
| 1294 |
|
|---|
| 1295 |
|
|---|
| 1296 | ; Check for overlap
|
|---|
| 1297 | slack06 = sosvs - eos55
|
|---|
| 1298 | IF slack06 LT 0
|
|---|
| 1299 | .ERR2 "Location Overlap slack06 !"
|
|---|
| 1300 | ENDIF
|
|---|
| 1301 |
|
|---|
| 1302 |
|
|---|
| 1303 |
|
|---|
| [7] | 1304 | ; VIR variables are for the AiR-BOOT Anti Virus Code
|
|---|
| 1305 | ; Most of them are backups of Interrupt Points, so we can check, if a
|
|---|
| 1306 | ; stealth virus is on-line, we can intercept its call.
|
|---|
| 1307 | ; Normal (non stealth) virus are trapped simply by rereading the MBR sector.
|
|---|
| [30] | 1308 | ; If a virus is found, we will restore MBR from Sektor 60/62 and stop the system
|
|---|
| [7] | 1309 | ; from working, so the user has to press reset. That's saver than a Reboot.
|
|---|
| 1310 | ;
|
|---|
| 1311 | ; If a virus is found on the partition to boot, the system will ONLY halt,
|
|---|
| 1312 | ; nothing more, because we can not remove it. The user shall do it :)
|
|---|
| 1313 | ; Those viruses are detected via a real nasty method...Checksum-Checking of the
|
|---|
| 1314 | ; boot-record, which is to be executed. If it does not match the one in our
|
|---|
| 1315 | ; internal partition table, we will stop. You may however switch this detection
|
|---|
| 1316 | ; off or just reset it by switching 'VIBR Detection'.
|
|---|
| 1317 |
|
|---|
| [30] | 1318 |
|
|---|
| 1319 | ;
|
|---|
| 1320 | ; 06DABh - 06C00h = 01ABh = 427 bytes.
|
|---|
| 1321 | ;
|
|---|
| [7] | 1322 | org 06DABh ; 427 Boundry
|
|---|
| [30] | 1323 |
|
|---|
| 1324 | sosvs:
|
|---|
| 1325 |
|
|---|
| [7] | 1326 | AutoDrvLetter db 0
|
|---|
| 1327 | AutoDrvLetterSerial dd 0
|
|---|
| 1328 |
|
|---|
| [30] | 1329 | ; This entry is also 34 bytes long
|
|---|
| [7] | 1330 | BIOScontIPTentry:
|
|---|
| 1331 | db 0, 0, 0, 0, ' '
|
|---|
| 1332 | db 0, 0FEh, Flags_BootAble
|
|---|
| 1333 | dw 0 ; No Checksum :)
|
|---|
| 1334 | db 0, 1, 0
|
|---|
| 1335 | db 0, 1, 0 ; Location of Partition/Boot Record
|
|---|
| 1336 | dd 0, 0
|
|---|
| 1337 |
|
|---|
| 1338 | ; 466 Sub-Part
|
|---|
| 1339 | CFG_VIR_INT08 dd 0 ; pointer to saved 08h entry point
|
|---|
| 1340 | CFG_VIR_INT13 dd 0 ; pointer to saved 13h entry point
|
|---|
| 1341 | CFG_VIR_INT1C dd 0 ; pointer to saved 1Ch entry point
|
|---|
| 1342 |
|
|---|
| [30] | 1343 | ; 478 Boundry
|
|---|
| 1344 | ; This entry is also 34 bytes long
|
|---|
| [7] | 1345 | FloppyIPTentry: db 0, 0, 0, 0, 'FloppyDrive'
|
|---|
| 1346 | db 0, 0FFh, Flags_BootAble
|
|---|
| 1347 | dw 0 ; No Checksum :)
|
|---|
| 1348 | db 0, 1, 0
|
|---|
| 1349 | db 0, 1, 0 ; Location of Partition/Boot Record
|
|---|
| 1350 | dd 0, 0
|
|---|
| 1351 | ;---------------------------------------------------------------------------
|
|---|
| [30] | 1352 |
|
|---|
| 1353 | eosvs:
|
|---|
| 1354 |
|
|---|
| 1355 | ; Check for overlap
|
|---|
| 1356 | slack07 = sos56 - eosvs
|
|---|
| 1357 | IF slack07 LT 0
|
|---|
| 1358 | .ERR2 "Location Overlap slack07 !"
|
|---|
| 1359 | ENDIF
|
|---|
| 1360 |
|
|---|
| 1361 |
|
|---|
| 1362 | ;org 06E00h ; Sector 56-57
|
|---|
| 1363 | org image_size - 0a00h - (image_size - image_size_60secs)
|
|---|
| 1364 | sos56:
|
|---|
| 1365 |
|
|---|
| 1366 |
|
|---|
| 1367 |
|
|---|
| 1368 | ; Rousseau: This is the start of the AiR-BOOT IPT
|
|---|
| 1369 |
|
|---|
| [7] | 1370 | PartitionTable: ; no-partitions detected... :]
|
|---|
| 1371 | ; db 1, 0, 0, 0, 'Harddisc 1'
|
|---|
| 1372 | ; db 0, 0FFh, Flags_BootAble
|
|---|
| 1373 | ; dw 0 ; No Checksum :)
|
|---|
| 1374 | ; db 0, 0, 1
|
|---|
| 1375 | ; db 0, 0, 1 ; Location of Partition/Boot Record
|
|---|
| 1376 | ; dd 0, 0
|
|---|
| 1377 |
|
|---|
| 1378 | ; Format is:
|
|---|
| 1379 | ;============
|
|---|
| 1380 | ; SerialNumber * 4
|
|---|
| 1381 | ; PartitionName * 11
|
|---|
| 1382 | ; Drive * 1
|
|---|
| 1383 | ; SystemID * 1 (means the partition type)
|
|---|
| 1384 | ; Flags * 1
|
|---|
| 1385 | ; Checksum * 2 (for virus checking)
|
|---|
| 1386 | ; LocationBegin * 3 (where the partition begins)
|
|---|
| 1387 | ; LocationPartTab * 3 (where the partition table is)
|
|---|
| 1388 | ; AbsoluteBegin * 4 (where the partition begins, in absolute sectors)
|
|---|
| 1389 | ; AbsolutePartTab * 4 (where the partition table is, in absolute sectors)
|
|---|
| [30] | 1390 | ; --------------------> 34 Bytes (total maximum partition-entries = 30)
|
|---|
| [7] | 1391 |
|
|---|
| [30] | 1392 | db (partition_count * 34) dup ('P')
|
|---|
| 1393 |
|
|---|
| 1394 | eos56:
|
|---|
| 1395 |
|
|---|
| 1396 | ; Check for overlap
|
|---|
| 1397 | slack08 = eoiptsig - eos56
|
|---|
| 1398 | IF slack08 LT 0
|
|---|
| 1399 | .ERR2 "Location Overlap slack08 !"
|
|---|
| 1400 | ENDIF
|
|---|
| 1401 |
|
|---|
| 1402 |
|
|---|
| 1403 | ;org 071F6h
|
|---|
| 1404 | org image_size - 600h - (image_size - image_size_60secs) / 2 - 0ah
|
|---|
| 1405 | soiptsig:
|
|---|
| [7] | 1406 | db 'AiRBOOTPAR' ; 1K internal partition table
|
|---|
| [30] | 1407 |
|
|---|
| 1408 |
|
|---|
| 1409 |
|
|---|
| 1410 | eoiptsig:
|
|---|
| 1411 |
|
|---|
| 1412 | ; Check for overlap
|
|---|
| 1413 | slack09 = soipt - eoiptsig
|
|---|
| 1414 | IF slack09 LT 0
|
|---|
| 1415 | .ERR2 "Location Overlap slack09 !"
|
|---|
| 1416 | ENDIF
|
|---|
| 1417 |
|
|---|
| [7] | 1418 | ;---------------------------------------------------------------------------
|
|---|
| [30] | 1419 | ;org 07200h ; Sector 58
|
|---|
| 1420 | org image_size - 600h - (image_size - image_size_60secs) / 2 ; Sector 58
|
|---|
| 1421 | soipt:
|
|---|
| 1422 | sos58:
|
|---|
| 1423 |
|
|---|
| 1424 | HidePartitionTable: db (partition_count * 30) dup (0FFh)
|
|---|
| [7] | 1425 | ; Format is:
|
|---|
| 1426 | ;============
|
|---|
| 1427 | ; PartitionPtr : BYTE * 30
|
|---|
| 1428 | ; --------------------> 30 Bytes * 30
|
|---|
| 1429 |
|
|---|
| [30] | 1430 | DriveLetters: db partition_count dup (0)
|
|---|
| [7] | 1431 | ; Format is:
|
|---|
| 1432 | ;============
|
|---|
| 1433 | ; Drive-Letter : BYTE (80h-C:, 81h-D:)
|
|---|
| 1434 | ; --------------------> 1 Byte * 30
|
|---|
| [30] | 1435 | eos58:
|
|---|
| 1436 | eoipt:
|
|---|
| [7] | 1437 |
|
|---|
| [30] | 1438 | ; Check foroverlap
|
|---|
| 1439 | slack10 = sohidsig - eoipt
|
|---|
| 1440 | IF slack10 LT 0
|
|---|
| 1441 | .ERR2 "Location Overlap slack10 !"
|
|---|
| 1442 | ENDIF
|
|---|
| 1443 |
|
|---|
| 1444 |
|
|---|
| 1445 |
|
|---|
| 1446 | ;org 075F6h
|
|---|
| 1447 | org image_size - 200h -0ah
|
|---|
| 1448 |
|
|---|
| 1449 | sohidsig:
|
|---|
| [7] | 1450 | db 'AiRBOOTHID' ; 1K internal Hide-partition table
|
|---|
| [30] | 1451 |
|
|---|
| 1452 | eohidsig:
|
|---|
| 1453 |
|
|---|
| 1454 | ; Check for overlap
|
|---|
| 1455 | slack11 = sohid - eohidsig
|
|---|
| 1456 | IF slack11 LT 0
|
|---|
| 1457 | .ERR2 "Location Overlap slack11 !"
|
|---|
| 1458 | ENDIF
|
|---|
| 1459 |
|
|---|
| 1460 |
|
|---|
| 1461 |
|
|---|
| 1462 |
|
|---|
| [7] | 1463 | ;---------------------------------------------------------------------------
|
|---|
| [30] | 1464 | ;org 07600h ; Sector 60
|
|---|
| 1465 | org image_size - 200h ; Sector 60
|
|---|
| 1466 | sohid:
|
|---|
| 1467 | sos60:
|
|---|
| 1468 | MBR_BackUpMBR db 'AiR-BOOT MBR-BackUp - Just to fill this sector with something',0
|
|---|
| 1469 | AirBootRocks db 'AiR-BOOT Rocks!',0
|
|---|
| [7] | 1470 |
|
|---|
| [30] | 1471 | eos60:
|
|---|
| 1472 | eohid:
|
|---|
| 1473 |
|
|---|
| 1474 | ; Check for overlap
|
|---|
| 1475 | slack12 = eoab - eohid
|
|---|
| 1476 | IF slack12 LT 0
|
|---|
| 1477 | .ERR2 "Location Overlap slack12 !"
|
|---|
| 1478 | ENDIF
|
|---|
| 1479 |
|
|---|
| 1480 |
|
|---|
| 1481 | ;org 077FEh
|
|---|
| 1482 | org image_size - 2
|
|---|
| 1483 | dw 0BABEh
|
|---|
| 1484 | ;dw 0
|
|---|
| 1485 | ;BIOS_AuxParms dw BIOS_AuxParmsDefault ; Initialized at start when developing
|
|---|
| 1486 |
|
|---|
| 1487 | eoab:
|
|---|
| 1488 |
|
|---|
| 1489 | ;
|
|---|
| 1490 | ; Rousseau:
|
|---|
| 1491 | ; End of AiR-BOOT code and data.
|
|---|
| 1492 | ;
|
|---|
| 1493 |
|
|---|
| 1494 |
|
|---|
| 1495 | ;
|
|---|
| 1496 | ; Rousseau:
|
|---|
| 1497 | ; Below functions like a BSS segment, thus uninitialized data.
|
|---|
| 1498 | ;
|
|---|
| 1499 | sobss:
|
|---|
| [7] | 1500 | ;---------------------------------------------------------------------------
|
|---|
| 1501 | org 0A000h ; Uninitialized
|
|---|
| 1502 | ; This space actually gets initialized in PreCrap to NUL (till EndOfVariables)
|
|---|
| 1503 | BeginOfVariables:
|
|---|
| [29] | 1504 | PartitionSector db 512 dup (?) ; Temporary Sector for Partition
|
|---|
| 1505 | LVMSector: db 512 dup (?) ; Temporary Sector for LVM
|
|---|
| [7] | 1506 | TmpSector: db 512 dup (?) ; Temporary Sector
|
|---|
| [30] | 1507 |
|
|---|
| [7] | 1508 | ; Everything used to build a new IPT and reference it to the old one
|
|---|
| [30] | 1509 | NewPartTable: db 1536 dup (?) ; New Partition Table
|
|---|
| 1510 | NewHidePartTable: db partition_count * 30 dup (?) ; New Hide-Partition Table
|
|---|
| 1511 | NewDriveLetters: db partition_count dup (?) ; Logical Drive-Letters
|
|---|
| [7] | 1512 |
|
|---|
| [30] | 1513 | PartitionSizeTable: db partition_count * 6 dup (?) ; Size-Table (6 bytes per partition)
|
|---|
| [7] | 1514 | PartitionPointers dw 52 dup (?) ; Maximum is 52 entries till now
|
|---|
| 1515 | PartitionPointerCount db ? ; Count of total Partition Pointers
|
|---|
| [30] | 1516 | PartitionXref db partition_count dup (?) ; X-Reference Table
|
|---|
| 1517 | PartitionVolumeLetters db partition_count dup (?) ; Volume-Letters
|
|---|
| [29] | 1518 | ; 0 - no LVM support
|
|---|
| 1519 | ; 1 - LVM support, but no letter
|
|---|
| 1520 | ; 'C'-'Z' - assigned drive letter
|
|---|
| [7] | 1521 |
|
|---|
| [29] | 1522 | TotalHarddiscs db ? ; Total harddrives (by POST)
|
|---|
| 1523 | LBASwitchTable db 128 dup (?) ; Bit 25-18 for CHS/LBA Switching
|
|---|
| [30] | 1524 | NewPartitions db ? ; Freshly found partitions ; Independent of SaveConfiguration
|
|---|
| [7] | 1525 |
|
|---|
| 1526 | VideoIO_Segment dw ? ; Segment for Video I/O
|
|---|
| 1527 |
|
|---|
| 1528 | ExtendedAbsPos dd ? ; Extended Partition Absolute Position
|
|---|
| 1529 | ExtendedAbsPosSet db ? ; If Absolute Position set
|
|---|
| 1530 |
|
|---|
| 1531 | CurPartition_Location dw 4 dup (?) ; Where did current partition came from?
|
|---|
| 1532 | CurIO_UseExtension db ? ; 1-Use INT 13h EXTENSIONS
|
|---|
| [26] | 1533 | ; (filled out by PreCrap)
|
|---|
| 1534 | CurIO_Scanning db ? ; 1-AiR-BOOT is scanning partitions
|
|---|
| 1535 | ; (for detailed error message)
|
|---|
| [7] | 1536 |
|
|---|
| [29] | 1537 | ; [Linux support removed since v1.02]
|
|---|
| 1538 | ;GotLinux db ? ; 1-Linux found
|
|---|
| [7] | 1539 |
|
|---|
| 1540 | Menu_EntrySelected db ? ; Which partition we boot this time...
|
|---|
| 1541 | Menu_UpperPart db ? ; Which number (Base=0) is the partition upper pos
|
|---|
| 1542 | Menu_AbsoluteX db ? ; Pos where Menu stuff starts
|
|---|
| 1543 | Menu_TotalParts db ? ; Copy of CFG_BootParts
|
|---|
| 1544 | Menu_TotalLines db ? ; Total Lines on Screen used for BootMenu
|
|---|
| 1545 | Menu_EntryDefault db ? ; Default Entry in filtered View
|
|---|
| 1546 | Menu_EntryLast db ? ; LastBooted Entry in filtered View
|
|---|
| 1547 | Menu_EntryAutomatic db ? ; Automatic Entry in filtered View
|
|---|
| 1548 | ; - All adjusted to menu locations
|
|---|
| 1549 |
|
|---|
| 1550 | PartSetup_UpperPart db ? ; Partition-Setup (like Menu_UpperPart)
|
|---|
| 1551 | PartSetup_ActivePart db ? ; Active Partition
|
|---|
| 1552 | PartSetup_HiddenUpper db ? ; (like Menu_UpperPart)
|
|---|
| 1553 | PartSetup_HiddenX db ? ; Pos for Hidden-Setup
|
|---|
| 1554 | PartSetup_HiddenAdd db ? ; Adjust for Hidden-Setup
|
|---|
| 1555 |
|
|---|
| 1556 | TimedBootEnable db ? ; Local Enable/Disable for timed boot
|
|---|
| 1557 | TimedTimeOut dd ? ; TimeOut Timer for TimedBoot (too much time here ;)
|
|---|
| 1558 | TimedSecondLeft db ? ; How many seconds are left till boom ?
|
|---|
| 1559 | TimedSecondBack db ? ; To get a modification noticed
|
|---|
| 1560 | TimedBootUsed db ? ; Timed Boot used for bootup ?
|
|---|
| 1561 | FloppyGetNameTimer dd ? ; Timer for Floppy-Get-Name
|
|---|
| 1562 | SETUP_KeysOnEntry db ? ; which Shift Status was there, when booting ?
|
|---|
| 1563 | SETUP_ExitEvent db ? ; Exit Event to end SETUP
|
|---|
| 1564 | TempPasswordEntry db 17 dup (?)
|
|---|
| 1565 | SETUP_OldPwd db 17 dup (?)
|
|---|
| 1566 | SETUP_NewPwd db 17 dup (?)
|
|---|
| 1567 | SETUP_VerifyPwd db 17 dup (?)
|
|---|
| 1568 | StartSoundPlayed db ?
|
|---|
| [29] | 1569 | ChangePartNameSave db ?
|
|---|
| [7] | 1570 |
|
|---|
| 1571 | FX_UseCount dw ?
|
|---|
| 1572 | FX_OverallTimer dw ?
|
|---|
| 1573 | FX_WideScrollerTimer dw ?
|
|---|
| 1574 | FX_WideScrollerCurPos dw ?
|
|---|
| 1575 | FX_WideScrollerSpeed db ?
|
|---|
| 1576 | FX_WideScrollerSpeedState db ?
|
|---|
| 1577 | FX_WideScrollerDirection db ?
|
|---|
| 1578 | FX_WideScrollerAbsDirection db ?
|
|---|
| 1579 | FX_WideScrollerBounceSpeed db ?
|
|---|
| 1580 | FX_CooperBarsTimer dw ?
|
|---|
| 1581 |
|
|---|
| [29] | 1582 | ; [Linux support removed since v1.02]
|
|---|
| 1583 | ;FAT16_Drive db ? ; FAT-16: Drive of FAT16-partition
|
|---|
| 1584 | ;FAT16_AbsPartitionBegin dd ? ; FAT-16: LBA Begin of Partition
|
|---|
| 1585 | ;FAT16_SecsPerCluster db ? ; FAT-16: Sectors Per Cluster
|
|---|
| 1586 | ;FAT16_NumOfRootEntries dw ? ; FAT-16: Number of Root Entries
|
|---|
| 1587 | ;FAT16_SecsPerFAT dw ? ; FAT-16: Sectors Per FAT
|
|---|
| 1588 | ;FAT16_AbsFATBegin dd ? ; FAT-16: LBA Begin of FAT
|
|---|
| 1589 | ;FAT16_AbsRootBegin dd ? ; FAT-16: LBA Begin of Root
|
|---|
| 1590 | ;FAT16_AbsClusterBegin dd ? ; FAT-16: LBA Begin of Clusters
|
|---|
| 1591 | ;FAT16_FATCacheSector db ? ; FAT-16: FAT-Sector No in Cache
|
|---|
| 1592 | ;FAT16_FATCache db 512 dup (?) ; FAT-16: FAT-Area Cache
|
|---|
| 1593 | ;
|
|---|
| 1594 | ;LINUX_KernelEntries db 680 dup (?) ; 34*20 -> Space for Kernel-Entries
|
|---|
| 1595 | ;LINUX_KernelNo db ? ; Total of Kernels in KernelEntries
|
|---|
| 1596 | ;LINUX_KernelSizeTable db 120 dup (?) ; Size-Table (6 bytes per kernel)
|
|---|
| [30] | 1597 | ;EndOfVariables:
|
|---|
| [7] | 1598 |
|
|---|
| [29] | 1599 | ; Dynamically Generated Tables - do not need to get initialized with NUL
|
|---|
| [7] | 1600 | FX_CooperColors db 672 dup (?) ; 7 cooper bars*96 - runtime calculated
|
|---|
| 1601 | FX_CooperState: db 7 dup (?)
|
|---|
| 1602 | FX_SinusPos: db 7 dup (?)
|
|---|
| 1603 | FX_CooperPos: dw 7 dup (?)
|
|---|
| 1604 | CharsetTempBuffer db 4096 dup (?) ; Uninitialized Charset buffer
|
|---|
| [29] | 1605 | LVM_CRCTable: dd 256 dup (?) ; LVM-CRC (->SPECiAL\LVM.asm)
|
|---|
| [7] | 1606 |
|
|---|
| [30] | 1607 |
|
|---|
| 1608 |
|
|---|
| 1609 | ;
|
|---|
| 1610 | ; Rousseau: added some stuff.
|
|---|
| 1611 | ;
|
|---|
| 1612 |
|
|---|
| 1613 |
|
|---|
| 1614 | ;EVEN
|
|---|
| 1615 | HugeDisk db MaxDisks dup(?)
|
|---|
| 1616 | TrueSecs dd MaxDisks dup(?)
|
|---|
| 1617 |
|
|---|
| 1618 | ; BIOS geometry of the boot-drive
|
|---|
| 1619 | ; Note that heads cannot be 256 due to legacy DOS/BIOS bug
|
|---|
| 1620 | ; If Int13X is supported those values are used, otherwise the legacy values.
|
|---|
| 1621 | BIOS_Cyls dd MaxDisks dup(?)
|
|---|
| 1622 | BIOS_Heads dd MaxDisks dup(?)
|
|---|
| 1623 | BIOS_Secs dd MaxDisks dup(?)
|
|---|
| 1624 | BIOS_Bytes dw MaxDisks dup(?)
|
|---|
| 1625 | BIOS_TotalSecs dq MaxDisks dup(?)
|
|---|
| 1626 |
|
|---|
| 1627 | ; LBA geometry of the boot-drive
|
|---|
| 1628 | ; Note that these values are taken from the BPB of a partition boot-record
|
|---|
| 1629 | LVM_Cyls dd MaxDisks dup(?)
|
|---|
| 1630 | LVM_Heads dd MaxDisks dup(?)
|
|---|
| 1631 | LVM_Secs dd MaxDisks dup(?)
|
|---|
| 1632 | LVM_Bytes dw MaxDisks dup(?)
|
|---|
| 1633 | LVM_TotalSecs dq MaxDisks dup(?)
|
|---|
| 1634 |
|
|---|
| 1635 | ; OS/2 geometry of the boot-drive
|
|---|
| 1636 | ; Note that these values are taken from the BPB of a partition boot-record
|
|---|
| 1637 | LOG_Cyls dd MaxDisks dup(?)
|
|---|
| 1638 | LOG_Heads dd MaxDisks dup(?)
|
|---|
| 1639 | LOG_Secs dd MaxDisks dup(?)
|
|---|
| 1640 | LOG_Bytes dw MaxDisks dup(?)
|
|---|
| 1641 | LOG_TotalSecs dq MaxDisks dup(?)
|
|---|
| 1642 |
|
|---|
| 1643 | ; Rousseau: moved here
|
|---|
| 1644 | EndOfVariables:
|
|---|
| 1645 |
|
|---|
| 1646 | ; Temporary buffer for 48h INT13X bios call
|
|---|
| 1647 | ; Word aligned
|
|---|
| 1648 | ;even
|
|---|
| 1649 | ;align 2
|
|---|
| 1650 |
|
|---|
| 1651 | ;db 1 dup(?)
|
|---|
| 1652 |
|
|---|
| 1653 | i13xbuf dw 1 dup (?) ; Size of the buffer; this param *must* be present. Code inserts it.
|
|---|
| 1654 | db 126 dup(?) ; The buffer itself.
|
|---|
| 1655 | i13xbuf_size = $-offset i13xbuf-2 ; Size of buffer (excluding the size word at the start).
|
|---|
| 1656 |
|
|---|
| 1657 | eobss:
|
|---|
| 1658 |
|
|---|
| 1659 |
|
|---|
| [7] | 1660 | code_seg ends
|
|---|
| 1661 | end air_boot
|
|---|