projects
/
rrq
/
rrqforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added STREAM macro
[rrq/rrqforth.git]
/
stdio.asm
diff --git
a/stdio.asm
b/stdio.asm
index 7cf148dfca09e287db5bd7675efa64cd66524041..5767d8b8258be3c1b11fd92d67832ce6245cbfa6 100644
(file)
--- a/
stdio.asm
+++ b/
stdio.asm
@@
-70,6
+70,14
@@
p_stream_MEM:
push rax
jmp exit
push rax
jmp exit
+ WORD p_clear_stream,'CLEAR-STREAM',fasm
+ ;; ( stream -- )
+ ;; Clear buffer of input stream
+ pop rax
+ mov rbx,qword [rax+16] ; copy fill
+ mov qword [rax+24],rbx ; into current
+ next
+
;;; ========================================
;;; Stream reading
;;; READ-STREAM-CHAR ( stream -- ch )
;;; ========================================
;;; Stream reading
;;; READ-STREAM-CHAR ( stream -- ch )
@@
-195,3
+203,13
@@
p_emit_buffer: dq 0
popr rsi
next
popr rsi
next
+ WORD p_nl,'NL',dovalue
+ ;; ( -- c )
+ ;; Pushes a newline character on the stack
+ dq 10
+
+ WORD p_sp,'SP',dovalue
+ ;; ( -- c )
+ ;; Pushes a space character on the stack
+ dq 10
+