sdl.s 436 B

12345678910111213141516171819202122232425262728293031
  1. .define .sdl
  2. .sect .text
  3. .sect .rom
  4. .sect .data
  5. .sect .bss
  6. .sect .text
  7. ! store double local at any offset
  8. ! parameters:
  9. ! hl: offset
  10. ! stack: operand (4 bytes)
  11. .sdl:
  12. pop ix ! return address
  13. push iy ! bc := LB
  14. pop bc
  15. add hl,bc ! pointer to lowest byte
  16. ! of local
  17. pop bc ! low 2 bytes of source
  18. ld (hl),c
  19. inc hl
  20. ld (hl),b
  21. inc hl
  22. pop bc ! high 2 bytes of source
  23. ld (hl),c
  24. inc hl
  25. ld (hl),b
  26. jp (ix) ! return