nom.z80 777 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. dec hl \ dec hl \ dec hl
  2. ld a,(hl) \ cp 'M' \ jr nz,+_
  3. dec hl
  4. ld a,(hl) \ cp 'O' \ jr nz,+_
  5. call ParseFullArg
  6. ld a,c \ and 3
  7. add a,12
  8. out (16),a
  9. ret
  10. _:
  11. ; Save the location of the names of the variables to save.
  12. ld hl,(parsePtr)
  13. dec hl
  14. push hl
  15. ld (parsePtr),hl
  16. ; Save the stack base
  17. ld hl,(stack_ptr)
  18. push hl
  19. call pushvars_00
  20. ; Now resume parsing
  21. call ParserNext
  22. ;Restore vars!
  23. ; Restore stack pointer to the original state.
  24. pop hl
  25. ld (stack_ptr),hl
  26. ; Get the vars list
  27. ex (sp),hl
  28. ; Begin looping. If the stack overflowed, there would have been an error,
  29. ; so no need to verify
  30. _:
  31. inc hl
  32. ld a,(hl)
  33. inc hl
  34. call VarP
  35. jr nc,+_
  36. ex de,hl
  37. ex (sp),hl
  38. ldi
  39. ldi
  40. ex (sp),hl
  41. ld a,(hl)
  42. cp 2Bh
  43. jr z,-_
  44. _:
  45. pop hl
  46. ret