X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=stdio.asm;h=5767d8b8258be3c1b11fd92d67832ce6245cbfa6;hb=5b7f593fcea545619f8afcc01099e433c84250a7;hp=7cf148dfca09e287db5bd7675efa64cd66524041;hpb=cf11109f96ba17c7c7a74a8fd3c31c985b8938d1;p=rrq%2Frrqforth.git diff --git a/stdio.asm b/stdio.asm index 7cf148d..5767d8b 100644 --- a/stdio.asm +++ b/stdio.asm @@ -70,6 +70,14 @@ p_stream_MEM: 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 ) @@ -195,3 +203,13 @@ p_emit_buffer: dq 0 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 +