projects
/
rrq
/
rrqforth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7da3f7
)
added the left-parenthesis word (comments)
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Wed, 26 May 2021 03:54:17 +0000
(13:54 +1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Wed, 26 May 2021 03:54:17 +0000
(13:54 +1000)
rrqforth.asm
patch
|
blob
|
history
diff --git
a/rrqforth.asm
b/rrqforth.asm
index ecea1171612a82f840f91d82ce44931432805576..7c1b5ca1ed314decfdfb7dbec0176ca2eecb40fb 100644
(file)
--- a/
rrqforth.asm
+++ b/
rrqforth.asm
@@
-193,7
+193,28
@@
include 'compile.asm'
;; Pointer to initial argument block
dq 0 ; *(int argc,(char*[argc]) argv)
;; Pointer to initial argument block
dq 0 ; *(int argc,(char*[argc]) argv)
-;;; The main entry point.
+ WORD p_lparen,'(',fasm,IMMEDIATE
+ pushr rsi
+p_lparen_loop:
+ DOFORTH p_stdin, p_read_word
+ pop rax
+ pop rbx
+ cmp rax,0 ; end of stream
+ je p_lparen_exit
+ cmp rax,1
+ jne p_lparen_loop
+ push rbx
+ push qword ')'
+ push 1
+ DOFORTH p_strncmp
+ pop rax
+ cmp rax,0
+ jne p_lparen_loop
+p_lparen_exit:
+ popr rsi
+ next
+
+;;; ******** The main entry point. ********
main:
;; Initial rsp points to the arguments block of size (64 bits)
;; followed by the argument pointers.
main:
;; Initial rsp points to the arguments block of size (64 bits)
;; followed by the argument pointers.