mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 19:28:06 +11:00
forth: Forth-ify "DROP"
This commit is contained in:
parent
49994f09ce
commit
f9c3a0444c
Binary file not shown.
@ -869,18 +869,10 @@ FETCH:
|
||||
push hl
|
||||
jp next
|
||||
|
||||
; ( a -- )
|
||||
.db "DROP"
|
||||
.dw $-FETCH
|
||||
.db 4
|
||||
; STABLE ABI
|
||||
DROP:
|
||||
.dw nativeWord
|
||||
pop hl
|
||||
jp next
|
||||
.fill 13
|
||||
|
||||
.db "_bend"
|
||||
.dw $-DROP
|
||||
.dw $-FETCH
|
||||
.db 5
|
||||
; Offset: 0647
|
||||
.out $
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
: QUIT
|
||||
0 FLAGS ! _c (resRS)
|
||||
LIT< INTERPRET (find) DROP EXECUTE
|
||||
LIT< INTERPRET (find) _c DROP EXECUTE
|
||||
;
|
||||
|
||||
: ABORT _c (resSP) _c QUIT ;
|
||||
@ -101,7 +101,7 @@
|
||||
|
||||
: TOWORD
|
||||
BEGIN
|
||||
_c C< _c DUP _c WS? NOT IF EXIT THEN DROP
|
||||
_c C< _c DUP _c WS? NOT IF EXIT THEN _c DROP
|
||||
AGAIN
|
||||
;
|
||||
|
||||
@ -155,10 +155,10 @@
|
||||
;
|
||||
|
||||
: BOOT
|
||||
LIT< (c<) (find) NOT IF LIT< KEY (find) DROP THEN
|
||||
LIT< (c<) (find) NOT IF LIT< KEY (find) _c DROP THEN
|
||||
( JTBL+40 == CINPTR )
|
||||
[ JTBL 40 + @ LITN ] !
|
||||
LIT< (c<$) (find) IF EXECUTE ELSE DROP THEN
|
||||
LIT< (c<$) (find) IF EXECUTE ELSE _c DROP THEN
|
||||
_c INTERPRET
|
||||
;
|
||||
|
||||
@ -191,7 +191,7 @@
|
||||
|
||||
: Y
|
||||
['] EXIT ,
|
||||
_c R> DROP ( exit : )
|
||||
_c R> _c DROP ( exit : )
|
||||
; IMMEDIATE
|
||||
|
||||
( Give ":" and ";" their real name )
|
||||
|
@ -39,6 +39,11 @@ CODE DUP
|
||||
HL PUSHqq, ( A )
|
||||
;CODE
|
||||
|
||||
( a -- )
|
||||
CODE DROP
|
||||
HL POPqq,
|
||||
;CODE
|
||||
|
||||
( a b -- b a )
|
||||
CODE SWAP
|
||||
HL POPqq, ( B )
|
||||
|
Loading…
Reference in New Issue
Block a user