ldirvm.asm 626 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. lda z80_e ;- get z80 de (address) register value from page 0, and write to vdp register
  2. sta $2006
  3. lda z80_d
  4. sta $2006
  5. ldy #$00
  6. ldx z80_b
  7. beq ldirvm_last_page
  8. ldirvm_loop:
  9. lda (z80_hl),y
  10. ;sta (z80_de),y
  11. sta $2007
  12. iny
  13. bne ldirvm_loop
  14. inc z80_h
  15. inc z80_d
  16. dex
  17. bne ldirvm_loop
  18. ldirvm_last_page:
  19. lda z80_c
  20. beq ldirvm_end
  21. ldirvm_last_page_loop:
  22. lda (z80_hl),y
  23. ;sta (z80_de),y
  24. sta $2007
  25. iny
  26. cpy z80_c
  27. bne ldirvm_last_page_loop
  28. ldirvm_end:
  29. stx z80_c
  30. stx z80_b
  31. tya
  32. clc
  33. adc z80_l
  34. sta z80_l
  35. bcc *+4
  36. inc z80_h
  37. tya
  38. clc
  39. adc z80_e
  40. sta z80_e
  41. bcc *+4
  42. inc z80_d
  43. rts