Guest User

Untitled

a guest
Apr 26th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. ; this is my attempt for learning purposes
  2. ; instead, use a library like memory.asm
  3.  
  4. pcfont
  5. ld hl, chrset
  6. ld de, $8000
  7. ld bc, 256 * 8
  8. pcfont_loop
  9. ldh a,[$41] ; There are only certain times you
  10. and 2 ; can write out scrn/tile. This
  11. jr nz,pcfont_loop ; loop waits for those times.
  12.  
  13. ld a,[hl+] ;get a byte from our tiles, and increment.
  14.  
  15. ld [de],a ;put that byte in VRAM and
  16. inc de ;increment.
  17. ld [de],a ;put that byte in VRAM and
  18. inc de ;increment.
  19.  
  20.  
  21. dec bc ;bc=bc-1.
  22. ld a,b ;if b or c != 0,
  23. or c ;
  24. jr nz,pcfont_loop ;then loop.
  25. ret ;done
  26.  
  27. ; elsewhere..
  28.  
  29. chrset:
  30. chr_IBMPC1 1,8
Add Comment
Please, Sign In to add comment