Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; this is my attempt for learning purposes
- ; instead, use a library like memory.asm
- pcfont
- ld hl, chrset
- ld de, $8000
- ld bc, 256 * 8
- pcfont_loop
- ldh a,[$41] ; There are only certain times you
- and 2 ; can write out scrn/tile. This
- jr nz,pcfont_loop ; loop waits for those times.
- ld a,[hl+] ;get a byte from our tiles, and increment.
- ld [de],a ;put that byte in VRAM and
- inc de ;increment.
- ld [de],a ;put that byte in VRAM and
- inc de ;increment.
- dec bc ;bc=bc-1.
- ld a,b ;if b or c != 0,
- or c ;
- jr nz,pcfont_loop ;then loop.
- ret ;done
- ; elsewhere..
- chrset:
- chr_IBMPC1 1,8
Add Comment
Please, Sign In to add comment