aboutsummaryrefslogtreecommitdiff
minimal, slow as fuck, and simple to expand forth dialect

2^16 bytes memory (@ store, ! access)
unsigned 16-bit bytes
supports unsigned int literal
supports signed int literal
supports unsigned fixed point literal
supports signed fixed point literal
supports string literal (array of bytes)

: ( switch to compile )
; ( switch out of compile )
@ ( a b -- )
! ( a -- b )
+ ( a b -- c )
< ( a b -- c )
. ( a -- )
neg ( a -- b )

implementation of usually built-in features

: dup 0 @ 0 ! 0 ! ; ( a -- a a )
: drop 0 @ ; ( a -- )
: swap 0 @ 1 @ 1 ! 0 ! ; ( a b -- b a )
: neg 32768 + ; ( a -- b )
: - neg + ; ( a b -- c )
: not 1 swap - ; ( a -- b )
: = - not ; ( a b -- c )

yes, i'm an idiot