band16.asm 405 B

12345678910111213141516171819202122
  1. ; vim:ts=4:et:
  2. ; FASTCALL bitwise and16 version.
  3. ; result in hl
  4. ; __FASTCALL__ version (operands: A, H)
  5. ; Performs 16bit or 16bit and returns the boolean
  6. ; Input: HL, DE
  7. ; Output: HL <- HL AND DE
  8. ;
  9. __BAND16:
  10. lda z80_h ;- ld a,h
  11. sta z80_a
  12. and z80_d ;- and d
  13. lda z80_a ;- ld h,a
  14. sta z80_h
  15. lda z80_l ;- ld a,l
  16. sta z80_a
  17. and z80_e ;- and e
  18. lda z80_a ;- ld l,a
  19. sta z80_l
  20. rts ;- ret