A86: Why doesn't this work?
[Prev][Next][Index][Thread]
A86: Why doesn't this work?
I'm writing a program that will eventually move something around the screen,
to learn asm. This won't work for some reason. However a version I made
that only says Left and Right works, this works the same way, it just looks
for Up and Down too.
#include "ti86asm.inc"
.org _asm_exec_ram
call _clrLCD
Keyloop:
call _getkey
dec a
jr z,Right
dec a
jr z,Left
dec a
jr z,Up
dec a
jr z,Down
jr Keyloop
Left:
call _homeup
ld hl,LFT
call _puts
jr ED
Right:
call _homeup
ld hl,RTE
call _puts
jr ED
Up:
call _homeup
ld hl,UPP
call _puts
jr ED
Down:
call _homeup
ld hl,DWN
call _puts
jr ED
LFT:
.db "Left",0
RTE:
.db "Right",0
UPP:
.db "Up",0
DWN:
.db "Down",0
ED:
.end
Thanks,
JEI
Follow-Ups: