Advertisement
Guest User

Printputc v3.1

a guest
Apr 29th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Printputc
  2. ; c == character to print
  3. Printputc:
  4.     ld a, [PrintY]
  5.     ; Multiplies y coordinate by 32
  6.     swap a
  7.     rlca
  8.     ld l, a
  9.     and %00000011
  10.     ld h, a
  11.     ld a, l
  12.     and %11100000
  13.     ld l, a
  14.    
  15.     ld a, [PrintX]
  16.     ld e, a
  17.     ld d, HIGH(_SCRN0)
  18.     add hl, de
  19.  
  20.     ld [hl], c
  21.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement