A83: ASM83: VTI Problem


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

A83: ASM83: VTI Problem




Hi, when I assemble this prog (83+), it works correctly on VTI, but not on my 
calc.  It doesnt crash the calc or anything, but it just doesnt work right.  
Can someone show me the problem?  Heres the code:

        .nolist
#DEFINE kLeft       02h
#DEFINE kRight      01h
#DEFINE kUp         03h
#DEFINE kDown       04h     ;All these guys are hex code
#DEFINE kEnter      05h     ;for keys on the Ti-keyboard.
#DEFINE kClear      09h
        #include "ion.inc"      ;tells TASM--the compiler--what file to read 
from to define rom call memory addresses and such
        .list

#ifdef TI83P            ;a check for TASM to see whether it is making an 83 
program--if so, do the next two commands
        .org    progstart-2
        .db     $BB,$6D
#else               ;if it isn't an 83 program, then do something 
[#]else--the next line
        .org    progstart
#endif              ;simply ends the #ifdef command
        ret             

        jr      nc,begin        ;Jumps to the beginning of the program (this 
line and the below three will be 
        .db     "Pixel Routine by Cole South",0     ;The title displayed by 
ION--anything you want
begin:              ;defines where label begin is, program code follows this 
label
    bcall(_clrlcdf)
    ld b,47
    ld c,47
    ld d,1
    bcall(_ipoint)
    bcall(_IndicatorOff)
Getkey:
    bcall(_getkey)
    cp kLeft        ;Compare key with code for left.
    jp z,Left       ;If equals 0, go to left.
    cp kRight           
    jp z,Right
    cp kUp
    jp z,Up
    cp kDown
    jp z,Down
    cp kClear
    jp z,Quit
    jp GetKey
Left:
    ld d,0
    bcall(_ipoint)
    dec b
    jp Draw
Right:
    ld d,0
    bcall(_ipoint)
    inc b
    jp Draw
Up:
    ld d,0
    bcall(_ipoint)
    inc c
    jp Draw
Down:
    ld d,0
    bcall(_ipoint)
    dec c
    jp Draw
Quit:
    ret

Draw:
    ld d,1
    bcall(_ipoint)
    jp Getkey


.end
END



Follow-Ups: