aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_put_tile.z80
blob: 24e58b2048db002b8aa6f63a1fa7146a3b8da802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.globl _ubox_put_tile

WRTVRM = 0x004d
BG_TILE_MAP = 0x1800

_ubox_put_tile::
	ld hl, #2
	add hl, sp

	ld c, (hl)
	inc hl
	ld b, (hl)
	inc hl

	ld a, (hl)

	ld h, #0
	ld l, b
	add hl, hl
	add hl, hl
	add hl, hl
	add hl, hl
	add hl, hl
	ld b, #0
	add hl, bc

	ld bc, #BG_TILE_MAP
	add hl, bc

	jp WRTVRM