[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
Re: [PULL v2 11/14] semihosting: add qemu_semihosting_console_inc for SYS_READC
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
Description: PGP signature