LZ: my proggy...


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

LZ: my proggy...



I made this ripping code from a lot of other programs... so if you
look at it and say "HEY, I WROTE THIS!!" I am sorry... I just learned
Z80 in the past week... I tried to make something that just prints a 
number, then incs it and reprints...
I just wanted to see how fast it could count... well, I compiled it,
no errors, but when I run it in zshell, it starts to load, but then the
zshell menu scrolls again (this happens VERY quickly...) 
first though... I accidentally added a ret z somewhere, but I couldn't
see anything... any help would be appreciated.
I will just paste it on the message...

#INCLUDE "TI-85.H"

.org 0
.db "Counter thingy", 0

Number = $8100   
numTxt = $8101

	ld a, 1
	ld (Number),a
Loop:
	ld a, (Number)
	inc a
	ld (Number),a
	CALL_(Drawnum)
        ROM_CALL(GET_KEY)
	cp $37
	jr NZ, Loop
	ret z

Drawnum:
  	ld hl, (Number)
  	ld a, $67
  	ld (CURSOR_X), a
  	ld a, $07
  	ld (CURSOR_Y), a
  	CALL_(PrintNumber)
 	ret
PrintNumber:   
	ld de, numTxt+4  
  	ld b, $05          
PrintNumber2:
	call UNPACK_HL  
  	add a, '0'      
  	ld (de), a 
  	dec de
  	djnz PrintNumber2  
  	ld hl, numTxt
  	ld b, $05
  	res 3, (iy+5)  
  	ROM_CALL(D_LM_STR) 
  	ret

.end

WHAT IS WRONG WITH THIS?!!!

Mike Kristopeit


Follow-Ups: