A86: Made another mistake.


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

A86: Made another mistake.



Me again, found problem with last one, did not .org $D748 at the
beginning of the prog. told you it was probably a stupid mistake.  This
time I am having trouble with a program to move the word "hello" around
the screen.  As you have probably already guessed it did not work.  Any
advice would be appreciated.

thanx,
Caymran
---------------------------------------------------------------------------------------------



#include "asm86.h"
#include "ti86asm.inc"

.org $D748


        ld h,0000

main:
      ld (_curRow),hl
      call _clrLCD
      ld hl,char
      call _puts
      jr key

key:
      halt
      call GET_KEY
      cp K_LEFT
      jr z,lef
     cp K_RIGHT
      jr z,rig
     cp K_UP
     jr z,u
     cp K_DOWN
     jr z,dow
     cp K_EXIT
     jr nz,key
     ret


lef:
    ld a,l
    dec a
    ld l,a
    jr main

rig:
    ld a,l
    inc a
    ld l,a
    jr main

u:
    ld a,h
    inc a
    ld h,a
    jr main

dow:
    ld a,h
    inc a
    ld h,a
    jr main

char:
    .db "Hello",0
    ret

.end
.end


Follow-Ups: