MC INKEY$ replacement

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
User avatar
GCHarder
Posts: 427
Joined: Sat Dec 14, 2013 7:46 pm

MC INKEY$ replacement

Post by GCHarder »

From "Syntax" magazine
Attachments
MC INKEY$.zip
(3.95 KiB) Downloaded 238 times
User avatar
siggi
Posts: 988
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: MC INKEY$ replacement

Post 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
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: MC INKEY$ replacement

Post 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.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Post Reply