aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_write_vm.z80
blob: 0daa7cc2b0a65b37e4dcb0fee38d80b62d2af73e (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
.globl _ubox_write_vm

LDIRVM = 0x005c

_ubox_write_vm::
	ex de, hl
	; dst -> de
	; len -> hl
	ld c, l
	ld b, h
	; len -> bc

	ld hl, #2
	add hl, sp
	ld a, (hl)
	inc hl
	ld h, (hl)
	ld l, a
	; src -> hl

	call LDIRVM

	pop hl
	pop af
	jp (hl)