xor8.asm 646 B

1234567891011121314151617181920212223242526272829303132
  1. ; vim:ts=4:et:
  2. ; FASTCALL boolean xor 8 version.
  3. ; result in Accumulator (0 False, not 0 True)
  4. ; __FASTCALL__ version (operands: A, H)
  5. ; Performs 8bit xor 8bit and returns the boolean
  6. ;
  7. __XOR16:
  8. lda z80_h ;- ld a,h
  9. sta z80_a
  10. ora z80_l ;- or l
  11. lda z80_a ;- ld h,a
  12. sta z80_h
  13. lda z80_d ;- ld a,d
  14. sta z80_a
  15. ora z80_e ;- or e
  16. __XOR8:
  17. sec ;- sub 1
  18. sbc #1
  19. sec ;- sbc a,a
  20. sbc z80_a
  21. lda z80_a ;- ld l,a ;- l = 00h or FFh
  22. sta z80_l
  23. lda z80_h ;- ld a,h
  24. sta z80_a
  25. sec ;- sub 1
  26. sbc #1
  27. sec ;- sbc a,a ;- a = 00h or FFh
  28. sbc z80_a
  29. eor z80_l ;- xor l
  30. rts ;- ret