mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-26 14:38:05 +11:00
Compare commits
2 Commits
507c2c12e7
...
2b7abf802f
Author | SHA1 | Date | |
---|---|---|---|
|
2b7abf802f | ||
|
1a467efae1 |
1
blk/752
1
blk/752
@ -4,3 +4,4 @@
|
|||||||
;
|
;
|
||||||
: PC H@ ORG @ - BIN( @ + ;
|
: PC H@ ORG @ - BIN( @ + ;
|
||||||
: A, C, ;
|
: A, C, ;
|
||||||
|
: A,, SPLITB A, A, ;
|
||||||
|
3
blk/753
3
blk/753
@ -1,12 +1,13 @@
|
|||||||
: OP1 CREATE C, DOES> C@ A, ;
|
: OP1 CREATE C, DOES> C@ A, ;
|
||||||
0xac OP1 LODSB, 0xfa OP1 CLI, 0xfb OP1 STI,
|
0xac OP1 LODSB, 0xfa OP1 CLI, 0xfb OP1 STI,
|
||||||
0xf4 OP1 HLT, 0xfc OP1 CLD, 0xfd OP1 STD,
|
0xf4 OP1 HLT, 0xfc OP1 CLD, 0xfd OP1 STD,
|
||||||
( no argument, jumps with abs addrs are special )
|
( no argument, jumps with relative addrs are special )
|
||||||
0xeb OP1 JMPs, 0xe9 OP1 JMPn, 0x74 OP1 JZ,
|
0xeb OP1 JMPs, 0xe9 OP1 JMPn, 0x74 OP1 JZ,
|
||||||
: MOVri, SWAP 0xb0 OR A, A, ;
|
: MOVri, SWAP 0xb0 OR A, A, ;
|
||||||
: MOVxi, SWAP 0xb8 OR A, SPLITB A, A, ;
|
: MOVxi, SWAP 0xb8 OR A, SPLITB A, A, ;
|
||||||
: MOVsx, 0x8e A, SWAP 3 LSHIFT OR 0xc0 OR A, ;
|
: MOVsx, 0x8e A, SWAP 3 LSHIFT OR 0xc0 OR A, ;
|
||||||
: INT, 0xcd A, A, ;
|
: INT, 0xcd A, A, ;
|
||||||
: JMPr, 0xff A, 7 AND 0xe0 OR A, ;
|
: JMPr, 0xff A, 7 AND 0xe0 OR A, ;
|
||||||
|
: JMPf, ( seg off ) 0xea A, SPLITB A, A, SPLITB A, A, ;
|
||||||
: OPrr CREATE C, DOES> C@ A, 3 LSHIFT OR 0xc0 OR A, ;
|
: OPrr CREATE C, DOES> C@ A, 3 LSHIFT OR 0xc0 OR A, ;
|
||||||
0x31 OPrr XORxx, 0x08 OPrr ORrr,
|
0x31 OPrr XORxx, 0x08 OPrr ORrr,
|
||||||
|
6
blk/811
6
blk/811
@ -2,9 +2,9 @@ H@ ORG ! 0x7c00 BIN( ! ( BIOS loads boot bin at 0x7c00 )
|
|||||||
JMPs, L1 FWRs ( start )
|
JMPs, L1 FWRs ( start )
|
||||||
ORG @ 0x25 + HERE ! ( bypass BPB )
|
ORG @ 0x25 + HERE ! ( bypass BPB )
|
||||||
L1 FSET ( start )
|
L1 FSET ( start )
|
||||||
CLI, CLD, AX AX XORxx, DS AX MOVsx, ES AX MOVsx,
|
CLI, CLD, AX 0x800 MOVxi, DS AX MOVsx, ES AX MOVsx,
|
||||||
SS AX MOVsx, SP 0xffff MOVxi, STI,
|
SS AX MOVsx, SP 0xffff MOVxi, STI,
|
||||||
AH 2 MOVri, DX 0 MOVxi, CH 0 MOVri, CL 2 MOVri, AL 1 MOVri,
|
AH 2 MOVri, DX 0 MOVxi, CH 0 MOVri, CL 2 MOVri, AL 1 MOVri,
|
||||||
BX 0x8000 MOVxi, 0x13 INT, ( read 2nd sector of boot floppy )
|
BX 0 MOVxi, 0x13 INT, ( read 2nd sector of boot floppy )
|
||||||
BX JMPr,
|
0x800 0 JMPf,
|
||||||
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
||||||
|
26
blk/812
26
blk/812
@ -1,10 +1,16 @@
|
|||||||
H@ ORG ! 0x8000 BIN( !
|
( Registers. SP -> PSP DX -> RSP CX -> IP )
|
||||||
JMPs, L1 FWRs ( start )
|
H@ ORG !
|
||||||
L2 ( msg ) BSET ," Hello World!" 0 A,
|
JMPn, 0 A,, ( 00, main ) JMPn, 0 A,, ( 03, find )
|
||||||
L1 FSET ( start )
|
0 A,, ( 06, unused ) 0 A,, ( 08, LATEST )
|
||||||
SI L2 @ ( msg ) MOVxi, AH 0x0e MOVri, ( print char )
|
0 A, ( 0a, unused ) JMPn, 0 A,, ( 0b, cellWord )
|
||||||
L1 BSET ( loop ) LODSB, AL AL ORrr, ( end of str? )
|
JMPn, 0 A,, ( 0e compiledWord ) JMPn, 0 A,, ( 11, pushRS )
|
||||||
JZ, L2 FWRs ( next ) 0x10 INT, ( print char )
|
JMPn, 0 A,, ( 14, popRS )
|
||||||
JMPs, L1 ( loop ) BWR
|
JMPn, 0 A,, ( 17, nativeWord )
|
||||||
L2 FSET ( next ) AH 0 MOVri, 0x16 INT, ( read kbd )
|
JMPn, 0 A,, ( 1a, next ) JMPn, 0 A,, ( 1d, chkPS )
|
||||||
AH 0x0e MOVri, 0x10 INT, ( spit read char ) HLT, ( done )
|
0 A, 0 A, ( 20, numberWord ) 0 A, 0 A, ( 22, litWord )
|
||||||
|
0 A, 0 A, ( 24, addrWord ) 0 A, 0 A, ( 26, unused )
|
||||||
|
0 A, 0 A,, ( unused )
|
||||||
|
JMPn, 0 A,, ( 2b, doesWord ) 0 A, 0 A, ( 2e, unused )
|
||||||
|
0 A, 0 A,, ( unused )
|
||||||
|
JMPn, 0 A,, ( 33, execute ) 0 A, 0 A, ( unused )
|
||||||
|
0 A, 0 A,, ( unused )
|
||||||
|
3
blk/813
Normal file
3
blk/813
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PC 3 - ORG @ 1+ ! ( main )
|
||||||
|
AH 0x0e MOVri, ( print char ) AL 'X' MOVri, 0x10 INT,
|
||||||
|
HLT,
|
@ -1,4 +1,4 @@
|
|||||||
750 LOAD
|
750 LOAD
|
||||||
812 LOAD
|
812 813 LOADR
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
Loading…
Reference in New Issue
Block a user