* added compilers lcc and bcc (linux86)
[mascara-docs.git] / compilers / linux86-0.16.17 / bootblocks / sysboot.s
blobbaac806922ea11907923a688194cd2a0da1bfd36
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
16 sysboot_start:
17 j codestart
18 nop ! DOS appears to _require_ this to identify an MSDOS disk!!
20 .blkb sysboot_start+3-*
21 public dosfs_stat
22 dos_sysid: .ascii "LINUX" ! System ID
23 .byte 0,0,0
24 dosfs_stat:
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
41 .blkb 1 ! Reserved
42 .blkb 1 ! DOS 4
44 floppy_temp:
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-*
52 public codestart
53 codestart:
54 j codestart
56 ! Partition table
57 public bootblock_magic
59 .blkb sysboot_start+0x1BE-*
60 partition_1:
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-*
65 partition_2:
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-*
70 partition_3:
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-*
75 partition_4:
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-*
81 bootblock_magic:
82 .word 0xAA55