-
Notifications
You must be signed in to change notification settings - Fork 0
/
reloc-zx0.asm
54 lines (46 loc) · 1.12 KB
/
reloc-zx0.asm
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.project reloc-zx0.0100
.tape v06c-rom
;dst equ $4000
;dzx_sz equ 92
;data_sz equ 3328 + dzx_sz
ayctrl .equ $15
aydata .equ $14
.org $100
;lxi sp, data_sz
di
xra a
out $10
lxi sp, $100
lxi d, $07c7 ; noise enable on channel A
call ay_outde
lxi d, $0803 ; volume pretty low on channel A
call ay_outde
lxi d, $0905 ; volume pretty low on channel B
call ay_outde
lxi d, $0a03 ; volume pretty low on channel C
call ay_outde
lxi b, $100
push b
lxi d, src
lxi h, dst
push h ; unpacker return address = dst
loop:
ldax d
mov m, a
inx h
inx d
mov a, h
cpi ((dst + data_sz + dzx_sz) >> 8) + 1 ; дошли до края?
jnz loop
; for dzx0: bc = source, de = destination
lxi d, dst + dzx_sz
ret
ay_outde
mov a, d
out ayctrl
mov a, e
out aydata
ret
db 'SVO/2022'
src equ $
; here there lies dzx7