parserinterrupt.z80 536 B

123456789101112131415161718192021222324252627282930
  1. parser_interrupt:
  2. ;First check the interrupt pointer. If it is NULL, then return
  3. ld hl,(IntLoc)
  4. ld a,h \ or l
  5. ret z
  6. ex de,hl
  7. ;Decrement the counter. If it hits zero, fire the interrupt.
  8. ld hl,(IntCount)
  9. dec l
  10. jr nz,+_
  11. dec h
  12. jr nz,+_
  13. ;Need to save the current parser pointer and BC
  14. ld hl,(parsePtr)
  15. push hl
  16. ld (parsePtr),de
  17. set IntActiveFlag,(iy+InternalFlag)
  18. push bc
  19. call ParserNext
  20. pop bc
  21. pop hl
  22. ld (parsePtr),hl
  23. ld hl,(IntMax)
  24. _:
  25. ld (IntCount),hl
  26. res IntActiveFlag,(iy+InternalFlag)
  27. ret