mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:08:07 +11:00
Move a bunch of words from core to xcomp core
This commit is contained in:
parent
d6a3e79394
commit
e2e9faef2c
2
blk/393
2
blk/393
@ -12,4 +12,4 @@
|
|||||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||||
LIT< INTERPRET (find) DROP EXECUTE
|
LIT< INTERPRET (find) DROP EXECUTE
|
||||||
;
|
;
|
||||||
1 21 LOADR+
|
1 22 LOADR+
|
||||||
|
8
blk/413
8
blk/413
@ -1,11 +1,13 @@
|
|||||||
|
: '? WORD (find) ;
|
||||||
|
: '
|
||||||
|
'? (?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 )
|
||||||
SWAP 2 * (roll) ( val )
|
SWAP 2 * (roll) ( val )
|
||||||
SWAP DROP
|
SWAP DROP
|
||||||
;
|
;
|
||||||
|
|
||||||
: 2OVER 3 PICK 3 PICK ;
|
: 2OVER 3 PICK 3 PICK ;
|
||||||
: 2SWAP 3 ROLL 3 ROLL ;
|
: 2SWAP 3 ROLL 3 ROLL ;
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/422
4
blk/422
@ -9,5 +9,7 @@
|
|||||||
34 , ( 34 == litWord ) ," 0 C,
|
34 , ( 34 == litWord ) ," 0 C,
|
||||||
COMPILE (print)
|
COMPILE (print)
|
||||||
; IMMEDIATE
|
; IMMEDIATE
|
||||||
|
|
||||||
: ABORT" [COMPILE] ." COMPILE ABORT ; IMMEDIATE
|
: ABORT" [COMPILE] ." COMPILE ABORT ; IMMEDIATE
|
||||||
|
: BS 8 EMIT ; : LF 10 EMIT ; : CR 13 EMIT ;
|
||||||
|
: CRLF CR LF ; : SPC 32 EMIT ;
|
||||||
|
: NL 0x0a RAM+ @ ( NLPTR ) DUP IF EXECUTE ELSE DROP CRLF THEN ;
|
||||||
|
5
blk/430
5
blk/430
@ -2,11 +2,6 @@
|
|||||||
: ] R> DROP ;
|
: ] R> DROP ;
|
||||||
: LIT< WORD 34 , SCPY 0 C, ; IMMEDIATE
|
: LIT< WORD 34 , SCPY 0 C, ; IMMEDIATE
|
||||||
: LITA 36 , , ;
|
: LITA 36 , , ;
|
||||||
: '? WORD (find) ;
|
|
||||||
: '
|
|
||||||
'? (?br) [ 4 , ] EXIT
|
|
||||||
LIT< (wnf) (find) DROP EXECUTE
|
|
||||||
;
|
|
||||||
: ['] ' LITA ; IMMEDIATE
|
: ['] ' LITA ; IMMEDIATE
|
||||||
: COMPILE ' LITA ['] , , ; IMMEDIATE
|
: COMPILE ' LITA ['] , , ; IMMEDIATE
|
||||||
: [COMPILE] ' , ; IMMEDIATE
|
: [COMPILE] ' , ; IMMEDIATE
|
||||||
|
4
blk/439
4
blk/439
@ -7,4 +7,6 @@
|
|||||||
= UNTIL
|
= UNTIL
|
||||||
DROP
|
DROP
|
||||||
;
|
;
|
||||||
|
: (ok) SPC ." ok" NL ;
|
||||||
|
: (uflw) ABORT" stack underflow" ;
|
||||||
|
: (wnf) (print) SPC ABORT" word not found" ;
|
||||||
|
11
blk/440
11
blk/440
@ -1,11 +0,0 @@
|
|||||||
: (uflw) ABORT" stack underflow" ;
|
|
||||||
: BS 8 EMIT ;
|
|
||||||
: LF 10 EMIT ;
|
|
||||||
: CR 13 EMIT ;
|
|
||||||
: CRLF CR LF ;
|
|
||||||
: SPC 32 EMIT ;
|
|
||||||
: NL 0x0a RAM+ @ ( NLPTR ) DUP IF EXECUTE ELSE DROP CRLF THEN ;
|
|
||||||
|
|
||||||
: (wnf) (print) SPC ABORT" word not found" ;
|
|
||||||
: (ok) SPC ." ok" NL ;
|
|
||||||
|
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user