A85: Flags with & signs
[Prev][Next][Index][Thread]
A85: Flags with & signs
  Does the & sign have any effect on flags? I don't think it would have an 
reason to, but I can't figure out why a routine like this won't work on the 
85:
	ld hl,(ENEMYHP1)
	ld de,(DUMMY1)
	and a
	sbc hl, de
	ld (ENEMYHP1),hl
	call c,&EnemyDead
  Obviously, ENEMYHP1 is the enemy hit points remaining. DUMMY1 is the 
amount to be taken away. If the HL value drops below zero, the carry flag 
should set, yes/no?
  Thoughts? Thank you for reading, as always,
   Sam
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com