commit 929c5d8aa9402c656eff2e79c1319fee9933bc7b
parent 59ad81bd09c244622d9d90003ddbd4c72c2fe918
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Wed, 1 Jun 2022 13:51:40 -0400
Move rdln$ to boot.fs
Diffstat:
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/asm.py b/asm.py
@@ -207,11 +207,6 @@ def _compile_():
def _callop_():
intwr(ops[b'_call_'])
-def _immfind_():
- name = nextt()
- off = words[name]
- litwr(off)
-
special = {
b':': newword,
b'(': _comment_,
@@ -231,7 +226,6 @@ special = {
b'spitnativewords': spitnativewords,
b'compile': _compile_,
b'callop': _callop_,
- b'[\']': _immfind_,
}
t = nextt()
diff --git a/boot.fs b/boot.fs
@@ -6,5 +6,7 @@
: until compile (?br) , ; immediate
: \ begin in< LF = until ; immediate
\ hello, this is a comment!
+: rdln$ ['] rdln< to in< ['] rdln<? to in<?
+ in) to in> 'curword 6 0 fill ;
: init prompt rdln$ ;
init
diff --git a/xcomp.txt b/xcomp.txt
@@ -66,8 +66,6 @@ lblhex: ," 0123456789abcdef"
: boot< in> c@+ swap to in> ;
alias in<? boot<
alias in< boot<
-: rdln$ ['] rdln< to in< ['] rdln<? to in<?
- in) to in> 'curword 6 0 fill ;
: toword ( -- ) begin in< ws? not until ;
: curword ( -- sa sl ) 'curword 1+ @ 'curword c@ ;
: _ ( f sa sl -- ) 'curword c!+ tuck ! 4 + c! ;