This commit is contained in:
parent
36dd179f49
commit
89db4ec100
30
boot.subx
30
boot.subx
|
@ -64,12 +64,12 @@
|
|||
}
|
||||
|
||||
# load remaining sectors from first two tracks of disk into addresses [0x7e00, 0x17800)
|
||||
b4/copy-to-ah 2/imm8 # read sectors from disk
|
||||
b4/copy-to-ah 2/imm8/read-drive
|
||||
# dl comes conveniently initialized at boot time with the index of the device being booted
|
||||
b5/copy-to-ch 0/imm8 # cylinder 0
|
||||
b6/copy-to-dh 0/imm8 # head 0
|
||||
b1/copy-to-cl 2/imm8 # second sector, 1-based
|
||||
b0/copy-to-al 0x7d/imm8 # number of sectors to read = 2*63 - 1 = 125
|
||||
b5/copy-to-ch 0/imm8/cylinder
|
||||
b6/copy-to-dh 0/imm8/head
|
||||
b1/copy-to-cl 2/imm8/sector # 1-based
|
||||
b0/copy-to-al 0x7d/imm8/num-sectors # 2*63 - 1 = 125
|
||||
# address to write sectors to = es:bx = 0x7e00, contiguous with boot segment
|
||||
bb/copy-to-bx 0/imm16
|
||||
8e/->seg 3/mod/direct 3/rm32/bx 0/r32/es
|
||||
|
@ -78,12 +78,12 @@
|
|||
0f 82/jump-if-carry disk_error/disp16
|
||||
|
||||
# load two more tracks of disk into addresses [0x17800, 0x27400)
|
||||
b4/copy-to-ah 2/imm8 # read sectors from disk
|
||||
b4/copy-to-ah 2/imm8/read-drive
|
||||
# dl comes conveniently initialized at boot time with the index of the device being booted
|
||||
b5/copy-to-ch 0/imm8 # cylinder
|
||||
b6/copy-to-dh 2/imm8 # head
|
||||
b1/copy-to-cl 1/imm8 # sector, 1-based
|
||||
b0/copy-to-al 0x7e/imm8 # number of sectors to read = 2*63 = 126
|
||||
b5/copy-to-ch 0/imm8/cylinder
|
||||
b6/copy-to-dh 2/imm8/head
|
||||
b1/copy-to-cl 1/imm8/sector # 1-based
|
||||
b0/copy-to-al 0x7e/imm8/num-sectors # 2*63 = 126
|
||||
# address to write sectors to = es:bx = 0x17800, contiguous with boot segment
|
||||
bb/copy-to-bx 0x1780/imm16
|
||||
8e/->seg 3/mod/direct 3/rm32/bx 0/r32/es
|
||||
|
@ -92,12 +92,12 @@
|
|||
0f 82/jump-if-carry disk_error/disp16
|
||||
|
||||
# load two more tracks of disk into addresses [0x27400, 0x37000)
|
||||
b4/copy-to-ah 2/imm8 # read sectors from disk
|
||||
b4/copy-to-ah 2/imm8/read-drive
|
||||
# dl comes conveniently initialized at boot time with the index of the device being booted
|
||||
b5/copy-to-ch 0/imm8 # cylinder
|
||||
b6/copy-to-dh 4/imm8 # head
|
||||
b1/copy-to-cl 1/imm8 # sector, 1-based
|
||||
b0/copy-to-al 0x7e/imm8 # number of sectors to read = 2*63 = 126
|
||||
b5/copy-to-ch 0/imm8/cylinder
|
||||
b6/copy-to-dh 4/imm8/head
|
||||
b1/copy-to-cl 1/imm8/sector # 1-based
|
||||
b0/copy-to-al 0x7e/imm8/num-sectors # 2*63 = 126
|
||||
# address to write sectors to = es:bx = 0x27400, contiguous with boot segment
|
||||
bb/copy-to-bx 0x2740/imm16
|
||||
8e/->seg 3/mod/direct 3/rm32/bx 0/r32/es
|
||||
|
|
Loading…
Reference in New Issue