mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-26 17:38:06 +11:00
Compare commits
No commits in common. "99c05fff3c0f0f41d7358b063269cae46633a9f2" and "1536434666638262327af0548ce659b07e42fdfe" have entirely different histories.
99c05fff3c
...
1536434666
5
blk/369
5
blk/369
@ -1,5 +1,8 @@
|
|||||||
: '? WORD FIND ;
|
: '? WORD FIND ;
|
||||||
: ' '? NOT IF LIT< (wnf) FIND DROP EXECUTE THEN ;
|
: '
|
||||||
|
'? (?br) [ 4 , ] EXIT
|
||||||
|
LIT< (wnf) FIND DROP EXECUTE
|
||||||
|
;
|
||||||
: ROLL
|
: ROLL
|
||||||
?DUP NOT IF EXIT THEN
|
?DUP NOT IF EXIT THEN
|
||||||
1+ DUP PICK ( n val )
|
1+ DUP PICK ( n val )
|
||||||
|
6
blk/811
6
blk/811
@ -4,9 +4,7 @@ ORG @ 0x25 + HERE ! ( bypass BPB )
|
|||||||
L1 FSET ( start )
|
L1 FSET ( start )
|
||||||
CLI, CLD, AX 0x800 MOVxI, DS AX MOVsx, ES AX MOVsx,
|
CLI, CLD, AX 0x800 MOVxI, DS AX MOVsx, ES AX MOVsx,
|
||||||
SS AX MOVsx, STI,
|
SS AX MOVsx, STI,
|
||||||
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 12 MOVri,
|
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 7 MOVri,
|
||||||
BX 0 MOVxI, 0x13 INT, ( read sectors 2-14 of boot floppy )
|
BX 0 MOVxI, 0x13 INT, ( read sectors 2-9 of boot floppy )
|
||||||
( TODO: reading 12 sectors like this probably doesn't work
|
|
||||||
on real vintage PC/AT with floppy. Make this more robust. )
|
|
||||||
0x800 0 JMPf,
|
0x800 0 JMPf,
|
||||||
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
ORG @ 0x1fe + HERE ! 0x55 A, 0xaa A,
|
||||||
|
2
blk/813
2
blk/813
@ -9,7 +9,7 @@ H@ XCURRENT ! ( set current tip of dict, 0x42 )
|
|||||||
CODE (br) ( 0x53 ) L2 BSET ( used in br? )
|
CODE (br) ( 0x53 ) L2 BSET ( used in br? )
|
||||||
DI DX MOVxx, DI [DI] MOVx[], DX DI ADDxx,
|
DI DX MOVxx, DI [DI] MOVx[], DX DI ADDxx,
|
||||||
;CODE NOP, NOP,
|
;CODE NOP, NOP,
|
||||||
CODE (?br) ( 0x67 )
|
CODE (br?) ( 0x67 )
|
||||||
AX POPx, AX AX ORxx, JZ, L2 @ RPCs, ( False, branch )
|
AX POPx, AX AX ORxx, JZ, L2 @ RPCs, ( False, branch )
|
||||||
( True, skip next 2 bytes and don't branch )
|
( True, skip next 2 bytes and don't branch )
|
||||||
L1 BSET ( loop will jump here ) DX INCx, DX INCx,
|
L1 BSET ( loop will jump here ) DX INCx, DX INCx,
|
||||||
|
2
blk/818
2
blk/818
@ -2,4 +2,4 @@
|
|||||||
DI 3 SUBxi, AX [DI] MOVx[], ( prev )
|
DI 3 SUBxi, AX [DI] MOVx[], ( prev )
|
||||||
AX AX ORxx,
|
AX AX ORxx,
|
||||||
JNZ, AGAIN, ( loop )
|
JNZ, AGAIN, ( loop )
|
||||||
SI DECx, ( start of string, and NZ ) RETn,
|
AX INCx, ( NZ ) RETn,
|
||||||
|
8
blk/823
8
blk/823
@ -6,8 +6,8 @@ CODE *
|
|||||||
AX PUSHx,
|
AX PUSHx,
|
||||||
;CODE
|
;CODE
|
||||||
CODE /MOD
|
CODE /MOD
|
||||||
BX POPx, AX POPx, DX PUSHx, ( protect )
|
BX POPx, AX POPx,
|
||||||
DX DX XORxx, BX DIVx,
|
BL DIVr, ( TODO: use DIVx, risk of 8086 error )
|
||||||
BX DX MOVxx, DX POPx, ( unprotect )
|
BH BH XORrr, BL AH MOVrr, BX PUSHx, ( modulo )
|
||||||
BX PUSHx, ( modulo ) AX PUSHx, ( division )
|
BL AL MOVrr, BX PUSHx, ( division )
|
||||||
;CODE
|
;CODE
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
@ -9,12 +9,11 @@ RS_ADDR 0x80 - CONSTANT RAMSTART
|
|||||||
CODE (emit)
|
CODE (emit)
|
||||||
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
||||||
;CODE
|
;CODE
|
||||||
CODE (key)
|
CODE (key) AH AH XORrr, 0x16 INT, AX PUSHx, ;CODE
|
||||||
AH AH XORrr, 0x16 INT, AH AH XORrr, AX PUSHx, ;CODE
|
: FOO (key) (emit) ;
|
||||||
380 LOAD ( xcomp core high )
|
: BOOT 0x08 @ LIT< FOO _find DROP EXECUTE BYE ;
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
EOT,
|
|
||||||
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