mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-18 01:08:05 +11:00
Move a bunch of words from XPACKed core to xcomp core
This commit is contained in:
parent
80d730318a
commit
51997533ff
12
blk/421
12
blk/421
@ -1,14 +1,16 @@
|
||||
: EMIT
|
||||
( 0x53==(emit) override )
|
||||
0x53 RAM+ @ DUP IF EXECUTE ELSE DROP (emit) THEN ;
|
||||
|
||||
: (print)
|
||||
BEGIN
|
||||
C@+ ( a+1 c )
|
||||
( exit if null or 0xd )
|
||||
DUP 0xd = OVER NOT OR IF 2DROP EXIT THEN
|
||||
EMIT ( a )
|
||||
AGAIN
|
||||
;
|
||||
|
||||
|
||||
AGAIN ;
|
||||
: 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 ;
|
||||
: (ok) SPC LIT" ok" (print) NL ;
|
||||
: (uflw) LIT" stack underflow" (print) ABORT ;
|
||||
: (wnf) (print) SPC LIT" word not found" (print) ABORT ;
|
||||
|
14
blk/422
14
blk/422
@ -1,15 +1,7 @@
|
||||
: ,"
|
||||
BEGIN
|
||||
C<
|
||||
( 34 is ASCII for " )
|
||||
DUP 34 = IF DROP EXIT THEN C,
|
||||
C< DUP 34 ( ASCII " ) = IF DROP EXIT THEN C,
|
||||
AGAIN ;
|
||||
|
||||
: ."
|
||||
34 , ( 34 == litWord ) ," 0 C,
|
||||
COMPILE (print)
|
||||
; IMMEDIATE
|
||||
: LIT" 34 , ( litWord ) ," 0 C, ; IMMEDIATE
|
||||
: ." [COMPILE] LIT" COMPILE (print) ; 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 ;
|
||||
|
3
blk/446
3
blk/446
@ -1,3 +0,0 @@
|
||||
: (ok) SPC ." ok" NL ;
|
||||
: (uflw) ABORT" stack underflow" ;
|
||||
: (wnf) (print) SPC ABORT" word not found" ;
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
@ -14,7 +14,7 @@
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
," CURRENT @ HERE ! "
|
||||
440 446 XPACKR
|
||||
440 445 XPACKR
|
||||
," ' (key) 12 RAM+ ! "
|
||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||
H@ 256 /MOD 2 PC! 2 PC!
|
||||
|
@ -18,7 +18,7 @@ RAMSTART 0x70 + CONSTANT ACIA_MEM
|
||||
(entry) _
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
440 446 XPACKR ( core )
|
||||
440 445 XPACKR ( core )
|
||||
123 132 XPACKR ( linker )
|
||||
," : _ ACIA$ RDLN$ (ok) ; _ "
|
||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||
|
@ -68,7 +68,7 @@ CREATE ~FNT CPFNT3x5
|
||||
(entry) _
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
440 446 XPACKR ( core )
|
||||
440 445 XPACKR ( core )
|
||||
," : _ LCD$ KBD$ (ok) RDLN$ ; _ "
|
||||
ORG @ 0x100 - 256 /MOD 2 PC! 2 PC!
|
||||
H@ 256 /MOD 2 PC! 2 PC!
|
||||
|
@ -14,7 +14,7 @@ RS_ADDR 0x80 - CONSTANT RAMSTART
|
||||
( Update LATEST )
|
||||
PC ORG @ 8 + !
|
||||
," CURRENT @ HERE ! "
|
||||
440 446 XPACKR ( core )
|
||||
440 445 XPACKR ( core )
|
||||
499 500 XPACKR ( trs80.fs )
|
||||
( 0x0a == NLPTR. TRS-80 wants CR-only newlines )
|
||||
," : _ ['] CR 0x0a RAM+ ! BLK$ FD$ (ok) RDLN$ ; _ "
|
||||
|
Loading…
Reference in New Issue
Block a user