From: Ralph Ronnquist Date: Wed, 19 May 2021 07:46:12 +0000 (+1000) Subject: added CLEAR-STREAM X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=3087a82c8afa225bb29f08b5b29bed2d7dcef3ca;p=rrq%2Frrqforth.git added CLEAR-STREAM --- diff --git a/stdio.asm b/stdio.asm index 1773da2..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 )