-
Notifications
You must be signed in to change notification settings - Fork 0
/
format2.s
136 lines (131 loc) · 1.65 KB
/
format2.s
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
;;
;; Autogenerated by format.py
;;
DWAIT .equ 0fch
DCOM .equ 0f8h
DDATA .equ 0fbh
DSTAT .equ 0f8h
DSECT .equ 0fah
mvi d, 0
loop_b_begin: ; 0 <= d < 77 - Track Counter
mvi a, 77
cmp d
jz loop_b_end
mvi a, 0xf4
out DCOM
mvi b, 0
loop_c_begin: ; 0 <= b < 46
mvi a, 46
cmp b
jz loop_c_end
in DWAIT
mvi a, 0
out DDATA
inr b
jmp loop_c_begin
loop_c_end:
in DWAIT
mvi a, 252
out DDATA
mvi b, 0
loop_d_begin: ; 0 <= b < 26
mvi a, 26
cmp b
jz loop_d_end
in DWAIT
mvi a, 0
out DDATA
inr b
jmp loop_d_begin
loop_d_end:
mvi b, 1
loop_e_begin: ; 1 <= b < 27 - Segment Counter
mvi a, 27
cmp b
jz loop_e_end
mvi c, 0
loop_f_begin: ; 0 <= c < 6
mvi a, 6
cmp c
jz loop_f_end
in DWAIT
mvi a, 0
out DDATA
inr c
jmp loop_f_begin
loop_f_end:
in DWAIT
mvi a, 254
out DDATA
in DWAIT
mov a, d
out DDATA
in DWAIT
mvi a, 0
out DDATA
in DWAIT
mov a, b
out DDATA
in DWAIT
mvi a, 0
out DDATA
in DWAIT
mvi a, 247
out DDATA
mvi c, 0
loop_g_begin: ; 0 <= c < 17
mvi a, 17
cmp c
jz loop_g_end
in DWAIT
mvi a, 0
out DDATA
inr c
jmp loop_g_begin
loop_g_end:
in DWAIT
mvi a, 251
out DDATA
mvi c, 0
loop_h_begin: ; 0 <= c < 128
mvi a, 128
cmp c
jz loop_h_end
in DWAIT
mvi a, 229
out DDATA
inr c
jmp loop_h_begin
loop_h_end:
in DWAIT
mvi a, 247
out DDATA
mvi c, 0
loop_i_begin: ; 0 <= c < 27
mvi a, 27
cmp c
jz loop_i_end
in DWAIT
mvi a, 0
out DDATA
inr c
jmp loop_i_begin
loop_i_end:
inr b
jmp loop_e_begin
loop_e_end:
end_seq_j_begin:
in DWAIT
ora a
jp end_seq_k_end
mvi a, 0
out DDATA
jmp end_seq_j_begin
end_seq_k_end:
mvi a, 0b01011100
out DCOM
IN DWAIT
inr d
jmp loop_b_begin
loop_b_end:
hlt