0 Members and 5 Guests are viewing this topic.
:Repeat getKeyʳ=64:End
Although the new getKeyʳ is more useful, it can also now be very confusing. For example:Code: [Select]:Repeat getKeyʳ=64:EndCould cause an infinite loop that may be impossible to get out of, if lowercase is enabled.The reason for this is that if you type a lowercase letter, it is stored at $8446, but if you type any other key, it does not reset the value at $8446. (Edit: This causes all of the other keycodes to change to different values every time a lowercase letter is typed.) On the plus side, its value does seem to always be reset at the beginning of the program.Some fixes for this are to only read $8446 if a >= $fc, reset $8446 after it is read, or to change checks for any key that is not a lowercase letter to getKeyʳ^256=key code.Edit: And in the last case, it should probably be documented somewhere, since it is not obvious just from playing around with getKeyʳ.
[]->GDB1
Data()->GDB1
This also means error scrolling can finally be automatic since it won't ever crash. No need to press [prgm] anymore, it will always take you to the error unless you press [clear].
Some fixes for this are to only read $8446 if a >= $fc, reset $8446 after it is read, or to change checks for any key that is not a lowercase letter to getKeyʳ^256=key code.Edit: And in the last case, it should probably be documented somewhere, since it is not obvious just from playing around with getKeyʳ.
xor ald (keyExtend), abcall GetKey ; or GetKeyRetOff, whateverld hl, (keyExtend-1)ld l, a