mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 16:28:05 +11:00
Simplify NL
I think that when I added NL, I had troubles having access to CRLF's address at boot time, which is why I had this system. But now that CRLF is easily accessible during BOOT, we can simplify. (and that will help us in the hopefully-upcoming change, which is quite nice...)
This commit is contained in:
parent
04bd57b527
commit
788453b89c
2
blk/381
2
blk/381
@ -4,7 +4,7 @@
|
||||
: (print) C@+ ( a len ) 0 DO C@+ EMIT LOOP DROP ;
|
||||
: BS 8 EMIT ; : LF 10 EMIT ; : CR 13 EMIT ;
|
||||
: CRLF CR LF ; : SPC 32 EMIT ;
|
||||
: NL 0x0a RAM+ @ ( NLPTR ) ?DUP IF EXECUTE ELSE CRLF THEN ;
|
||||
: NL 0x0a RAM+ @ ( NLPTR ) EXECUTE ;
|
||||
: (uflw) LIT" stack underflow" ERR ;
|
||||
XCURRENT @ _xapply ORG @ 0x06 ( stable ABI uflw ) + !
|
||||
: (oflw) LIT" stack overflow" ERR ;
|
||||
|
2
blk/396
2
blk/396
@ -5,7 +5,7 @@
|
||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||
0 0x53 RAM+ ! ( 53 == (emit) override )
|
||||
0 0x55 RAM+ ! ( 55 == (key) override )
|
||||
0 0x0a RAM+ ! ( NLPTR )
|
||||
['] CRLF 0x0a RAM+ ! ( NLPTR )
|
||||
( 0c == C<* )
|
||||
['] (boot<) 0x0c RAM+ !
|
||||
['] C@ A@* ! ['] C! A!* !
|
||||
|
BIN
cvm/forth.bin
BIN
cvm/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user