Ver código fonte

Move a bunch of words from XPACKed core to xcomp core

pull/102/head
Virgil Dupras 4 anos atrás
pai
commit
51997533ff
8 arquivos alterados com 14 adições e 23 exclusões
  1. +7
    -5
      blk/421
  2. +3
    -11
      blk/422
  3. +0
    -3
      blk/446
  4. BIN
      emul/forth.bin
  5. +1
    -1
      emul/xcomp.fs
  6. +1
    -1
      recipes/rc2014/xcomp.fs
  7. +1
    -1
      recipes/ti84/xcomp.fs
  8. +1
    -1
      recipes/trs80/xcomp.fs

+ 7
- 5
blk/421 Ver arquivo

@@ -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 ;

+ 3
- 11
blk/422 Ver arquivo

@@ -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 ;

+ 0
- 3
blk/446 Ver arquivo

@@ -1,3 +0,0 @@
: (ok) SPC ." ok" NL ;
: (uflw) ABORT" stack underflow" ;
: (wnf) (print) SPC ABORT" word not found" ;

BIN
emul/forth.bin Ver arquivo


+ 1
- 1
emul/xcomp.fs Ver arquivo

@@ -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!

+ 1
- 1
recipes/rc2014/xcomp.fs Ver arquivo

@@ -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!


+ 1
- 1
recipes/ti84/xcomp.fs Ver arquivo

@@ -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!

+ 1
- 1
recipes/trs80/xcomp.fs Ver arquivo

@@ -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$ ; _ "


Carregando…
Cancelar
Salvar