|
I don't think OSBYTE &78 is the way to go. The AUG says that this call is "Write current keys pressed information", and that it takes the X and Y registers as inputs which will be written to memory locations &ED and &EC, i.e. no keyboard scanning is done at all.
I think an appropriate call would be OSBYTE &7A (keyboard scan from 16 decimal), which returns the internal number of the key pressed in X. No need to look at location &EC or anything.
Also, you don't need to clear the keyboard buffer (with OSBYTE &0F) every time you read the keyboard in this way - but you should do it before you read anything from the keyboard buffer, e.g. OSWORD 0 or OSBYTE &81.
|