and32.asm 732 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ; FASTCALL boolean and 32 version.
  2. ; Performs 32bit and 32bit and returns the boolean
  3. ; result in Accumulator (0 False, not 0 True)
  4. ; First operand in DE,HL 2nd operand into the stack
  5. __AND32:
  6. lda z80_l ;- ld a, l
  7. sta z80_a
  8. ora z80_h ;- or h
  9. ora z80_e ;- or e
  10. ora z80_d ;- or d
  11. sec ;- sub 1
  12. sbc #1
  13. sbc z80_a ;- sbc a
  14. lda z80_a ;- ld c, a
  15. sta z80_c
  16. pla ;- pop hl
  17. sta z80_h
  18. pla
  19. sta z80_l
  20. pla ;- pop de
  21. sta z80_d
  22. pla
  23. sta z80_e
  24. lda z80_d ;- ld a, d
  25. lda z80_a
  26. ora z80_e ;- or e
  27. pla ;- pop de
  28. sta z80_d
  29. pla
  30. sta z80_e
  31. ora z80_d ;- or d
  32. ora z80_e ;- or e
  33. sec ;- sub 1
  34. sbc #1
  35. sbc z80_a ;- sbc a
  36. ora z80_c ;- or c
  37. eor #$ff ;- cpl
  38. jmp (z80_hl) ;- jp (hl)