summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jefs.fs19
1 files changed, 11 insertions, 8 deletions
diff --git a/jefs.fs b/jefs.fs
index d2943f9..460eb53 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -80,14 +80,6 @@ hex : ret, c3 c, ; decimal
\ maybe i made bad design decisions, this is CREATE but it pushes a pointer to just after its definition. for arrays and the like
\ does not use LIT because we want to fill it in After
: make create here @ 18 + [compile] lit ret, ;
-\ creates a word called _ (so don't create an actual word called that!!!)
-\ maybe it could be an empty string but that might require some rewriting
-\ (maybe a bad solution, but ; expects a header and reads from LATEST...
-\ maybe WORDS should skip words whose name is just _?)
-\ it may not be a bad idea to redefine ; above this so it works with :> words.
-\ maybe a NONAMING? variable so we know it's a :> word and thus does not need to be unsmudged?
-\ also we can't use CREATE because it reads from tib. eugh
-: :> here @ latest @ , 0 c, 1 w, [ char _ ] literal c, latest ! smudge here @ ( ← xt ) [compile] ] ;
0 constant false
-1 constant true
@@ -107,6 +99,15 @@ hex : ret, c3 c, ; decimal
: ." [compile] s" ' say compile, ; immediate \ lol this word breaks the highlighting, here have another "
: z" 1 >in +! [ char " ] literal cparse branch >mark >r 2dup cmove, 0 c, nip r> dup >resolve 4 + [compile] lit drop ( 1+ [compile] lit ) ; immediate
+\ creates a word called _ (so don't create an actual word called that!!!)
+\ maybe it could be an empty string but that might require some rewriting
+\ (maybe a bad solution, but ; expects a header and reads from LATEST...
+\ maybe WORDS should skip words whose name is just _?)
+\ it may not be a bad idea to redefine ; above this so it works with :> words.
+\ maybe a NONAMING? variable so we know it's a :> word and thus does not need to be unsmudged?
+\ also we can't use CREATE because it reads from tib. eugh
+: :> here @ latest @ , 0 c, 1 w, [ char _ ] literal c, latest ! smudge here @ ( ← xt ) [compile] ] ;
+
\ ASSEMBLER {{{
\ https://wiki.osdev.org/X86-64_Instruction_Encoding
\ see dusk os asm/x86.fs
@@ -360,6 +361,8 @@ make line-buffer line-buffer-length allot
: quit 0 to source-id [compile] [ begin refill while interpret ." ok" cr repeat ;
\ }}}
+:> >s0 error @ write-error cr quit ; to handler
+
: (evaluate) ( c-addr u -- ) 0 >in ! ( u ) #tib ! ( c-addr ) tib !
source-id >r string-source to source-id interpret r> to source-id ;
: evaluate ( c-addr u -- ) tib @ >r #tib @ >r >in @ >r (evaluate) r> >in ! r> #tib ! r> tib ! ;