qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL v2 11/14] semihosting: add qemu_semihosting_console_inc for SY


From: Keith Packard
Subject: Re: [PULL v2 11/14] semihosting: add qemu_semihosting_console_inc for SYS_READC
Date: Fri, 24 Jan 2020 10:45:32 -0800

Peter Maydell <address@hidden> writes:

> I'm not sure what we should do with EOF, but presumably
> we should handle it in some way.

There's no correct answer here, which is why the current implementation
just ignores it. Here are a couple of options:

 1. Just return whatever getchar() provides; if it returns EOF, we'll
    pass that on to the application. Semihost-aware applications may
    learn about this 'special' value.

 2. Return some ASCII control code (0x04?) in an attempt to tell the
    application what has happened.

 3. Block forever. This would at least keep the application from
    spinning.

-- 
-keith

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]