A82: #?%@! Zero Flag! >=(


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

A82: #?%@! Zero Flag! >=(



I'm having a SERIOUS problem here. I'm using the code below for key
input.(This is a section from it) The value of the A register is 0 right
before the relative jump, but it doesn't jump. I don't get it. If anyone
can clear this up for me, I'd be forever in your debt. BTW, it can be a
relative jump; it doesn't exceed the byte limit. (I've tried it both ways
too and it doesn't work ;) )

				; value of A register is 255
	xor 255			; now A is 0
	or A            	; update flags - Zero SHOULD be set
	jr z, LoopNoDraw	; Relative jump to label LoopNoDraw since
Zero 				; Flag is set

Just a quick note for all you would-be 82 ASM programmers out there. Do
NOT use GET_KEY for input. It is extremely SLOW compared to the bit
manipulation...I have to use a DELAY with bit manipulation so I can move
the pixel one unit with a single key press! Not to mention, bit
manipulation allows for MULTIPLE key presses as well. If you already knew
this, I apologize for wasting your time. =)


			-Scoobie


References: