Re: A85: Problems


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

Re: A85: Problems



You forgot to set the TI-85 Rom page to 4, which is required before calling
the FIND_PIXEL routine.
Insert the following lines in your code before you call PlotPixel (i.e. at
the beginning)

ld a,4
out (5),a

At 09:30 PM 11/8/97 -0700, you wrote:
>Well, I was trying to write my first zshell program, but it didn't seem to
>work right.  In fact, it doesn't work at all.  I was trying to display one
>pixel, and by pressing the arrow keys it would move around.  But instead, a
>bunch of boxes keep getting displayed, and the only way I can stop it is by
>pressing 'on' twice.  The first press turns off the calculator, and the
>second press turns it back on with all the weird characters on the screen
>(but still operational).  Please help me correct my problem.  Here is the
>asm file:
>
>#include "TI-85.H"
>
>	.org
>	.db "Move around",0
>
>init:
>
>	ld a,4
>	ld (5),a
>	ld a,10
>	ld ($800C),a
>	ld ($800D),a
>
>draw:
>	ROM_CALL(CLEARLCD)
>	ld a,($800C)
>	ld b,a
>	ld a,($800D)
>	ld c,a
>        CALL_(PlotPixel)    
>
>key:
>
>	call GET_KEY
>	cp $04
>	jp z,up
>	cp $01
>	jp z,down
>	cp $02
>	jp z,left
>	cp $03
>	jp z,right
>	cp $37
>	ret z
>	jp nz,key
>
>up:
>	ld a,($800D)
>	inc a
>	ld ($800D),a
>	jr draw
>
>down:
>	ld a,($800D)
>	dec a
>	ld ($800D),a
>	jr draw
>
>left:
>	
>	ld a,($800C)
>	dec a
>	ld ($800C),a
>	jr draw
>
>right:
>	ld a,($800C)
>	inc a
>	ld ($800C),a
>	jr draw
>
>end:
>	.end
>
>PlotPixel:
>  	 ROM_CALL(FIND_PIXEL)
>        ld de,$FC00
>        add hl,de
>        or (HL)
>        ld (HL),a
>        ret         
>
>
>


References: