2 ms·
This one is just code that the author didn't understand. He probably wrote it, but didn't understand it. Actually call _ jr z,_ xor a ret _ takes 4 bytes on a
by ratboy666 12y ago
This one is just code that the author didn't understand. He probably wrote it, but didn't understand it. Actually
call _
jr z,_
xor a
ret
_
takes 4 bytes on a z80. Should have done something like
call _
ret z
which saves three bytes (ret z is a one byte instruction).
I guess he may have forgotten about the conditional return instructions.
And, key debounce is important. In future, when the key switches become (when, not if) marginal, there will be a lot of make/break contact events. Software debounce was very common for this class of system. Missing that, and the
effect this had on the kernel being written? Very sloppy work.
3 weeks to track this down? Back in the 70's when the z80 was new we typically HAD NO DEBUGGER (unless you wrote it yourself), And, the hardware being developed may have been flaky. Hell, even the KIM-1 needed software debounce.
- ddevault 12y agoAuthor here. The `xor a` was important - it pretended no key was pressed. I'm familiar with conditional RET. Thanks for the rest of your kind words, though.