-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw-jugo.a80
148 lines (148 loc) · 2.62 KB
/
draw-jugo.a80
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
;rutina na kresleni cary. pochazi z nejakeho jugoslavskeho casaku
;BC-ODKUD DE-KAM NAKRESLI CARU
;POCATEK VLEVO NAHORE (0,0)
module draw_jugo
DRAW LD A,D
CP 192
RET NC
LD A,B
CP 192
RET NC
CCF
RRA
SCF
RRA
AND A
RRA
XOR B
AND 248
XOR B
LD H,A
LD A,C
RLCA
RLCA
RLCA
LD L,A
AND 56
CPL
LD (LAB+1),A
XOR A
LAB SET 0,A
EX AF,AF'
LD A,L
XOR B
AND 199
XOR B
RLCA
RLCA
LD L,A
LD A,B
SUB D
LD B,0
JR NC,N1
NEG
INC B
N1 LD D,A
LD A,C
SUB E
LD C,0
JR NC,N2
NEG
INC C
N2 LD E,A
EX AF,AF'
PUSH AF
OR (HL)
LD (HL),A
POP AF
EX AF,AF'
OR D
RET Z
PUSH HL
LD A,D
CP E
JR C,POX
LD HL,LEVO
BIT 0,C
JR Z,Y1
LD HL,DESNO
Y1 LD (DIA+1),HL
LD HL,GORE
BIT 0,B
JR Z,Y2
LD HL,DOLE
Y2 LD (NAST+1),HL
LD C,D
N3 SRL C
LD HX,D
EX AF,AF'
LD B,A
POP HL
LOOP LD A,C
SUB E
LD C,A
JR NC,NAST
ADD A,D
LD C,A
DIA CALL 0
NAST CALL 0
LD A,B
OR (HL)
LD (HL),A
DEC HX
JR NZ,LOOP
RET
POX LD HL,LEVO
BIT 0,C
JR Z,X1
LD HL,DESNO
X1 LD (NAST+1),HL
LD HL,GORE
BIT 0,B
JR Z,X2
LD HL,DOLE
X2 LD (DIA+1),HL
LD C,E
LD E,D
LD D,C
JR N3
DESNO RRC B
RET NC
INC HL
RET
LEVO RLC B
RET NC
DEC HL
RET
DOLE 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
RET
GORE DEC H
LD A,H
CPL
AND 7
RET NZ
LD A,H
ADD A,8
LD H,A
LD A,L
SUB 32
LD L,A
RET NC
LD A,H
SUB 8
LD H,A
RET
endmodule