Page 1 of 1
MC INKEY$ replacement
Posted: Sat Apr 13, 2019 10:16 pm
by GCHarder
From "Syntax" magazine
Re: MC INKEY$ replacement
Posted: Mon Apr 15, 2019 9:15 am
by siggi
Hi Greg
this is not a real "inkey" function like in BASIC.
The BASIC inkey$ function reads the keyboard "on the fly" and does not wait for a key to be pressed. But this mc stays inside a loop (and does not return) if no key is pressed:
Code: Select all
@Again
Call Keyboard ;Call ROM scan keybd.
INC L ;Check for no key press, L=FF
JR Z Again ;If L=0 then Scan again.
Siggi
Re: MC INKEY$ replacement
Posted: Mon Apr 15, 2019 9:40 am
by mrtinb
A new "INKEY$" that fixes the problem with pressing Space/Break has to be a MC that does not return to Basic. Because if it returns to Basic, Space will break at any Basic statement.