not32.asm 434 B

123456789101112131415161718
  1. ; -------------------------------------------------------------
  2. ; 32 bit logical NOT
  3. ; -------------------------------------------------------------
  4. ;
  5. __NOT32: ; A = ¬A
  6. lda z80_d ;- ld a,d
  7. sta z80_a
  8. ora z80_e ;- or e
  9. ora z80_h ;- or h
  10. ora z80_l ;- or l
  11. sec ;- sub 1 ;- Gives CARRY only if 0
  12. sbc #1
  13. sec ;- sbc a,a ;- Gives 0 if not carry, FF otherwise
  14. sbc z80_a
  15. rts ;- ret