[SLOF] [PATCH] Fix output word
Alexey Kardashevskiy
aik at ozlabs.ru
Wed Sep 27 16:25:03 AEST 2017
On 26/09/17 21:28, Laurent Vivier wrote:
> We can select the console output, but it does not really work
Can you please provide a QEMU command line which did not work before and
does after this applied, just to verify I understand the change? The same
question about "[PATCH] Use input-device and output-device". Thanks.
>
> Implement term-io-emit, as we have term-io-key to really
> send characters to the output selected by stdout.
>
> Signed-off-by: Laurent Vivier <lvivier at redhat.com>
> ---
> slof/fs/term-io.fs | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/slof/fs/term-io.fs b/slof/fs/term-io.fs
> index 52ce12a..a0b0f4b 100644
> --- a/slof/fs/term-io.fs
> +++ b/slof/fs/term-io.fs
> @@ -40,6 +40,20 @@
>
> 1 BUFFER: (term-io-char-buf)
>
> +: term-io-emit ( char -- )
> + s" stdout" get-chosen IF
> + decode-int nip nip dup 0= IF 0 EXIT THEN
> + swap (term-io-char-buf) c!
> + >r (term-io-char-buf) 1 s" write" r@ $call-method
> + drop
> + r> drop
> + ELSE
> + [ ' emit behavior compile, ]
> + THEN
> +;
> +
> +' term-io-emit to emit
> +
> : term-io-key ( -- char )
> s" stdin" get-chosen IF
> decode-int nip nip dup 0= IF 0 EXIT THEN
>
--
Alexey
More information about the SLOF
mailing list