Advertisement
Runer112

_memset16

Nov 22nd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. .def _memset16
  2. .assume adl=1
  3.  
  4. ; void *memset16(void *dest, int c, size_t count);
  5.  
  6. _memset16:
  7. pop iy
  8. pop de
  9. pop bc
  10. ex (sp),hl
  11. push bc
  12. push de
  13. push iy
  14. dec hl
  15. or a,a
  16. adc hl,hl
  17. ret c
  18. ex de,hl
  19. ld (hl),c
  20. inc hl
  21. ld (hl),b
  22. ret z
  23. push de
  24. pop bc
  25. push hl
  26. pop de
  27. dec hl
  28. inc de
  29. ldir
  30. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement