MC INKEY$ replacement
MC INKEY$ replacement
From "Syntax" magazine
- Attachments
-
- MC INKEY$.zip
- (3.95 KiB) Downloaded 256 times
Re: MC INKEY$ replacement
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:
Siggi
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.
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
http://zx81.ddns.net/ZxTeaM
Re: MC INKEY$ replacement
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.