aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_put_tile.z80
blob: 718027d736f2198e3af129286fa6b89c3a581c22 (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 c, a
	ld b, l

	ld hl, #2
	add hl, sp
	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

	call WRTVRM

	pop hl
	inc sp
	jp (hl)