aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_set_sprite_attr.z80
blob: ecf5952ef403add7d5d738e7d62b2724d70876de (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
.globl _ubox_set_sprite_attr
.globl _ubox_write_vm

SP_ATTRS = 0x1b00

_ubox_set_sprite_attr::
	ld e, l
	ld d, h

	ld hl, #2
	add hl, sp
	ld l, (hl)
	sla l
	sla l
	ld h, #0
	ld bc, #SP_ATTRS
	add hl, bc

	push de
	ld de, #4
	; hl: dst, de: len, stack: src
	call _ubox_write_vm

	pop hl
	inc sp
	jp (hl)