Forum Discussion
Altera_Forum
Honored Contributor
14 years agoI'd guess that the result range of alt_getchar() is -1 (no char available) and 0..255 for a received byte (it could also return indications of abort and framing errors) - so the return value could well be 'int' not 'char'.
getchar() will pull in a lot of libc code, and may also (by default at least) require that you type <enter> before making any data available.