str.s 251 B

123456789101112131415161718192021222324252627
  1. .define .strhp
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. .strhp:
  8. pop ix
  9. pop hl
  10. push hl
  11. or a
  12. sbc hl,sp
  13. jp m,1f
  14. pop hl
  15. push hl
  16. ld a,l
  17. rra
  18. jp c,1f
  19. pop hl
  20. ld (.reghp),hl
  21. jp (ix)
  22. 1:
  23. pop hl
  24. ld hl,EHEAP
  25. call .trp.z
  26. jp (ix)