Hi,
I'm writing a little program that is run instead of a bootloader. It's just an excercise to learn more about x86-assembly and the BIOS.
The following subroutine should wait for a keystroke (if there is none in the buffer) and return its ASCII code.
But it doesn't work as intended, the value returned is always the same. It's probably a really simple problem, but I would appreciate any help.Code:char getkey(void) { short s; asm( "xor %%ah, %%ah\n\t" "int $0x16" : "=al" (s) : ); return (char)s; }