bnot32.asm 586 B

1234567891011121314151617181920212223242526272829303132
  1. ; vim:ts=4:et:
  2. ; FASTCALL bitwise or 32 version.
  3. ; result in DE,HL
  4. ; __FASTCALL__ version (operands: A, H)
  5. ; Performs 32bit NEGATION (cpl)
  6. ; Input: DE,HL
  7. ; Output: DE,HL <- NOT DE,HL
  8. ;
  9. __BNOT32:
  10. lda z80_l ;- ld a,l
  11. sta z80_a
  12. eor #$ff ;- cpl
  13. lda z80_a ;- ld l,a
  14. sta z80_l
  15. lda z80_h ;- ld a,h
  16. sta z80_a
  17. eor #$ff ;- cpl
  18. lda z80_a ;- ld h,a
  19. sta z80_h
  20. lda z80_e ;- ld a,e
  21. sta z80_a
  22. eor #$ff ;- cpl
  23. lda z80_a ;- ld e,a
  24. sta z80_e
  25. lda z80_d ;- ld a,d
  26. sta z80_a
  27. eor #$ff ;- cpl
  28. lda z80_a ;- ld d,a
  29. sta z80_d
  30. rts ;- ret