X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_read_stream_char.adoc;h=1472c27aafae60c7e99affa001658fad3911cada;hb=656f37efbd89db1b1088281047a9633cf74e92ec;hp=ba1579e2229182e8dfbf12d4d5281e5543b61486;hpb=fe4d0a01d5703d1ed6fa230679add024b5b2ca5c;p=rrq%2Frrqforth.git diff --git a/adoc/p_read_stream_char.adoc b/adoc/p_read_stream_char.adoc index ba1579e..1472c27 100644 --- a/adoc/p_read_stream_char.adoc +++ b/adoc/p_read_stream_char.adoc @@ -1,9 +1,18 @@ +// stdio.asm: WORD p_read_stream_char,'READ-STREAM-CHAR',fasm + anchor:p_read_stream_char[] -Word: READ-STREAM-CHAR ----------------------- +=== Word: READ-STREAM-CHAR + +.... +Data stack: ( stream -- c ) +.... ----- -stdio.asm: WORD p_read_stream_char,'READ-STREAM-CHAR',fasm ----- +"READ-STREAM-CHAR" is a function word that gets the next character +from the given stream buffer, possibly refilling the buffer if it is +backed by a file descriptor. The refill is done by a SYS_READ call +when more characters are needed. The next character is pushed on the +stack, unless the stream is exhausted in which case the -1 is pushed +instead. +See also <>.