mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:28:06 +11:00
forth: add word "2DROP"
This commit is contained in:
parent
8186511727
commit
49994f09ce
Binary file not shown.
@ -100,6 +100,7 @@ DUP a -- a a
|
||||
OVER a b -- a b a
|
||||
ROT a b c -- b c a
|
||||
SWAP a b -- b a
|
||||
2DROP a a --
|
||||
2DUP a b -- a b a b
|
||||
2OVER a b c d -- a b c d a b
|
||||
2SWAP a b c d -- c d a b
|
||||
|
@ -74,7 +74,7 @@
|
||||
_c DUP ( a a )
|
||||
_c C@ ( a c )
|
||||
( exit if null )
|
||||
_c DUP NOT IF DROP DROP EXIT THEN
|
||||
_c DUP NOT IF _c 2DROP EXIT THEN
|
||||
_c EMIT ( a )
|
||||
1 _c + ( a+1 )
|
||||
AGAIN
|
||||
@ -121,7 +121,7 @@
|
||||
UNTIL
|
||||
( a this point, PS is: a WS )
|
||||
( null-termination is already written )
|
||||
DROP DROP
|
||||
_c 2DROP
|
||||
[ JTBL 30 + @ LITN ]
|
||||
;
|
||||
|
||||
|
@ -69,6 +69,12 @@ CODE 2DUP
|
||||
HL PUSHqq, ( B )
|
||||
;CODE
|
||||
|
||||
( a b -- )
|
||||
CODE 2DROP
|
||||
HL POPqq,
|
||||
HL POPqq,
|
||||
;CODE
|
||||
|
||||
( a b c d -- a b c d a b )
|
||||
|
||||
CODE 2OVER
|
||||
|
Loading…
Reference in New Issue
Block a user