0 Members and 3 Guests are viewing this topic.
call ** == $CDJust put that hex in the program followed by the hex equate of the subroutine so:[shameless plug] http://future_history.freehostia.com/Files/Resources/program%20readmes/Axe/Commands.htm#Sym [/shameless plug]Code: [Select]...code...Asm(CD####)...code...I believe this works.
...code...Asm(CD####)...code...
:Lbl KEY:For(A,1,56):ReturnIf getkey(A):End:Return 0
Scanning the keys yourself is actually much faster than GetCSC. But obviously scanning all the keys is always going to be slower than scanning a single key.Code: [Select]:Lbl KEY:For(A,1,56):ReturnIf getkey(A):End:Return 0Calling this subroutine will give A the value of the current key being pressed or 0 if nothing is pressed.Oh, and the actual slowdown for variable key detection is so small compared to Dispgraph or sprite drawing that I would consider it negligible. It isn't much bigger either since it only needs to add the subroutine to the program once.