aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_get_tile.z80
blob: 49dcb30b2a1754c2cab0db5c5b1df0929ab2c345 (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
.globl _ubox_get_tile

RDVRM = 0x004a

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

	ld b, #0
	ld c, (hl)
	inc hl
	ld l, (hl)

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

	ld bc, #0x1800
	add hl, bc

	call RDVRM
	ld l, a
	ret