Re: A86: beginner Quesion


[Prev][Next][Index][Thread]

Re: A86: beginner Quesion




    Okay, here is the whole code. I just thought the problem was in that segment
I didn't even think that it could have been in the other part. Also if you have
any other comments on my code that would be appropriate for my experience level
feel free to add them.

#include "ti86asm.inc"
.org _asm_exec_ram

 call _clrLCD
loop:
 call _getkey
 cp kUp
 jp z,up
 cp kDown
 jp z,down
 cp kLeft
 jp z,left
 cp kRight
 jp z,right
 cp kEnter
 jp nz,loop
 ret

up:
 call _clrLCD
 ld a,(_curRow)
 dec a
 ld (_curRow),a
 ld hl,string
 call _puts
 jr loop

down:
 call _clrLCD
 ld a,(_curRow)
 inc a
 ld (_curRow),a
 ld hl,string
 call _puts
 jr loop

left:
 call _clrLCD
 ld a,(_curCol)
 dec a
 ld (_curCol),a
 ld hl,string
 call _puts
 jr loop

right:
 call _clrLCD
 ld a,(_curCol)
 inc a
 ld (_curCol),a
 ld hl,string
 call _puts
 jr loop

string:
 .db "Move",0


.end


ComAsYuAre@aol.com wrote:

> You'll have to paste the whole code or at least give a more detailed
> description of the problem if you want anybody to help.  One little snippet
> of code is rarely enough to diagnose 1.what a problem is and 2.how to fix it.
>



References: