From 3087a82c8afa225bb29f08b5b29bed2d7dcef3ca Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 19 May 2021 17:46:12 +1000 Subject: [PATCH] added CLEAR-STREAM --- stdio.asm | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ) -- 2.39.2