Page 1 of 1

Pause on the zx80?

Posted: Sat Mar 22, 2014 12:42 pm
by lusciousthelock
Hiya,

How can I slow down the zx80 so I can see it count?

10 for a=1 to 1000
20 print a
30 cls
40 next a

I'm planning a little basic game based on dice rolls and would like a pause between moves so screen text can be read. is this possible? I also like the idea of zx81's pause statment that can be pushed forward by pushing any key to speed things up but I'm guessing the only way this could be done on the zx80 would be to input a string then press newline?

Re: Pause on the zx80?

Posted: Sat Mar 22, 2014 4:39 pm
by gozzo
I had also wondered if there was any way of simulating the zx81's PAUSE on a zx80, either timed or ended by keypress. unfortunately I don't know what will do it, yet!!

Re: Pause on the zx80?

Posted: Sat Mar 22, 2014 5:31 pm
by PokeMon
The only thing you can do is something like this:

Code: Select all

FOR I=0 TO 10000
NEXT I
There is no PAUSE command because there is no interrupt or NMI used like on the ZX81 - so there is no timer at all.
But depending on the value you count, you can vary the TO value or put other commands between, can be a divsion for example or a multiplication which should take some time. Would be possible to put an additional FOR NEXT loop inside as well (have then 65535*65535 times to do - this should give an enormous amount of delay :mrgreen: ).

But the ZX80 does not generate a visible screen content while program is running. Could be forced with INPUT I think but anyway screen will flicker quite much as well. ;)

Re: Pause on the zx80?

Posted: Sat Mar 22, 2014 5:35 pm
by PokeMon
gozzo wrote:I had also wondered if there was any way of simulating the zx81's PAUSE on a zx80, either timed or ended by keypress. unfortunately I don't know what will do it, yet!!
There is no INKEY$ function - this needs a timer as well. You could write an own assembler code doing keyboard enquiries.

Here is a good readable online manual:
http://fjkraan.home.xs4all.nl/comp/zx80/om/

Re: Pause on the zx80?

Posted: Sat Mar 22, 2014 9:12 pm
by lusciousthelock
Actually that did answer my question. I do get reasonable results with input b$ then just entering newline to continue with my program. I like how this operates and should suffice for my little game :D