mirror of
https://github.com/nineties/planckforth
synced 2025-01-27 08:00:04 +01:00
Add compile,
This commit is contained in:
parent
44b3376dab
commit
9ce6585e10
2 changed files with 11 additions and 8 deletions
|
@ -543,6 +543,9 @@ allot-cell : &find! [ ' L , , ] ; \ ( c-addr -- nt ) Throw exception at error
|
||||||
' (compile)
|
' (compile)
|
||||||
; immediate
|
; immediate
|
||||||
|
|
||||||
|
\ runtime: ( w -- )
|
||||||
|
: compile, , ;
|
||||||
|
|
||||||
\ ( -- xt )
|
\ ( -- xt )
|
||||||
: :noname
|
: :noname
|
||||||
align
|
align
|
||||||
|
@ -2582,7 +2585,7 @@ need-defined (read)
|
||||||
catch throw success
|
catch throw success
|
||||||
: ; [ ] immediate create >body :noname does>
|
: ; [ ] immediate create >body :noname does>
|
||||||
variable constant value to
|
variable constant value to
|
||||||
' ['] compile [compile] literal state
|
' ['] compile compile, [compile] literal state
|
||||||
+ - * /mod / mod negate not and or xor invert within max min abs
|
+ - * /mod / mod negate not and or xor invert within max min abs
|
||||||
< > <= >= = <> 0< 0> 0<= 0>= 0= 0<> 1+ 1-
|
< > <= >= = <> 0< 0> 0<= 0>= 0= 0<> 1+ 1-
|
||||||
u< u> u<= u>= lshift rshift 2* 2/
|
u< u> u<= u>= lshift rshift 2* 2/
|
||||||
|
|
|
@ -433,17 +433,17 @@ T{ 25 RN2 execute -> 33 22 11 0 }T
|
||||||
\ -----------------------------------------------------------------------------
|
\ -----------------------------------------------------------------------------
|
||||||
testing C"
|
testing C"
|
||||||
|
|
||||||
T{ : CQ1 C" 123" ; -> }T
|
skip T{ : CQ1 C" 123" ; -> }T
|
||||||
T{ CQ1 COUNT EVALUATE -> 123 }T
|
skip T{ CQ1 COUNT EVALUATE -> 123 }T
|
||||||
T{ : CQ2 C" " ; -> }T
|
skip T{ : CQ2 C" " ; -> }T
|
||||||
T{ CQ2 COUNT EVALUATE -> }T
|
skip T{ CQ2 COUNT EVALUATE -> }T
|
||||||
T{ : CQ3 C" 2345"COUNT EVALUATE ; CQ3 -> 2345 }T
|
skip T{ : CQ3 C" 2345"COUNT EVALUATE ; CQ3 -> 2345 }T
|
||||||
|
|
||||||
\ -----------------------------------------------------------------------------
|
\ -----------------------------------------------------------------------------
|
||||||
testing COMPILE,
|
testing compile,
|
||||||
|
|
||||||
:noname dup + ; constant dup+
|
:noname dup + ; constant dup+
|
||||||
T{ : Q dup+ COMPILE, ; -> }T
|
T{ : Q dup+ compile, ; -> }T
|
||||||
T{ : AS1 [ Q ] ; -> }T
|
T{ : AS1 [ Q ] ; -> }T
|
||||||
T{ 123 AS1 -> 246 }T
|
T{ 123 AS1 -> 246 }T
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue