Well I don't know much about assembly but you can use interrupts probably, but I'm sure there's a better way. As for your TI-BASIC example, that won't really work. You don't have R
initialized, plus you have no wrap around/end stopping code. Also, For(A,1,1000):End
is way overkill for that. (Also, the key code for the right button isn't twenty-four, it's twenty-six. So unless you meant left you'd have to change that plus the line C-1→C
would be C+1→C
.) Better way of showing would be:
rand(2 \\rand or rand(# is a better way to do delay/pauses/slowdowns/etc. in TI-BASIC.