I want to compare keystrokes in assembly (CCS64).
If I type in the same key in a row I want to do something
example: A A = do this
but if I type this: A B = do something else
Suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I prepared an example to you just like you’ve wanted. If you press same keys in a row twice, border color changes to red, otherwise stays black.
Warning! This example uses
kernalroutines. There is nothing wrong with that. But there is also a lower level way to do this without using$ffd2(Output Vector, chrout) and$ffe4(Get From Keyboad) kernal calls. But since it is much more complicated to understand, I prefered this example.If you want to know what is happening behind the scenes (kernal calls), you can easily trace the kernal ROM codes from
AAY64documentation. Here is the links:Main AAY Page: http://www.the-dreams.de/aay.html
AAY64 Online HTML Version: http://unusedino.de/ec64/technical/aay/c64/
Kernal ROM Listing: http://unusedino.de/ec64/technical/aay/c64/krnromma.htm
$ffd2(Output Vector, chrout): http://unusedino.de/ec64/technical/aay/c64/romffd2.htm$ffe4(Get From Keyboad): http://unusedino.de/ec64/technical/aay/c64/romffe4.htmYou can browse deeper by pressing links on the opcodes and addresses.
Here goes the example code. You can compile this code using
ACME Crossassemblerwhich you can find here -> http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/