mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-08 23:18:04 +11:00
fb54fd51af
Also, add "," and "C,"
13 lines
285 B
Forth
13 lines
285 B
Forth
: ? @ . ;
|
|
: +! SWAP OVER @ + SWAP ! ;
|
|
: ALLOT HERE +! ;
|
|
: VARIABLE CREATE 2 ALLOT ;
|
|
: CONSTANT CREATE HERE @ ! DOES> @ ;
|
|
: , HERE @ ! 2 ALLOT ;
|
|
: C, HERE @ C! 1 ALLOT ;
|
|
: THEN DUP HERE @ SWAP - SWAP C! ; IMMEDIATE
|
|
: NOT IF 0 ELSE 1 THEN ;
|
|
: = CMP NOT ;
|
|
: < CMP 0 1 - = ;
|
|
: > CMP 1 = ;
|