📄 ice159.lst
字号:
1 ;R page registers setting
2 0000 R0 ==0X00;
3 0001 TCC ==0X01;
4 0002 R2 ==0X02;
5 0003 R3 ==0X03;
6 0004 R4 ==0X04;
7 0005 port5 ==0x05;
8 0006 port6 ==0x06;
9 000E RE ==0x0e;
10 000F RF ==0X0F;
11
12 ;IOC page registers setting
13 0001 CONT ==0X01;
14 0005 P5CR ==0X05;
15 0006 P6CR ==0X06;
16 000A IOCA ==0X0A;
17 000B PDCR ==0X0B;
18 000C ODCR ==0X0C;
19 000D PHCR ==0X0D;
20 000E WDTCR ==0X0E;
21 000F IOCF ==0X0F;
22
23 0010 high_value ==0x10;
24 0011 low_value ==0x11;
25 0012 high_value1 ==0x12;
26 0013 low_value1 ==0x13;
27 0014 dt1 ==0x14;
28 0015 dt2 ==0x15;
29 0016 flag ==0x16;
30 0017 temp_A ==0x17;
31 0018 temp_S ==0x18;
32
33 ;function check display byte
34 0020 port50 ==0x20;
35 0021 port51 ==0x21;
36 0022 port52 ==0x22;
37 0023 port53 ==0x23;
38 0024 port60 ==0x24;
39 0025 port61 ==0x25;
40 0026 port62 ==0x26;
41 0027 port63 ==0x27;
42 0028 port64 ==0x28;
43 0029 port65 ==0x29;
44 002A port66 ==0x2a;
45 002B port67 ==0x2b;
46 002C pulldown_buf==0x2c;
47 002D pullhigh_buf==0x2d;
48 002E tcc_buf ==0x2e;
49 002F port6_buf ==0x2f;
50 0030 int0_buf ==0x30;
51 0031 wdt_buf ==0x31;
52
53 ;I/Oport input and output display bits setting
54 0000 input0 ==0;
55 0001 input1 ==1;
56 0002 output0 ==2;
57 0003 output1 ==3;
58 0003 T ==3;
59 0004 P ==4;
60
61 ;pull-down display bits setting
62 0000 p50_down ==0;
63 0001 p51_down ==1;
64 0002 p52_down ==2;
65 0003 p53_down ==3;
66 0004 p60_down ==4;
67 0005 p61_down ==5;
68 0006 p62_down ==6;
69 0007 p63_down ==7;
70
71 ;pull-high display bits setting
72 0000 p60_high ==0;
73 0001 p61_high ==1;
74 0002 p62_high ==2;
75 0003 p63_high ==3;
76 0004 p64_high ==4;
77 0005 p65_high ==5;
78 0006 p66_high ==6;
79 0007 p67_high ==7;
80
81 ;flag bits setting
82 0000 key_flag ==0;
83 0001 key_state ==1;
84 0002 p60_flag ==2;
85 0003 key_over ==3;
86
87 org 000h
88 00000 0000 start: nop
89 00001 0000 nop
90 00002 1430 jmp main
91 00003 0000 nop
92 00004 0000 nop
93 00005 0000 nop
94 00006 0000 nop
95 00007 0000 nop
96
97
98 org 008h
99 00008 0000 nop
100 00009 16DD jmp intin
101
102 org 030h
103 00030 0000 main: nop
104 00031 0000 nop
105 00032 0000 nop
106 00033 0000 nop
107 00034 0000 nop
108 00035 0000 nop
109 00036 0000 nop
110 00037 0000 nop
111 00038 0000 nop
112 00039 0000 nop
113 0003A 0000 nop
114 0003B 0000 nop
115 0003C 0EC3 jbs r3, T
116 0003D 1449 jmp main1
117 0003E 0F03 jbs r3, P
118 0003F 1449 jmp main1
119 00040 18FF clrram: mov a, @0xff
120 00041 0044 mov r4, a
121 00042 00C0 clr r0 ;clear ram
122 00043 01C4 dec r4
123 00044 183F mov a, @0x3f
124 00045 0284 and a, r4
125 00046 1D0F sub a, @0x0f
126 00047 0E03 jbs r3, 0
127 00048 1442 jmp $-6
128 /**************************************/
129 00049 18FF main1: mov a, @0xff
130 0004A 000B iow PDCR
131 0004B 000D iow PHCR
132 0004C 0005 iow P5CR
133 0004D 0006 iow P6CR
134 0004E 1800 mov a, @0x00
135 0004F 004F mov RF, a
136 00050 000C iow ODCR
137 00051 000E iow WDTCR
138 00052 0000 nop
139 00053 0000 nop
140 /**************************************/
141 00054 180D benchmark: mov a, @0x0d ;set P51 output,others input
142 00055 0005 iow P5CR
143 00056 18FF mov a, @0xff
144 00057 0006 iow P6CR
145 00058 0A45 bs port5, 1
146 00059 1332 call delay
147 0005A 0C05 jbc port5, 0
148 0005B 0550 inc high_value
149 0005C 0845 bc port5, 1
150 0005D 1332 call delay
151 0005E 0E05 jbs port5, 0
152 0005F 0551 inc low_value
153 /**************************************/
154 00060 180B benchmark1: mov a, @0x0b ;set P52 output,others input
155 00061 0005 iow P5CR
156 00062 18FF mov a, @0xff
157 00063 0006 iow P6CR
158 00064 0A85 bs port5, 2
159 00065 1332 call delay
160 00066 0C05 jbc port5, 0
161 00067 0550 inc high_value
162 00068 0885 bc port5, 2
163 00069 1332 call delay
164 0006A 0E05 jbs port5, 0
165 0006B 0551 inc low_value
166 /**************************************/
167 0006C 1807 benchmark2: mov a, @0x07 ;set P53 output,others input
168 0006D 0005 iow P5CR
169 0006E 18FF mov a, @0xff
170 0006F 0006 iow P6CR
171 00070 0AC5 bs port5, 3
172 00071 1332 call delay
173 00072 0C05 jbc port5, 0
174 00073 0550 inc high_value
175 00074 08C5 bc port5, 3
176 00075 1332 call delay
177 00076 0E05 jbs port5, 0
178 00077 0551 inc low_value
179 /**************************************/
180 00078 180F benchmark3: mov a, @0x0f ;set P60 output,others input
181 00079 0005 iow P5CR
182 0007A 18FE mov a, @0xfe
183 0007B 0006 iow P6CR
184 0007C 0A06 bs port6, 0
185 0007D 1332 call delay
186 0007E 0C05 jbc port5, 0
187 0007F 0550 inc high_value
188 00080 0806 bc port6, 0
189 00081 1332 call delay
190 00082 0E05 jbs port5, 0
191 00083 0551 inc low_value
192 /**************************************/
193 00084 180F benchmark4: mov a, @0x0f ;set P61 output,others input
194 00085 0005 iow P5CR
195 00086 18FD mov a, @0xfd
196 00087 0006 iow P6CR
197 00088 0A46 bs port6, 1
198 00089 1332 call delay
199 0008A 0C05 jbc port5, 0
200 0008B 0550 inc high_value
201 0008C 0846 bc port6, 1
202 0008D 1332 call delay
203 0008E 0E05 jbs port5, 0
204 0008F 0551 inc low_value
205 /**************************************/
206 00090 180F benchmark5: mov a, @0x0f ;set P62 output,others input
207 00091 0005 iow P5CR
208 00092 18FB mov a, @0xfb
209 00093 0006 iow P6CR
210 00094 0A86 bs port6, 2
211 00095 1332 call delay
212 00096 0C05 jbc port5, 0
213 00097 0550 inc high_value
214 00098 0886 bc port6, 2
215 00099 1332 call delay
216 0009A 0E05 jbs port5, 0
217 0009B 0551 inc low_value
218 /**************************************/
219 0009C 180F benchmark6: mov a, @0x0f ;set P63 output,others input
220 0009D 0005 iow P5CR
221 0009E 18F7 mov a, @0xf7
222 0009F 0006 iow P6CR
223 000A0 0AC6 bs port6, 3
224 000A1 1332 call delay
225 000A2 0C05 jbc port5, 0
226 000A3 0550 inc high_value
227 000A4 08C6 bc port6, 3
228 000A5 1332 call delay
229 000A6 0E05 jbs port5, 0
230 000A7 0551 inc low_value
231 000A8 0000 nop
232 /**************************************/
233 000A9 180E benchmark7: mov a, @0x0e ;set P50 output 0,others input
234 000AA 0005 iow P5CR
235 000AB 18FF mov a, @0xff
236 000AC 0006 iow P6CR
237 000AD 0805 bc port5, 0
238 000AE 1332 call delay
239 000AF 0E45 jbs port5, 1
240 000B0 0553 inc low_value1
241 000B1 0000 nop
242 000B2 0E85 jbs port5, 2
243 000B3 0553 inc low_value1
244 000B4 0000 nop
245 000B5 0EC5 jbs port5, 3
246 000B6 0553 inc low_value1
247 000B7 0000 nop
248 /**************************************/
249 000B8 0E06 jbs port6, 0
250 000B9 0553 inc low_value1
251 000BA 0000 nop
252 000BB 0E46 jbs port6, 1
253 000BC 0553 inc low_value1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -