A83: Re: delay routines...HELP!


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

A83: Re: delay routines...HELP!




Dan, I recommend you get my tutorials :)...all those are explained.

Later,

James Matthews (matthews@tkb.att.ne.jp)

ICQ: 7413754
http://home.att.ne.jp/gold/tomcat21/index.html
http://library.advanced.org/18242/

----------
> From: Dan G. <idsoccer@lesbois.com>
> To: ASM 83 Mailing list <assembly-83@lists.ticalc.org>
> Subject: A83: delay routines...HELP!
> Date: Saturday, October 03, 1998 2:41 AM
> 
> 
> I have been trying for a few weeks to get a good delay rountine to slow
> down my program in places. I studied the code of many games that use
> delays, and I can't figure out what the commands do. If I implement other
> peoples delay code, my calc crashes.I haven't seen them in any tutorials or
> at the TI site. Many of the routines are similar from different programs.
> Here's the code from frogger...
> 
> DelayChk:
> 	push	af			<<<<what does push do?
> 	push	bc
> 	ld	a,(level)			<<<<I understand the speed settings
> 	cp	1
> 	jp	z,d2500
> 	cp	2
> 	jp	z,d2000
> 	cp	3
> 	jp	z,d1500
> 	cp	4
> 	jp	z,d1000
> 	jp	nz,500
> d2500:
> 	ld	bc,$2500		<<<<what does the $(number) mean?
> 	jp	delayLoop
> 
> d2000:
> 	ld	bc,$2000
> 	jp	delayLoop
> 
> d1500:
> 	ld	bc,$1500
> 	jp	delayLoop
> 
> d1000:
> 	ld	bc,$1000
> 	jp	delayLoop
> 
> d500:
> 	ld	bc,$500
> 	jp	delayLoop
> 		
> delayLoop:
> 	DEC BC			<<<What is DEC
> 	LD A, B			
> 	OR C				<<what is OR C
> 	JR NZ, delayLoop		
> 	POP BC			<<<what is POP
> 	POP AF			
> 	ret
> 
>