I wanted to use keep using the 'drawSprite' routine, and call it 20 times. I am sure i can learn something from yoir code though

renderBkgd:
ld b,20 ;render 20 times
ld de,vRam
renderBkgdLoop:
push bc
ld hl,titleReapeat_sprite ; The sprite
push de
call drawSprite
pop de
ld hl,16
add hl,de
ex de,hl ; ld d,h
;ld e,l ;de = de+16
pop bc
djnz renderBkgdLoop
_finddata:
call _mov9toop1
call _chkfindsym
jp c,__notfound ; routine to run if not found
call _chkinram
ex de,hl
jp nz,__inarc
jr __skipsize
__notfound:
or a,a
sbc hl,hl
ret
__inarc:
ld de,9
add hl,de
ld e,(hl)
add hl,de
inc hl
__skipsize:
inc hl ; bypass size bytes
inc hl
ld hl,folderName
call _mov9toop1
ld hl,0
ld a,(inputLength)
inc a
ld l,a
call _CreateProtProg
ld hl,folderName
call _mov9toop1
ld hl,0
ld a,(inputLength)
inc a
ld l,a
call _CreateProtProg
ld a,kExtApps
call _NewContext
Asm(prgmINSTLAPI)
For(X,1,10
X:Disp sin(X
End
ld hl,HookAppvar
call _mov9toop1
call _chkfindsym
ex de,hl
ld bc,0
ld c,(hl)
inc hl
ld b,(hl)
inc hl
ld de,pixelShadow2
ldir
ld hl,pixelShadow2
call _SetParserHook
ret
.nolist
#include "ti84pce.inc"
.list
.org pixelShadow2
.db $83
or a ; Which condition?
ret z
push hl
ld hl,0C2C2h ; Is it the 'sin(' token?
;ld hl,$00BBC2 ;t2ByteTok and tSin
sbc hl,bc
pop hl
jr nz,ReturnZ
dec hl
call _DeallocFPS ; free unused parameters
call _RclAns
or 1 ; set NZ
ret
ReturnZ:
cp a
ret
#include "ti84pce.inc"
.db tExtTok,tAsm84CECmp
.org usermem
ld hl,hook_start
ld bc,hook_end-hook_start
ld de,pixelshadow2
push de
ldir
pop hl
jp _SetParserHook ; set the parser hook
hook_start:
.db $83
or a,a ; which condition?
ret z
call _SetBCUTo0
push hl
ld hl,$C2C2 ; sin( token?
sbc hl,bc
pop hl
jr nz,+_
dec hl
call _DeallocFPS ; free unused parameters
call _RclAns
or a,1 ; set NZ
ret
_:
cp a,a
ret
hook_end:
Advertisement