mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-28 08:08:05 +11:00
Move (print) and (uflw) from icore to core
This commit is contained in:
parent
c56386af02
commit
b575d7f863
Binary file not shown.
Binary file not shown.
@ -30,10 +30,10 @@ NOP, NOP, ( 26, unused )
|
||||
0 JPnn, ( 28, flagsToBC )
|
||||
0 JPnn, ( 2b, doesWord )
|
||||
NOP, NOP, ( 2e, unused )
|
||||
RAMSTART 0x51 + JPnn, ( RST 30 )
|
||||
RAMSTART 0x4e + JPnn, ( RST 30 )
|
||||
NOP, NOP, NOP, ( unused )
|
||||
NOP, NOP, ( unused )
|
||||
RAMSTART 0x51 + JPnn, ( RST 38 )
|
||||
RAMSTART 0x4e + JPnn, ( RST 38 )
|
||||
NOP, ( unused )
|
||||
|
||||
( BOOT DICT
|
||||
|
@ -5,8 +5,10 @@
|
||||
: LIT 34 , ;
|
||||
: LITS LIT SCPY ;
|
||||
: LIT< WORD LITS ; IMMEDIATE
|
||||
: _err LIT< word-not-found (print) ABORT ;
|
||||
: ' WORD (find) NOT (?br) [ 4 , ] _err ;
|
||||
: '
|
||||
WORD (find) (?br) [ 4 , ] EXIT
|
||||
LIT< (wnf) (find) DROP EXECUTE
|
||||
;
|
||||
: ['] ' LITN ; IMMEDIATE
|
||||
: COMPILE ' LITN ['] , , ; IMMEDIATE
|
||||
: [COMPILE] ' , ; IMMEDIATE
|
||||
@ -117,6 +119,16 @@
|
||||
own address )
|
||||
46 RAM+ DUP 2 + SWAP !
|
||||
|
||||
: (print)
|
||||
BEGIN
|
||||
DUP C@ ( a c )
|
||||
( exit if null )
|
||||
DUP NOT IF 2DROP EXIT THEN
|
||||
EMIT ( a )
|
||||
1 + ( a+1 )
|
||||
AGAIN
|
||||
;
|
||||
|
||||
: ."
|
||||
LIT
|
||||
BEGIN
|
||||
@ -129,3 +141,6 @@
|
||||
; IMMEDIATE
|
||||
|
||||
: ABORT" [COMPILE] ." COMPILE ABORT ; IMMEDIATE
|
||||
|
||||
: (uflw) ABORT" stack underflow" ;
|
||||
: (wnf) ABORT" word not found" ;
|
||||
|
@ -114,22 +114,6 @@
|
||||
_c (parsed) _c NOT IF _c ABORT THEN
|
||||
;
|
||||
|
||||
( a -- )
|
||||
: (print)
|
||||
BEGIN
|
||||
_c DUP ( a a )
|
||||
_c C@ ( a c )
|
||||
( exit if null )
|
||||
_c DUP _c NOT IF _c 2DROP EXIT THEN
|
||||
_c EMIT ( a )
|
||||
1 _c + ( a+1 )
|
||||
AGAIN
|
||||
;
|
||||
|
||||
: (uflw)
|
||||
LIT< stack-underflow _c (print) _c ABORT
|
||||
;
|
||||
|
||||
: C<
|
||||
( 0c == CINPTR )
|
||||
0x0c _c RAM+ _c @ EXECUTE
|
||||
|
Loading…
Reference in New Issue
Block a user