-
Notifications
You must be signed in to change notification settings - Fork 0
/
prchr08.asm
72 lines (68 loc) · 937 Bytes
/
prchr08.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
SECTION asm_lib
PUBLIC PRCHR08
PUBLIC INCY8
EXTERN OURPIXADD
;INCLUDE "../../z88dk-zxspectrum-equates.asm"
.PRCHR08 PUSH IX ; :dbolli:20121102 22:11:45 Added
LD B,(IX+1)
LD C,(IX+0)
LD H,(IX+5)
LD L,(IX+4)
PUSH HL
POP IX
CALL OURPIXADD ; :dbolli:20211122 14:41:16 Changed from PIXADD
PUSH AF
LD D,8
AND A
JR Z,WBOUND8
.LINE8 POP AF
PUSH AF
LD B,A
LD A,(IX+0)
LD E,0
.SCROLL8 SRL A
RR E
DJNZ SCROLL8
XOR (HL)
LD (HL),A
INC HL
LD A,E
.TWO8 XOR (HL)
LD (HL),A
DEC HL
INC IX
CALL INCY8
DEC D
JR NZ,LINE8
POP AF
POP IX
RET
.WBOUND8 LD B,D
.XBOUND8 LD A,(IX+0)
XOR (HL)
LD (HL),A
CALL INCY8
INC IX
DJNZ XBOUND8
POP AF
POP IX
RET
;
.INCY8 INC H
LD A,H
AND 7
RET NZ
LD A,H
SUB 8
LD H,A
LD A,L
ADD A,32
LD L,A
RET NC
LD A,H
ADD A,8
LD H,A
XOR 88
RET NZ
LD H,$40
RET