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

SP_ATTRS = 0x1b00

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

	ld e, (hl)
	inc hl
	ld d, (hl)
	inc hl

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

	push de
	ld bc, #4
	push bc
	push hl
	call _ubox_write_vm
	pop af
	pop af
	pop af
	ret