mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-26 09:38:06 +11:00
Compare commits
4 Commits
1536434666
...
99c05fff3c
Author | SHA1 | Date | |
---|---|---|---|
|
99c05fff3c | ||
|
ae719508d9 | ||
|
60ecab314e | ||
|
397ee3e3e6 |
5
blk/369
5
blk/369
@ -1,8 +1,5 @@
|
||||
: '? WORD FIND ;
|
||||
: '
|
||||
'? (?br) [ 4 , ] EXIT
|
||||
LIT< (wnf) FIND DROP EXECUTE
|
||||
;
|
||||
: ' '? NOT IF LIT< (wnf) FIND DROP EXECUTE THEN ;
|
||||
: ROLL
|
||||
?DUP NOT IF EXIT THEN
|
||||
1+ DUP PICK ( n val )
|
||||
|
6
blk/811
6
blk/811
@ -4,7 +4,9 @@ ORG @ 0x25 + HERE ! ( bypass BPB )
|
||||
L1 FSET ( start )
|
||||
CLI, CLD, AX 0x800 MOVxI, DS AX MOVsx, ES AX MOVsx,
|
||||
SS AX MOVsx, STI,
|
||||
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 7 MOVri,
|
||||
BX 0 MOVxI, 0x13 INT, ( read sectors 2-9 of boot floppy )
|
||||
AH 2 MOVri, DX 0 MOVxI, CH 0 MOVri, CL 2 MOVri, AL 12 MOVri,
|
||||
BX 0 MOVxI, 0x13 INT, ( read sectors 2-14 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,
|
||||
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? )
|
||||
DI DX MOVxx, DI [DI] MOVx[], DX DI ADDxx,
|
||||
;CODE NOP, NOP,
|
||||
CODE (br?) ( 0x67 )
|
||||
CODE (?br) ( 0x67 )
|
||||
AX POPx, AX AX ORxx, JZ, L2 @ RPCs, ( False, branch )
|
||||
( True, skip next 2 bytes and don't branch )
|
||||
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 )
|
||||
AX AX ORxx,
|
||||
JNZ, AGAIN, ( loop )
|
||||
AX INCx, ( NZ ) RETn,
|
||||
SI DECx, ( start of string, and NZ ) RETn,
|
||||
|
8
blk/823
8
blk/823
@ -6,8 +6,8 @@ CODE *
|
||||
AX PUSHx,
|
||||
;CODE
|
||||
CODE /MOD
|
||||
BX POPx, AX POPx,
|
||||
BL DIVr, ( TODO: use DIVx, risk of 8086 error )
|
||||
BH BH XORrr, BL AH MOVrr, BX PUSHx, ( modulo )
|
||||
BL AL MOVrr, BX PUSHx, ( division )
|
||||
BX POPx, AX POPx, DX PUSHx, ( protect )
|
||||
DX DX XORxx, BX DIVx,
|
||||
BX DX MOVxx, DX POPx, ( unprotect )
|
||||
BX PUSHx, ( modulo ) AX PUSHx, ( division )
|
||||
;CODE
|
||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
@ -9,11 +9,12 @@ RS_ADDR 0x80 - CONSTANT RAMSTART
|
||||
CODE (emit)
|
||||
AX POPx, AH 0x0e MOVri, ( print char ) 0x10 INT,
|
||||
;CODE
|
||||
CODE (key) AH AH XORrr, 0x16 INT, AX PUSHx, ;CODE
|
||||
: FOO (key) (emit) ;
|
||||
: BOOT 0x08 @ LIT< FOO _find DROP EXECUTE BYE ;
|
||||
CODE (key)
|
||||
AH AH XORrr, 0x16 INT, AH AH XORrr, AX PUSHx, ;CODE
|
||||
380 LOAD ( xcomp core high )
|
||||
(entry) _
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
EOT,
|
||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||
H@ 256 /MOD 2 PC! 2 PC!
|
||||
|
Loading…
Reference in New Issue
Block a user