pcat: read sector from floppy
This commit is contained in:
parent
b037c86598
commit
e17f2e6907
9
blk/811
9
blk/811
@ -1,14 +1,15 @@
|
|||||||
H@ ORG ! 0x7c00 BIN( ! ( BIOS loads boot bin at 0x7c00 )
|
H@ ORG ! 0x7c00 BIN( ! ( BIOS loads boot bin at 0x7c00 )
|
||||||
JMP8, L1 FWR8 ( start )
|
JMP8, L1 FWR8 ( start )
|
||||||
ORG @ 0x25 + HERE ! ( bypass BPB )
|
ORG @ 0x25 + HERE ! ( bypass BPB )
|
||||||
L2 BSET ( msg ) ," Hello, World!" 0 A,
|
|
||||||
L1 FSET ( start )
|
L1 FSET ( start )
|
||||||
CLI, CLD, AX AX XORxx, DS AX MOVsx, STI,
|
CLI, CLD, AX AX XORxx, DS AX MOVsx, ES AX MOVsx, STI,
|
||||||
AH 0 MOVri, AL 2 MOVri, ( 80x25 BW video mode ) 0x10 INT,
|
AH 2 MOVri, DX 0 MOVrI, CH 0 MOVri, CL 2 MOVri, AL 1 MOVri,
|
||||||
SI L2 @ ( msg ) MOVrI, AH 0x0e MOVri, ( print char )
|
BX 0x8000 MOVrI, 0x13 INT, ( read 2nd sector of boot floppy )
|
||||||
|
SI 0x8000 MOVrI, AH 0x0e MOVri, ( print char )
|
||||||
L1 BSET ( loop ) LODSB, AL AL ORrr, ( end of str? )
|
L1 BSET ( loop ) LODSB, AL AL ORrr, ( end of str? )
|
||||||
JZ, L2 FWR8 ( next ) 0x10 INT, ( print char )
|
JZ, L2 FWR8 ( next ) 0x10 INT, ( print char )
|
||||||
JMP8, L1 ( loop ) BWR
|
JMP8, L1 ( loop ) BWR
|
||||||
L2 FSET ( next ) AH 0 MOVri, 0x16 INT, ( read kbd )
|
L2 FSET ( next ) AH 0 MOVri, 0x16 INT, ( read kbd )
|
||||||
AH 0x0e MOVri, 0x10 INT, ( spit read char ) HLT, ( done )
|
AH 0x0e MOVri, 0x10 INT, ( spit read char ) HLT, ( done )
|
||||||
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
||||||
|
," Hello from 2nd sector of boot floppy!" 0 A,
|
||||||
|
Loading…
Reference in New Issue
Block a user