A86: map routine


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

A86: map routine




   This is a response to the last message I recieved from J.S. Which I 
accidently deleted.

-	cp 0			;check if the byte is 0
-	jp z, b0		;if so, draw b0
-	cp 1			;check if the byte is 1
-	jp z, b1		;if so, draw b1
-	cp 2			;check if the byte is 2
-	jp z, b2		;if so, draw b2
-Return_here:
-
-b0:
-	ld hl, block0	;load hl with the block we wish to draw
-	jp Return_here
-b1:
-	ld hl, block1	; 					"
-	jp Return_here
-b2:
-	ld hl, block2	;					"
-	jp Return_here
										rather than that try this

	ld hl,block0
	or a			;same as cp 0 except shorter + faster
	jr z,Return_here
	ld bc,8
	add hl,bc
	dec a
	jr z,Return_here
	add hl,bc
Return_here:

       This may not be the only thing and I'm fairly new also as you can 
probably tell.
                                         ~neophile_17
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com