diff options
| author | kitty <nepeta@canaglie.net> | 2026-02-21 00:36:47 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-02-21 00:36:47 +1100 |
| commit | d5757bd85c97dafd245875ea9216f4f35a5d9790 (patch) | |
| tree | aac0787e4bc92ac22cd23b3d88fa89abe74de193 /jefs.fs | |
| parent | 13b631bfde1c9e488b1827282fd9968371679472 (diff) | |
u.r, fix r> >r
Diffstat (limited to 'jefs.fs')
| -rw-r--r-- | jefs.fs | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -24,9 +24,6 @@ decimal : constant create [compile] lit ret, ; : variable 1 cells allot create [compile] lit ret, ; -32 constant bl -: space bl emit ; - \ TODO interpret mode strings? : s" [ char " ] literal 1 >in +! ( skip spc ) [compile] litstring ; immediate : ." [compile] s" ' say compile, ; immediate \ lol this word breaks the highlighting, here have another " @@ -45,12 +42,18 @@ decimal : if 0branch >mark ; immediate ( I: -- a ) : else branch >mark swap >resolve ; immediate : then >resolve ; immediate +: while 0branch >mark ; immediate +: repeat branch swap <resolve >resolve ; immediate : / /mod swap drop ; : mod /mod drop ; : negate 0 swap - ; : abs dup 0< if negate then ; +32 constant bl +: space bl emit ; +: spaces begin dup 0> while space 1- repeat drop ; + \ PNO \ mostly from pforth 255 allot variable pad @@ -64,10 +67,11 @@ variable hld : (u.) <# #s #> ; : u. (u.) say space ; +: u.r >r (u.) r> over - spaces say ; : (.) dup abs <# #s swap sign #> ; : . (.) say space ; - \ TODO something is leaking its stack (a word address i think) +15 10 u.r t bye |
