mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 16:08:06 +11:00
recipes/pcat: now tested on real hardware!
This commit is contained in:
parent
f9d04848bd
commit
b037c86598
1
blk/753
1
blk/753
@ -5,6 +5,7 @@
|
|||||||
( no argument, flow ops are special )
|
( no argument, flow ops are special )
|
||||||
: JMP8, 0xeb A, ; : JMP16, 0xe9 A, ; : JZ, 0x74 A, ;
|
: JMP8, 0xeb A, ; : JMP16, 0xe9 A, ; : JZ, 0x74 A, ;
|
||||||
: LODSB, 0xac A, ; : CLI, 0xfa A, ; : HLT, 0xf4 A, ;
|
: LODSB, 0xac A, ; : CLI, 0xfa A, ; : HLT, 0xf4 A, ;
|
||||||
|
: STI, 0xfb A, ;
|
||||||
: ORrr, 0x08 A, MODRMrr A, ;
|
: ORrr, 0x08 A, MODRMrr A, ;
|
||||||
: XORxx, 0x31 A, MODRMrr A, ;
|
: XORxx, 0x31 A, MODRMrr A, ;
|
||||||
: CLD, 0xfc A, ; : STD, 0xfd A, ;
|
: CLD, 0xfc A, ; : STD, 0xfd A, ;
|
||||||
|
6
blk/811
6
blk/811
@ -1,9 +1,9 @@
|
|||||||
: _filler 510 H@ ORG @ - DO 0 A, LOOP 0x55 A, 0xaa A, ;
|
|
||||||
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 )
|
||||||
L2 BSET ( msg ) ," Hello, World!" 0 A,
|
L2 BSET ( msg ) ," Hello, World!" 0 A,
|
||||||
L1 FSET ( start )
|
L1 FSET ( start )
|
||||||
CLI, CLD, AX AX XORxx, DS AX MOVsx,
|
CLI, CLD, AX AX XORxx, DS AX MOVsx, STI,
|
||||||
AH 0 MOVri, AL 2 MOVri, ( 80x25 BW video mode ) 0x10 INT,
|
AH 0 MOVri, AL 2 MOVri, ( 80x25 BW video mode ) 0x10 INT,
|
||||||
SI L2 @ ( msg ) MOVrI, AH 0x0e MOVri, ( print char )
|
SI L2 @ ( msg ) 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? )
|
||||||
@ -11,4 +11,4 @@ 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 )
|
||||||
_filler
|
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
||||||
|
Loading…
Reference in New Issue
Block a user