diff options
| author | kitty <nepeta@canaglie.net> | 2026-02-24 02:14:04 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-02-24 02:14:04 +1100 |
| commit | d3306df06f02023a1fe16156cc0a7c656dcceff7 (patch) | |
| tree | 103cb411a93436ef14d0eeb72df05353e730cd4a /jefs.fs | |
| parent | ce86d1196c4936fe67129a3ab2fc57ae131df6f1 (diff) | |
s, (cmove, in forth)
still doesn't work. i'm still at a loss for where the problem is coming
from. i think i will make it use cmove, again, and put a breakpoint
there so i can figure out how uninterpreted code is making it into
the stack.
Diffstat (limited to 'jefs.fs')
| -rw-r--r-- | jefs.fs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -18,6 +18,7 @@ hex : ret, c3 c, ; decimal : [compile] parse find drop >cfa compile, ; immediate : ' parse find drop >cfa [compile] lit ; immediate \ note: no error handling (yet) : recurse latest @ >cfa compile, ; immediate +: s, ( c-addr u -- ) here @ swap ( c-addr here u ) dup >r cmove r> here +! ; : literal [compile] lit ; immediate : constant create [compile] lit ret, ; @@ -44,7 +45,7 @@ hex : ret, c3 c, ; decimal \ TODO interpret mode strings? \ : s" [ char " ] literal 1 >in +! ( skip spc ) [compile] litstring ; immediate -: s" 1 >in +! [ char " ] literal cparse branch >mark >r 2dup cmove, r> >resolve swap [compile] lit [compile] lit ; immediate +: s" 1 >in +! [ char " ] literal cparse branch >mark >r 2dup s, r> >resolve swap [compile] lit [compile] lit ; immediate : ." [compile] s" ' say compile, ; immediate \ lol this word breaks the highlighting, here have another " \ https://wiki.osdev.org/X86-64_Instruction_Encoding @@ -164,6 +165,6 @@ variable hld \ : .free bytes-free u. ." of " bytes-allocated u. ." bytes free (used " bytes-used (.) say ." )" cr ; \ segfaults \ .free bye -\ : t s" eue eu eo o eu" drop say .s s" euoe" ; +: t s" eue eu eo o eu" drop .s say ; t bye |
