wok view BootProg/stuff/boot32.asm @ rev 25467

Up gnumeric (1.12.53)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 03 08:28:51 2022 +0000 (19 months ago)
parents 81fc994927a6
children 2155b2665e26
line source
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ;; ;;
3 ;; "BootProg" Loader v 1.5 by Alexey Frunze (c) 2000-2015 ;;
4 ;; 2-clause BSD license. ;;
5 ;; ;;
6 ;; ;;
7 ;; How to Compile: ;;
8 ;; ~~~~~~~~~~~~~~~ ;;
9 ;; nasm boot32.asm -f bin -o boot32.bin ;;
10 ;; ;;
11 ;; ;;
12 ;; Features: ;;
13 ;; ~~~~~~~~~ ;;
14 ;; - FAT32 supported using BIOS int 13h function 42h (IOW, it will only ;;
15 ;; work with modern BIOSes supporting HDDs bigger than 8 GB) ;;
16 ;; ;;
17 ;; - Loads a 16-bit executable file in the MS-DOS .COM or .EXE format ;;
18 ;; from the root directory of a disk and transfers control to it ;;
19 ;; (the "ProgramName" variable holds the name of the file to be loaded) ;;
20 ;; Its maximum size can be up to 637KB without Extended BIOS Data area. ;;
21 ;; ;;
22 ;; - Prints an error if the file isn't found or couldn't be read ;;
23 ;; ("File not found" or "Read error") ;;
24 ;; and waits for a key to be pressed, then executes the Int 19h ;;
25 ;; instruction and lets the BIOS continue bootstrap. ;;
26 ;; ;;
27 ;; ;;
28 ;; Known Bugs: ;;
29 ;; ~~~~~~~~~~~ ;;
30 ;; - All bugs are fixed as far as I know. The boot sector has been tested ;;
31 ;; on my HDD and an 8GB USB stick. ;;
32 ;; ;;
33 ;; ;;
34 ;; Memory Layout: ;;
35 ;; ~~~~~~~~~~~~~~ ;;
36 ;; The diagram below shows the typical memory layout. The actual location ;;
37 ;; of the boot sector and its stack may be lower than A0000H if the BIOS ;;
38 ;; reserves memory for its Extended BIOS Data Area just below A0000H and ;;
39 ;; reports less than 640 KB of RAM via its Int 12H function. ;;
40 ;; ;;
41 ;; physical address ;;
42 ;; +------------------------+ 00000H ;;
43 ;; | Interrupt Vector Table | ;;
44 ;; +------------------------+ 00400H ;;
45 ;; | BIOS Data Area | ;;
46 ;; +------------------------+ 00500H ;;
47 ;; | PrtScr Status / Unused | ;;
48 ;; +------------------------+ 00600H ;;
49 ;; | Loaded Image | ;;
50 ;; +------------------------+ nnnnnH ;;
51 ;; | Available Memory | ;;
52 ;; +------------------------+ A0000H - 1KB ;;
53 ;; | Boot Sector | ;;
54 ;; +------------------------+ A0000H - 0.5KB ;;
55 ;; | 0.5KB Boot Stack | ;;
56 ;; +------------------------+ A0000H ;;
57 ;; | Video RAM | ;;
58 ;; ;;
59 ;; ;;
60 ;; Boot Image Startup (register values): ;;
61 ;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;;
62 ;; ax = 0ffffh (both FCB in the PSP don't have a valid drive identifier), ;;
63 ;; bx = 0, dl = BIOS boot drive number (e.g. 0, 80H) ;;
64 ;; cs:ip = program entry point ;;
65 ;; ss:sp = program stack (don't confuse with boot sector's stack) ;;
66 ;; COM program defaults: cs = ds = es = ss = 50h, sp = 0, ip = 100h ;;
67 ;; EXE program defaults: ds = es = EXE data - 10h (fake MS-DOS psp), ;;
68 ;; cs:ip and ss:sp depends on EXE header ;;
69 ;; Magic numbers: ;;
70 ;; si = 16381 (prime number 2**14-3) ;;
71 ;; di = 32749 (prime number 2**15-19) ;;
72 ;; bp = 65521 (prime number 2**16-15) ;;
73 ;; The magic numbers let the program know whether it has been loaded by ;;
74 ;; this boot sector or by MS-DOS, which may be handy for universal, bare- ;;
75 ;; metal and MS-DOS programs. ;;
76 ;; The command line contains no arguments. ;;
77 ;; ;;
78 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
80 %define bx(label) bx+label-boot
81 %define si(label) si+label-boot
82 ClusterMask equ 1 ; +9 bytes
83 NullEntryCheck equ 1 ; +5 bytes
84 ReadRetry equ 1 ; +7 bytes
85 LBA48bits equ 1 ; +15 bytes
86 CHSsupport equ 1 ; +27 bytes
87 CHSupTo8GB equ 1 ; +11 bytes
88 CHSupTo32MB equ 1 ; +7 bytes
89 SectorOf512Bytes equ 1 ; -5 bytes
90 Always2FATs equ 0 ; -4 bytes
91 CheckAttrib equ 0 ; +6 bytes
93 [BITS 16]
95 ImageLoadSeg equ 60h ; <=07Fh because of "push byte ImageLoadSeg" instructions
96 StackSize equ 512
98 [SECTION .text]
99 [ORG 0]
101 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
102 ;; Boot sector starts here ;;
103 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
105 boot:
106 DriveNumber equ boot+0
107 HiLBA equ boot+2
108 jmp short start ; MS-DOS/Windows checks for this jump
109 nop
110 bsOemName DB "BootProg" ; 0x03
112 ;;;;;;;;;;;;;;;;;;;;;;
113 ;; BPB1 starts here ;;
114 ;;;;;;;;;;;;;;;;;;;;;;
116 bpbBytesPerSector DW 0 ; 0x0B
117 bpbSectorsPerCluster DB 0 ; 0x0D
118 bpbReservedSectors DW 0 ; 0x0E
119 bpbNumberOfFATs DB 0 ; 0x10
120 bpbRootEntries DW 0 ; 0x11
121 bpbTotalSectors DW 0 ; 0x13
122 bpbMedia DB 0 ; 0x15
123 bpbSectorsPerFAT DW 0 ; 0x16
124 bpbSectorsPerTrack DW 0 ; 0x18
125 bpbHeadsPerCylinder DW 0 ; 0x1A
126 bpbHiddenSectors DD 0 ; 0x1C
127 bpbTotalSectorsBig DD 0 ; 0x20
129 ;;;;;;;;;;;;;;;;;;;;
130 ;; BPB1 ends here ;;
131 ;;;;;;;;;;;;;;;;;;;;
133 ;;;;;;;;;;;;;;;;;;;;;;
134 ;; BPB2 starts here ;;
135 ;;;;;;;;;;;;;;;;;;;;;;
137 bsSectorsPerFAT32 DD 0 ; 0x24
138 bsExtendedFlags DW 0 ; 0x28
139 bsFSVersion DW 0 ; 0x2A
140 bsRootDirectoryClusterNo DD 0 ; 0x2C
141 bsFSInfoSectorNo DW 0 ; 0x30
142 bsBackupBootSectorNo DW 0 ; 0x32
143 bsreserved times 12 DB 0 ; 0x34
144 bsDriveNumber DB 0 ; 0x40
145 bsreserved1 DB 0 ; 0x41
146 bsExtendedBootSignature DB 0 ; 0x42
147 bsVolumeSerialNumber DD 0 ; 0x43
148 bsVolumeLabel times 11 DB " " ; 0x47 "NO NAME "
149 bsFileSystemName times 8 DB " " ; 0x52 "FAT32 "
151 ;;;;;;;;;;;;;;;;;;;;
152 ;; BPB2 ends here ;;
153 ;;;;;;;;;;;;;;;;;;;;
155 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
156 ;; Boot sector code starts here ;;
157 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
159 start:
160 cld
162 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
163 ;; How much RAM is there? ;;
164 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
166 int 12h ; get conventional memory size (in KBs)
167 dec ax ; reserve 1K bytes for the code and the stack
168 mov cx, 106h
169 shl ax, cl ; and convert it to 16-byte paragraphs
171 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
172 ;; Reserve memory for the boot sector and its stack ;;
173 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
175 mov es, ax ; cs:0 = ds:0 = ss:0 -> top - 512 - StackSize
176 mov ss, ax
177 mov sp, 512+StackSize ; bytes 0-511 are reserved for the boot code
179 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
180 ;; Copy ourselves to top of memory ;;
181 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
183 mov si, 7C00h
184 xor di, di
185 mov ds, di
186 push es
187 mov [si(DriveNumber)], dx ; store BIOS boot drive number
188 rep movsw
190 ;;;;;;;;;;;;;;;;;;;;;;
191 ;; Jump to the copy ;;
192 ;;;;;;;;;;;;;;;;;;;;;;
194 push byte main
195 retf
197 main:
198 push cs
199 pop ds
201 xor ebx, ebx
203 %if ClusterMask != 0
204 and byte [bx(bsRootDirectoryClusterNo+3)], 0Fh ; mask cluster value
205 %endif
206 mov esi, [bx(bsRootDirectoryClusterNo)] ; esi=cluster # of root dir
208 push byte ImageLoadSeg
209 pop es
211 RootDirReadContinue:
212 call ReadClusterSector ; read one sector of the root dir
214 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
215 ;; Look for the COM/EXE file to load and run ;;
216 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
218 xor di, di ; es:di -> root entries array
220 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
221 ;; Looks for a file/dir by its name ;;
222 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
223 ;; Input: DS:SI -> file name (11 chars) ;;
224 ;; ES:DI -> root directory array ;;
225 ;; BP = paragraphs in sector ;;
226 ;; Output: ESI = cluster number ;;
227 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
229 FindNameCycle:
230 %if NullEntryCheck != 0
231 cmp byte [es:di], bh
232 je ErrFind ; end of root directory (NULL entry found)
233 %endif
234 pusha
235 mov cl, NameLength
236 mov si, ProgramName ; ds:si -> program name
237 repe cmpsb
238 %if CheckAttrib != 0
239 VolumeLabel equ 8
240 SubDirectory equ 10h
241 jnz SkipFindName
242 test byte [es:di], VolumeLabel+SubDirectory
243 SkipFindName:
244 %endif
245 je FindNameFound
246 popa
247 add di, byte 32
248 dec bp
249 dec bp
250 jnz FindNameCycle ; next root entry
251 loop RootDirReadContinue ; next sector in cluster
252 cmp esi, 0FFFFFF6h ; carry=0 if last cluster, and carry=1 otherwise
253 jnc RootDirReadContinue ; continue to the next root dir cluster
254 ErrFind:
255 call Error ; end of root directory (dir end reached)
256 db "File not found."
257 FindNameFound:
258 push word [es:di+14h-11]
259 push word [es:di+1Ah-11]
260 pop esi ; esi = cluster no. cx = 0
262 dec dword [es:di+1Ch-11] ; load ((n - 1)/256)*16 +1 paragraphs
263 imul di, [es:di+1Ch+1-11], byte 16 ; file size in paragraphs (full pages)
265 ;;;;;;;;;;;;;;;;;;;;;;;;;;
266 ;; Load the entire file ;;
267 ;;;;;;;;;;;;;;;;;;;;;;;;;;
269 push es
270 FileReadContinue:
271 push di
272 call ReadClusterSector ; read one sector of the boot file
273 dec cx
274 mov di, es
275 add di, bp
276 mov es, di ; es:bx updated
277 pop di
279 sub di, bp
280 jae FileReadContinue
281 xor ax, ax
282 pop bp
284 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
285 ;; Type detection, .COM or .EXE? ;;
286 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
288 mov ds, bp ; bp=ds=seg the file is loaded to
290 add bp, [bx+08h] ; bp = image base
291 mov di, [bx+18h] ; di = reloc table pointer
293 cmp word [bx], 5A4Dh ; "MZ" signature?
294 je RelocateEXE ; yes, it's an EXE program
296 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
297 ;; Setup and run a .COM program ;;
298 ;; Set CS=DS=ES=SS SP=0 IP=100h ;;
299 ;; AX=0ffffh BX=0 DX=drive and ;;
300 ;; cmdline=void ;;
301 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
303 mov di, 100h ; ip
304 mov bp, ImageLoadSeg-10h ; "org 100h" stuff :)
305 mov ss, bp
306 xor sp, sp
307 push bp ; cs, ds and es
308 jmp short Run
310 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
311 ;; Relocate, setup and run a .EXE program ;;
312 ;; Set CS:IP, SS:SP, DS, ES and AX according ;;
313 ;; to wiki.osdev.org/MZ#Initial_Program_State ;;
314 ;; AX=0ffffh BX=0 DX=drive cmdline=void ;;
315 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
317 ReloCycle:
318 add [di+2], bp ; item seg (abs)
319 les si, [di] ; si = item ofs, es = item seg
320 add [es:si], bp ; fixup
321 scasw ; di += 2
322 scasw ; point to next entry
324 RelocateEXE:
325 dec word [bx+06h] ; reloc items, 32768 max (128KB table)
326 jns ReloCycle
328 les si, [bx+0Eh]
329 add si, bp
330 mov ss, si ; ss for EXE
331 mov sp, es ; sp for EXE
333 lea si, [bp-10h] ; ds and es both point to the segment
334 push si ; containing the PSP structure
336 add bp, [bx+16h] ; cs for EXE
337 mov di, [bx+14h] ; ip for EXE
338 Run:
339 pop ds
340 push bp
341 push di
342 push ds
343 pop es
344 mov [80h], ax ; clear cmdline
345 dec ax ; both FCB in the PSP don't have a valid drive identifier
347 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
348 ;; Set the magic numbers so the program knows that it ;;
349 ;; has been loaded by this bootsector and not by MS-DOS ;;
350 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
351 mov si, 16381 ; prime number 2**14-3
352 mov di, 32749 ; prime number 2**15-19
353 mov bp, 65521 ; prime number 2**16-15
355 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
356 ;; All done, transfer control to the program now ;;
357 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
358 retf
360 ;;;;;;;;;;;;;;;;;;;;;;;;;;
361 ;; Error Messaging Code ;;
362 ;;;;;;;;;;;;;;;;;;;;;;;;;;
364 Error:
365 pop si
366 puts:
367 mov ah, 0Eh
368 mov bl, 7
369 lodsb
370 int 10h
371 cmp al, '.'
372 jne puts
373 cbw
374 int 16h ; wait for a key...
375 int 19h ; bootstrap
377 Stop:
378 hlt
379 jmp short Stop
381 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
382 ;; Reads a FAT32 sector ;;
383 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
384 ;; Inout: ES:BX -> buffer ;;
385 ;; EAX = prev sector ;;
386 ;; CX = rem sectors in cluster ;;
387 ;; ESI = next cluster ;;
388 ;; Output: EAX = current sector ;;
389 ;; CX = rem sectors in cluster ;;
390 ;; ESI = next cluster ;;
391 ;; BP -> para / sector ;;
392 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
394 ReadClusterSector:
395 %if SectorOf512Bytes != 0
396 mov bp, 32 ; bp = paragraphs per sector
397 %else
398 mov bp, [bx(bpbBytesPerSector)]
399 shr bp, 4 ; bp = paragraphs per sector
400 %endif
401 mov dx, 1 ; adjust LBA for next sector
402 inc cx
403 loop ReadSectorLBA
405 mul ebx ; edx:eax = 0
406 %if SectorOf512Bytes != 0
407 mov al, 128 ; ax=# of FAT32 entries per sector
408 %else
409 imul ax, bp, byte 4 ; ax=# of FAT32 entries per sector
410 %endif
411 lea edi, [esi-2] ; esi=cluster #
412 xchg eax, esi
413 div esi ; eax=FAT sector #, edx=entry # in sector
415 imul si, dx, byte 4 ; si=entry # in sector, clear C
416 %if LBA48bits != 0
417 xor dx, dx
418 %endif
419 call ReadSectorLBAfromFAT ; read 1 FAT32 sector
421 %if ClusterMask != 0
422 and byte [es:si+3], 0Fh ; mask cluster value
423 %endif
424 mov esi, [es:si] ; esi=next cluster #
426 %if Always2FATs != 0
427 imul eax, dword [bx(bsSectorsPerFAT32)], 2
428 %else
429 movzx eax, byte [bx(bpbNumberOfFATs)]
430 mul dword [bx(bsSectorsPerFAT32)]
431 %endif
433 xchg eax, edi
434 movzx ecx, byte [bx(bpbSectorsPerCluster)] ; 8..128
435 mul ecx ; edx:eax=sector number in data area
436 add eax, edi
437 %if LBA48bits != 0
438 adc dx, bx
439 %endif
441 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
442 ;; Reads a sector form the start of FAT ;;
443 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
445 ReadSectorLBAfromFAT:
446 add eax, [bx(bpbHiddenSectors)]
447 %if LBA48bits != 0
448 adc dx, bx
449 mov word [bx(HiLBA)], dx
450 %endif
451 mov dx, [bx(bpbReservedSectors)]
453 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
454 ;; Reads a sector using BIOS Int 13h fn 42h ;;
455 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
456 ;; Input: EAX = LBA ;;
457 ;; CX = sector count ;;
458 ;; ES:BX -> buffer address ;;
459 ;; Output: CF = 0 if no more sectors ;;
460 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
462 ReadSectorLBA:
463 add eax, edx
464 %if LBA48bits != 0
465 adc word [bx(HiLBA)], bx
466 %endif
467 mov dx, [bx(DriveNumber)] ; restore BIOS boot drive number
468 pusha
470 push bx
471 %if LBA48bits != 0
472 push word [bx(HiLBA)] ; 48-bit LBA
473 %else
474 push bx
475 %endif
476 push eax
477 push es
478 push bx
479 push byte 1 ; sector count word = 1
480 push byte 16 ; packet size byte = 16, reserved byte = 0
482 %if CHSsupport != 0
483 %if CHSupTo8GB != 0
484 push eax
485 pop cx ; save low LBA
486 pop ax ; get high LBA
487 cwd ; clear dx (assume LBA offset <1TB)
488 idiv word [bx(bpbSectorsPerTrack)] ; up to 8GB disks, avoid divide error
490 xchg ax, cx ; restore low LBA, save high LBA / SPT
491 %else
492 ; Busybox mkdosfs creates fat32 for floppies.
493 ; Floppies may support CHS only.
494 %if CHSupTo32MB != 0
495 xor dx, dx ; clear dx (LBA offset <32MB)
496 %else
497 cwd ; clear dx (LBA offset <16MB)
498 %endif
499 xor cx, cx ; high LBA / SPT = 0
500 %endif
501 idiv word [bx(bpbSectorsPerTrack)]
502 ; ax = LBA / SPT
503 ; dx = LBA % SPT = sector - 1
504 inc dx
506 xchg cx, dx ; restore high LBA / SPT, save sector no.
507 idiv word [bx(bpbHeadsPerCylinder)]
508 ; ax = (LBA / SPT) / HPC = cylinder
509 ; dx = (LBA / SPT) % HPC = head
511 xchg ch, al ; clear al
512 ; ch = LSB 0...7 of cylinder no.
513 %if CHSupTo8GB != 0 || CHSupTo32MB != 0
514 shr ax, 2
515 or cl, al
516 ; cl = MSB 8...9 of cylinder no. + sector no.
517 %endif
518 mov dh, dl
519 ; dh = head no.
520 mov dl, [bx(DriveNumber)] ; restore BIOS boot drive number
521 %endif
523 ReadSectorRetry:
524 mov si, sp
525 mov ah, 42h ; ah = 42h = extended read function no.
526 int 13h ; extended read sectors (DL, DS:SI)
527 jnc ReadSuccess ; CF = 0 if no error
529 %if CHSsupport != 0
530 mov ax, 201h ; al = sector count = 1
531 ; ah = 2 = read function no.
532 int 13h ; read sectors (AL, CX, DX, ES:BX)
534 jnc ReadSuccess ; CF = 0 if no error
535 %endif
536 %if ReadRetry != 0
537 %if CHSsupport != 0
538 cbw ; ah = 0 = reset function
539 %else
540 xor ax, ax ; ah = 0 = reset function
541 %endif
542 int 13h ; reset drive (DL)
544 dec bp ; up to 32 retries
545 jnz ReadSectorRetry
546 %endif
548 call Error
549 db "Read error."
551 ReadSuccess:
553 popa ; sp += 16
554 popa
555 ret
557 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
558 ;; Fill free space with zeroes ;;
559 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
561 times (512-13-($-$$)) db 0
563 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
564 ;; Name of the file to load and run ;;
565 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
567 NameLength equ 11
568 ProgramName times NameLength db 0 ; name and extension
570 ;;;;;;;;;;;;;;;;;;;;;;;;;;
571 ;; End of the sector ID ;;
572 ;;;;;;;;;;;;;;;;;;;;;;;;;;
574 dw 0AA55h ; BIOS checks for this ID