2 ! The master boot sector will have setup
a stack
,
3 ! this is normally at
0:7c00 down.
4 ! DS
, SS
, CS
and ES will all have value
0 so the execution address is
0:7c00
5 ! On entry the register SI will
be pointer to the partition entry that
6 ! this sector was loaded from
, DL is the drive.
8 ! Also if it
's a standard Master boot DH will be the head, CX will be the
9 ! sector and cylinder, BX=7C00, AX=1, DI=7DFE, BP=SI. There's
a reasonable
10 ! chance that this isn
't true though.
12 ! The Master boot itself will have been loaded and run at $07c00
13 ! The BIOS must have setup a stack because interrupts are enabled
14 ! Little else can be assumed because DOS doesn`t assume anything either
18 nop ! DOS appears to _require_ this to identify an MSDOS disk!!
20 .blkb sysboot_start+3-*
22 dos_sysid: .ascii "LINUX" ! System ID
25 dos_sect: .blkw 1 ! Sector size
26 dos_clust: .blkb 1 ! Cluster size
27 dos_resv: .blkw 1 ! Res-sector
28 dos_nfat: .blkb 1 ! FAT count
29 dos_nroot: .blkw 1 ! Root dir entries
30 dos_maxsect: .blkw 1 ! Sector count (=0 if large FS)
31 dos_media: .blkb 1 ! Media code
32 dos_fatlen: .blkw 1 ! FAT length
33 dos_spt: .blkw 1 ! Sect/Track
34 dos_heads: .blkw 1 ! Heads
35 dos_hidden: .blkw 2 ! Hidden sectors
37 ! Here down is DOS 4+ and probably not needed for floppy boots.
39 dos4_maxsect: .blkw 2 ! Large FS sector count
40 dos4_phy_drive: .blkb 1 ! Phys drive
45 dos4_serial: .blkw 2 ! Serial number
46 dos4_label: .blkb 11 ! Disk Label (DOS 4+)
47 dos4_fattype: .blkb 8 ! FAT type
50 ! This is where the code will be overlaid, the default is a hang
51 .blkb sysboot_start+0x3E-*
57 public bootblock_magic
59 .blkb sysboot_start+0x1BE-*
61 .blkb 8 ! IN,SH,SS,ST,OS,EH,ES,ET
62 .blkw 2 ! Linear position (0 based)
63 .blkw 2 ! Linear length
64 .blkb sysboot_start+0x1CE-*
66 .blkb 8 ! IN,SH,SS,ST,OS,EH,ES,ET
67 .blkw 2 ! Linear position (0 based)
68 .blkw 2 ! Linear length
69 .blkb sysboot_start+0x1DE-*
71 .blkb 8 ! IN,SH,SS,ST,OS,EH,ES,ET
72 .blkw 2 ! Linear position (0 based)
73 .blkw 2 ! Linear length
74 .blkb sysboot_start+0x1EE-*
76 .blkb 8 ! IN,SH,SS,ST,OS,EH,ES,ET
77 .blkw 2 ! Linear position (0 based)
78 .blkw 2 ! Linear length
80 .blkb sysboot_start+0x1FE-*