Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. imFastCopy:
  2.     ld a,i
  3.     push af
  4.         di
  5.         ld c,$10
  6. mmsetrow:
  7.         in a,(c)
  8.         rla ;test 7th bit
  9.         jr c,mmsetrow
  10.         ld a,$80
  11.         out ($10),a
  12.         ld hl,gbuf
  13.         ld de,12
  14.         ld a,$20
  15. mmcol:
  16.         push af ;the push and pop are wasted clocks
  17. mmcolwait: ;but this only occurs 12 times
  18.         in a,(c)
  19.         rla
  20.         jr c,mmcolwait
  21.         pop af
  22.         out ($10),a
  23.         push af
  24.         ld b,64
  25. mmrow:
  26.         in a,(c)
  27.         rla
  28.         jr c,mmrow
  29.         ld a,(hl)
  30.         out ($11),a
  31.         add hl,de
  32.         djnz mmrow
  33.         pop af
  34.         dec h
  35.         dec h
  36.         dec h
  37.         inc hl
  38.         inc a
  39.         cp $2c
  40.         jr nz,mmcol
  41.         pop af
  42.     ret po
  43. #ifdef enablecn2eis
  44.     ei
  45. #endif
  46.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement