151 |
kaklik |
1 |
GAS LISTING /tmp/cceEDT7g.s page 1
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
1 .file "Executive.c"
|
|
|
5 |
2 .arch atmega8
|
|
|
6 |
3 __SREG__ = 0x3f
|
|
|
7 |
4 __SP_H__ = 0x3e
|
|
|
8 |
5 __SP_L__ = 0x3d
|
|
|
9 |
6 __tmp_reg__ = 0
|
|
|
10 |
7 __zero_reg__ = 1
|
|
|
11 |
8 .global __do_copy_data
|
|
|
12 |
9 .global __do_clear_bss
|
|
|
13 |
10 .stabs "/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0
|
|
|
14 |
11 .stabs "Executive.c",100,0,2,.Ltext0
|
|
|
15 |
12 .text
|
|
|
16 |
13 .Ltext0:
|
|
|
17 |
14 .stabs "gcc2_compiled.",60,0,0,0
|
|
|
18 |
15 .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
|
|
|
19 |
16 .stabs "char:t(0,2)=@s8;r(0,2);0;255;",128,0,0,0
|
|
|
20 |
17 .stabs "long int:t(0,3)=@s32;r(0,3);020000000000;017777777777;",128,0,0,0
|
|
|
21 |
18 .stabs "unsigned int:t(0,4)=r(0,4);0;0177777;",128,0,0,0
|
|
|
22 |
19 .stabs "long unsigned int:t(0,5)=@s32;r(0,5);0;037777777777;",128,0,0,0
|
|
|
23 |
20 .stabs "long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
|
|
|
24 |
21 .stabs "long long unsigned int:t(0,7)=@s64;r(0,7);0;01777777777777777777777;",128,0,0,0
|
|
|
25 |
22 .stabs "short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
|
|
|
26 |
23 .stabs "short unsigned int:t(0,9)=r(0,9);0;0177777;",128,0,0,0
|
|
|
27 |
24 .stabs "signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
|
|
|
28 |
25 .stabs "unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
|
|
|
29 |
26 .stabs "float:t(0,12)=r(0,1);4;0;",128,0,0,0
|
|
|
30 |
27 .stabs "double:t(0,13)=r(0,1);4;0;",128,0,0,0
|
|
|
31 |
28 .stabs "long double:t(0,14)=r(0,1);4;0;",128,0,0,0
|
|
|
32 |
29 .stabs "void:t(0,15)=(0,15)",128,0,0,0
|
|
|
33 |
30 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdlib.h",130,0,0,0
|
|
|
34 |
31 .stabs "/usr/lib/gcc/avr/4.1.0/include/stddef.h",130,0,0,0
|
|
|
35 |
32 .stabs "size_t:t(2,1)=(0,4)",128,0,214,0
|
|
|
36 |
33 .stabs "wchar_t:t(2,2)=(0,1)",128,0,326,0
|
|
|
37 |
34 .stabn 162,0,0,0
|
|
|
38 |
35 .stabs "div_t:t(1,1)=(1,2)=s4quot:(0,1),0,16;rem:(0,1),16,16;;",128,0,69,0
|
|
|
39 |
36 .stabs "ldiv_t:t(1,3)=(1,4)=s8quot:(0,3),0,32;rem:(0,3),32,32;;",128,0,75,0
|
|
|
40 |
37 .stabs "__compar_fn_t:t(1,5)=(1,6)=*(1,7)=f(0,1)",128,0,78,0
|
|
|
41 |
38 .stabn 162,0,0,0
|
|
|
42 |
39 .stabs "CommonDefs.h",130,0,0,0
|
|
|
43 |
40 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/interrupt.h",130,0,0,0
|
|
|
44 |
41 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/io.h",130,0,0,0
|
|
|
45 |
42 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/avr/sfr_defs.h",130,0,0,0
|
|
|
46 |
43 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/inttypes.h",130,0,0,0
|
|
|
47 |
44 .stabs "/usr/lib/gcc/avr/4.1.0/../../../../avr/include/stdint.h",130,0,0,0
|
|
|
48 |
45 .stabs "int8_t:t(8,1)=(0,10)",128,0,116,0
|
|
|
49 |
46 .stabs "uint8_t:t(8,2)=(0,11)",128,0,117,0
|
|
|
50 |
47 .stabs "int16_t:t(8,3)=(0,1)",128,0,118,0
|
|
|
51 |
48 .stabs "uint16_t:t(8,4)=(0,4)",128,0,119,0
|
|
|
52 |
49 .stabs "int32_t:t(8,5)=(0,3)",128,0,120,0
|
|
|
53 |
50 .stabs "uint32_t:t(8,6)=(0,5)",128,0,121,0
|
|
|
54 |
51 .stabs "int64_t:t(8,7)=(0,6)",128,0,122,0
|
|
|
55 |
52 .stabs "uint64_t:t(8,8)=(0,7)",128,0,123,0
|
|
|
56 |
53 .stabs "intptr_t:t(8,9)=(8,3)",128,0,135,0
|
|
|
57 |
54 .stabs "uintptr_t:t(8,10)=(8,4)",128,0,140,0
|
|
|
58 |
55 .stabs "int_least8_t:t(8,11)=(8,1)",128,0,152,0
|
|
|
59 |
56 .stabs "uint_least8_t:t(8,12)=(8,2)",128,0,157,0
|
|
|
60 |
57 .stabs "int_least16_t:t(8,13)=(8,3)",128,0,162,0
|
|
|
61 |
GAS LISTING /tmp/cceEDT7g.s page 2
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
58 .stabs "uint_least16_t:t(8,14)=(8,4)",128,0,167,0
|
|
|
65 |
59 .stabs "int_least32_t:t(8,15)=(8,5)",128,0,172,0
|
|
|
66 |
60 .stabs "uint_least32_t:t(8,16)=(8,6)",128,0,177,0
|
|
|
67 |
61 .stabs "int_least64_t:t(8,17)=(8,7)",128,0,182,0
|
|
|
68 |
62 .stabs "uint_least64_t:t(8,18)=(8,8)",128,0,187,0
|
|
|
69 |
63 .stabs "int_fast8_t:t(8,19)=(8,1)",128,0,200,0
|
|
|
70 |
64 .stabs "uint_fast8_t:t(8,20)=(8,2)",128,0,205,0
|
|
|
71 |
65 .stabs "int_fast16_t:t(8,21)=(8,3)",128,0,210,0
|
|
|
72 |
66 .stabs "uint_fast16_t:t(8,22)=(8,4)",128,0,215,0
|
|
|
73 |
67 .stabs "int_fast32_t:t(8,23)=(8,5)",128,0,220,0
|
|
|
74 |
68 .stabs "uint_fast32_t:t(8,24)=(8,6)",128,0,225,0
|
|
|
75 |
69 .stabs "int_fast64_t:t(8,25)=(8,7)",128,0,230,0
|
|
|
76 |
70 .stabs "uint_fast64_t:t(8,26)=(8,8)",128,0,235,0
|
|
|
77 |
71 .stabs "intmax_t:t(8,27)=(8,7)",128,0,249,0
|
|
|
78 |
72 .stabs "uintmax_t:t(8,28)=(8,8)",128,0,254,0
|
|
|
79 |
73 .stabn 162,0,0,0
|
|
|
80 |
74 .stabs "int_farptr_t:t(7,1)=(8,5)",128,0,76,0
|
|
|
81 |
75 .stabs "uint_farptr_t:t(7,2)=(8,6)",128,0,80,0
|
|
|
82 |
76 .stabn 162,0,0,0
|
|
|
83 |
77 .stabn 162,0,0,0
|
|
|
84 |
78 .stabn 162,0,0,0
|
|
|
85 |
79 .stabn 162,0,0,0
|
|
|
86 |
80 .stabs "bool_t:t(3,1)=(0,11)",128,0,56,0
|
|
|
87 |
81 .stabn 162,0,0,0
|
|
|
88 |
82 .stabs "CamConfig.h",130,0,0,0
|
|
|
89 |
83 .stabs "I2CInterface.h",130,0,0,0
|
|
|
90 |
84 .stabs "i2cCmd_t:t(10,1)=(10,2)=s2configReg:(0,11),0,8;data:(0,11),8,8;;",128,0,53,0
|
|
|
91 |
85 .stabn 162,0,0,0
|
|
|
92 |
86 .stabn 162,0,0,0
|
|
|
93 |
87 .stabs "Exec_writeEventFifo:F(0,15)",36,0,208,Exec_writeEventFifo
|
|
|
94 |
88 .stabs "event:P(0,11)",64,0,207,24
|
|
|
95 |
89 .global Exec_writeEventFifo
|
|
|
96 |
90 .type Exec_writeEventFifo, @function
|
|
|
97 |
91 Exec_writeEventFifo:
|
|
|
98 |
92 .stabd 46,0,0
|
|
|
99 |
1:Executive.c **** /*
|
|
|
100 |
2:Executive.c **** Copyright (C) 2004 John Orlando
|
|
|
101 |
3:Executive.c ****
|
|
|
102 |
4:Executive.c **** AVRcam: a small real-time image processing engine.
|
|
|
103 |
5:Executive.c ****
|
|
|
104 |
6:Executive.c **** This program is free software; you can redistribute it and/or
|
|
|
105 |
7:Executive.c **** modify it under the terms of the GNU General Public
|
|
|
106 |
8:Executive.c **** License as published by the Free Software Foundation; either
|
|
|
107 |
9:Executive.c **** version 2 of the License, or (at your option) any later version.
|
|
|
108 |
10:Executive.c ****
|
|
|
109 |
11:Executive.c **** This program is distributed in the hope that it will be useful,
|
|
|
110 |
12:Executive.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
111 |
13:Executive.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
112 |
14:Executive.c **** General Public License for more details.
|
|
|
113 |
15:Executive.c ****
|
|
|
114 |
16:Executive.c **** You should have received a copy of the GNU General Public
|
|
|
115 |
17:Executive.c **** License along with this program; if not, write to the Free Software
|
|
|
116 |
18:Executive.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
117 |
19:Executive.c ****
|
|
|
118 |
20:Executive.c **** For more information on the AVRcam, please contact:
|
|
|
119 |
21:Executive.c ****
|
|
|
120 |
22:Executive.c **** john@jrobot.net
|
|
|
121 |
GAS LISTING /tmp/cceEDT7g.s page 3
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
23:Executive.c ****
|
|
|
125 |
24:Executive.c **** or go to www.jrobot.net for more details regarding the system.
|
|
|
126 |
25:Executive.c **** */
|
|
|
127 |
26:Executive.c **** /***********************************************************
|
|
|
128 |
27:Executive.c **** Module Name: Executive.c
|
|
|
129 |
28:Executive.c **** Module Date: 04/12/2004
|
|
|
130 |
29:Executive.c **** Module Auth: John Orlando
|
|
|
131 |
30:Executive.c ****
|
|
|
132 |
31:Executive.c **** Description: This file is responsible for implementing a
|
|
|
133 |
32:Executive.c **** minimalist event dispatcher. It keeps track of an event
|
|
|
134 |
33:Executive.c **** fifo that waits for new events to come in, and dispatches
|
|
|
135 |
34:Executive.c **** them to any entities that care about them.
|
|
|
136 |
35:Executive.c ****
|
|
|
137 |
36:Executive.c **** Revision History:
|
|
|
138 |
37:Executive.c **** Date Rel Ver. Notes
|
|
|
139 |
38:Executive.c **** 4/10/2004 0.1 Module created
|
|
|
140 |
39:Executive.c **** 6/30/2004 1.0 Initial release for Circuit Cellar
|
|
|
141 |
40:Executive.c **** contest.
|
|
|
142 |
41:Executive.c **** 1/16/2005 1.4 Fixed issue where the interrupts weren't
|
|
|
143 |
42:Executive.c **** being turned off when the fastEventBitmask
|
|
|
144 |
43:Executive.c **** was being accessed. Also removed redundant
|
|
|
145 |
44:Executive.c **** interrupt masking when accessing the
|
|
|
146 |
45:Executive.c **** main event fifo. Also fixed issue where
|
|
|
147 |
46:Executive.c **** the main event fifo wasn't being checked
|
|
|
148 |
47:Executive.c **** for events if an event was pending in
|
|
|
149 |
48:Executive.c **** the fast event fifo.
|
|
|
150 |
49:Executive.c **** ***********************************************************/
|
|
|
151 |
50:Executive.c ****
|
|
|
152 |
51:Executive.c **** /* Includes */
|
|
|
153 |
52:Executive.c **** #include <stdlib.h>
|
|
|
154 |
53:Executive.c **** #include "CommonDefs.h"
|
|
|
155 |
54:Executive.c **** #include "Executive.h"
|
|
|
156 |
55:Executive.c **** #include "FrameMgr.h"
|
|
|
157 |
56:Executive.c **** #include "CamInterface.h"
|
|
|
158 |
57:Executive.c **** #include "UIMgr.h"
|
|
|
159 |
58:Executive.c **** #include "UartInterface.h"
|
|
|
160 |
59:Executive.c **** #include "CamConfig.h"
|
|
|
161 |
60:Executive.c **** #include "Utility.h"
|
|
|
162 |
61:Executive.c ****
|
|
|
163 |
62:Executive.c **** /* Local Variables */
|
|
|
164 |
63:Executive.c **** unsigned char Exec_eventFifo[EXEC_EVENT_FIFO_SIZE];
|
|
|
165 |
64:Executive.c **** unsigned char Exec_eventFifoHead=0;
|
|
|
166 |
65:Executive.c **** unsigned char Exec_eventFifoTail=0;
|
|
|
167 |
66:Executive.c ****
|
|
|
168 |
67:Executive.c **** /* Local Function Definitions */
|
|
|
169 |
68:Executive.c **** static unsigned char Exec_readEventFifo(void);
|
|
|
170 |
69:Executive.c ****
|
|
|
171 |
70:Executive.c **** /* Local Structures and Typedefs */
|
|
|
172 |
71:Executive.c ****
|
|
|
173 |
72:Executive.c **** /* Extern Variables */
|
|
|
174 |
73:Executive.c **** /* This bitmask holds events that need to be processed as fast as possible */
|
|
|
175 |
74:Executive.c **** unsigned char fastEventBitmask = 0x00;
|
|
|
176 |
75:Executive.c ****
|
|
|
177 |
76:Executive.c **** /* Definitions */
|
|
|
178 |
77:Executive.c **** #define IS_DATA_IN_EVENT_FIFO() (!(Exec_eventFifoHead == Exec_eventFifoTail))
|
|
|
179 |
78:Executive.c **** /***********************************************************
|
|
|
180 |
79:Executive.c **** Function Name: Exec_run
|
|
|
181 |
GAS LISTING /tmp/cceEDT7g.s page 4
|
|
|
182 |
|
|
|
183 |
|
|
|
184 |
80:Executive.c **** Function Description: This function is responsible for
|
|
|
185 |
81:Executive.c **** running the main control loop. The control loop is
|
|
|
186 |
82:Executive.c **** based on checking both the fast-event bitmask (for high
|
|
|
187 |
83:Executive.c **** priority events) and the event FIFO to determine if an
|
|
|
188 |
84:Executive.c **** event needs to be handled. The event is then dispatched
|
|
|
189 |
85:Executive.c **** to the appropriate handler.
|
|
|
190 |
86:Executive.c **** Inputs: none
|
|
|
191 |
87:Executive.c **** Outputs: none
|
|
|
192 |
88:Executive.c **** ***********************************************************/
|
|
|
193 |
89:Executive.c **** void Exec_run(void)
|
|
|
194 |
90:Executive.c **** {
|
|
|
195 |
91:Executive.c **** unsigned char eventGenerated;
|
|
|
196 |
92:Executive.c ****
|
|
|
197 |
93:Executive.c **** while(1)
|
|
|
198 |
94:Executive.c **** {
|
|
|
199 |
95:Executive.c **** if (fastEventBitmask)
|
|
|
200 |
96:Executive.c **** {
|
|
|
201 |
97:Executive.c **** /* an event needing fast processing has been received */
|
|
|
202 |
98:Executive.c **** /* a received line needs to be processed...this
|
|
|
203 |
99:Executive.c **** needs to be processed as quickly as possible */
|
|
|
204 |
100:Executive.c **** if (fastEventBitmask & FEV_ACQUIRE_LINE_COMPLETE)
|
|
|
205 |
101:Executive.c **** {
|
|
|
206 |
102:Executive.c **** DISABLE_INTS();
|
|
|
207 |
103:Executive.c **** fastEventBitmask &= ~FEV_ACQUIRE_LINE_COMPLETE;
|
|
|
208 |
104:Executive.c **** ENABLE_INTS();
|
|
|
209 |
105:Executive.c **** FrameMgr_processLine();
|
|
|
210 |
106:Executive.c ****
|
|
|
211 |
107:Executive.c **** /* also check if serial data needs to be sent
|
|
|
212 |
108:Executive.c **** out through UIMgr */
|
|
|
213 |
109:Executive.c **** UIMgr_transmitPendingData();
|
|
|
214 |
110:Executive.c ****
|
|
|
215 |
111:Executive.c **** /* we can't just call acquire line again here,
|
|
|
216 |
112:Executive.c **** since we don't know if we need to acquire another
|
|
|
217 |
113:Executive.c **** line or not (it depends on the FrameMgr to figure
|
|
|
218 |
114:Executive.c **** this out) */
|
|
|
219 |
115:Executive.c **** }
|
|
|
220 |
116:Executive.c **** if (fastEventBitmask & FEV_PROCESS_LINE_COMPLETE)
|
|
|
221 |
117:Executive.c **** {
|
|
|
222 |
118:Executive.c **** DISABLE_INTS();
|
|
|
223 |
119:Executive.c **** fastEventBitmask &= ~FEV_PROCESS_LINE_COMPLETE;
|
|
|
224 |
120:Executive.c **** ENABLE_INTS();
|
|
|
225 |
121:Executive.c **** FrameMgr_acquireLine();
|
|
|
226 |
122:Executive.c **** }
|
|
|
227 |
123:Executive.c **** }
|
|
|
228 |
124:Executive.c ****
|
|
|
229 |
125:Executive.c **** if (IS_DATA_IN_EVENT_FIFO() == TRUE)
|
|
|
230 |
126:Executive.c **** {
|
|
|
231 |
127:Executive.c **** eventGenerated = Exec_readEventFifo();
|
|
|
232 |
128:Executive.c **** switch(eventGenerated)
|
|
|
233 |
129:Executive.c **** {
|
|
|
234 |
130:Executive.c **** case (EV_DUMP_FRAME):
|
|
|
235 |
131:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
236 |
132:Executive.c **** break;
|
|
|
237 |
133:Executive.c ****
|
|
|
238 |
134:Executive.c **** case (EV_ENABLE_TRACKING):
|
|
|
239 |
135:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
240 |
136:Executive.c **** break;
|
|
|
241 |
GAS LISTING /tmp/cceEDT7g.s page 5
|
|
|
242 |
|
|
|
243 |
|
|
|
244 |
137:Executive.c ****
|
|
|
245 |
138:Executive.c **** case (EV_DISABLE_TRACKING):
|
|
|
246 |
139:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
247 |
140:Executive.c **** break;
|
|
|
248 |
141:Executive.c ****
|
|
|
249 |
142:Executive.c **** case (EV_ACQUIRE_LINE_COMPLETE):
|
|
|
250 |
143:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
251 |
144:Executive.c **** UIMgr_dispatchEvent(eventGenerated);
|
|
|
252 |
145:Executive.c **** break;
|
|
|
253 |
146:Executive.c ****
|
|
|
254 |
147:Executive.c **** case (EV_ACQUIRE_FRAME_COMPLETE):
|
|
|
255 |
148:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
256 |
149:Executive.c **** break;
|
|
|
257 |
150:Executive.c ****
|
|
|
258 |
151:Executive.c **** case (EV_PROCESS_LINE_COMPLETE):
|
|
|
259 |
152:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
260 |
153:Executive.c **** break;
|
|
|
261 |
154:Executive.c ****
|
|
|
262 |
155:Executive.c **** case (EV_PROCESS_FRAME_COMPLETE):
|
|
|
263 |
156:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
264 |
157:Executive.c **** break;
|
|
|
265 |
158:Executive.c ****
|
|
|
266 |
159:Executive.c **** case (EV_SERIAL_DATA_RECEIVED):
|
|
|
267 |
160:Executive.c **** UIMgr_dispatchEvent(eventGenerated);
|
|
|
268 |
161:Executive.c **** FrameMgr_dispatchEvent(eventGenerated);
|
|
|
269 |
162:Executive.c **** break;
|
|
|
270 |
163:Executive.c ****
|
|
|
271 |
164:Executive.c **** case (EV_SERIAL_DATA_PENDING_TX):
|
|
|
272 |
165:Executive.c **** UIMgr_dispatchEvent(eventGenerated);
|
|
|
273 |
166:Executive.c **** break;
|
|
|
274 |
167:Executive.c ****
|
|
|
275 |
168:Executive.c **** default:
|
|
|
276 |
169:Executive.c **** break;
|
|
|
277 |
170:Executive.c **** }
|
|
|
278 |
171:Executive.c **** }
|
|
|
279 |
172:Executive.c ****
|
|
|
280 |
173:Executive.c **** /* toggle the debug line */
|
|
|
281 |
174:Executive.c ****
|
|
|
282 |
175:Executive.c **** }
|
|
|
283 |
176:Executive.c **** }
|
|
|
284 |
177:Executive.c ****
|
|
|
285 |
178:Executive.c **** /***********************************************************
|
|
|
286 |
179:Executive.c **** Function Name: Exec_readEventFifo
|
|
|
287 |
180:Executive.c **** Function Description: This function is responsible for
|
|
|
288 |
181:Executive.c **** reading a single event out of the event fifo.
|
|
|
289 |
182:Executive.c **** Inputs: none
|
|
|
290 |
183:Executive.c **** Outputs: unsigned char-the data read
|
|
|
291 |
184:Executive.c **** ***********************************************************/
|
|
|
292 |
185:Executive.c **** static unsigned char Exec_readEventFifo(void)
|
|
|
293 |
186:Executive.c **** {
|
|
|
294 |
187:Executive.c **** unsigned char dataByte, tmpTail;
|
|
|
295 |
188:Executive.c ****
|
|
|
296 |
189:Executive.c **** DISABLE_INTS();
|
|
|
297 |
190:Executive.c **** /* just return the current tail from the tx fifo */
|
|
|
298 |
191:Executive.c **** dataByte = Exec_eventFifo[Exec_eventFifoTail];
|
|
|
299 |
192:Executive.c **** tmpTail = (Exec_eventFifoTail+1) & (EXEC_EVENT_FIFO_MASK);
|
|
|
300 |
193:Executive.c **** Exec_eventFifoTail = tmpTail;
|
|
|
301 |
GAS LISTING /tmp/cceEDT7g.s page 6
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
194:Executive.c **** ENABLE_INTS();
|
|
|
305 |
195:Executive.c ****
|
|
|
306 |
196:Executive.c **** return(dataByte);
|
|
|
307 |
197:Executive.c **** }
|
|
|
308 |
198:Executive.c ****
|
|
|
309 |
199:Executive.c **** /***********************************************************
|
|
|
310 |
200:Executive.c **** Function Name: Exec_writeEventFifo
|
|
|
311 |
201:Executive.c **** Function Description: This function is responsible for
|
|
|
312 |
202:Executive.c **** writing a single event to the event fifo and
|
|
|
313 |
203:Executive.c **** updating the appropriate pointers.
|
|
|
314 |
204:Executive.c **** Inputs: data - the byte to write to the Fifo
|
|
|
315 |
205:Executive.c **** Outputs: none
|
|
|
316 |
206:Executive.c **** ***********************************************************/
|
|
|
317 |
207:Executive.c **** void Exec_writeEventFifo(unsigned char event)
|
|
|
318 |
208:Executive.c **** {
|
|
|
319 |
93 .stabn 68,0,208,.LM0-Exec_writeEventFifo
|
|
|
320 |
94 .LM0:
|
|
|
321 |
95 /* prologue: frame size=0 */
|
|
|
322 |
96 /* prologue end (size=0) */
|
|
|
323 |
209:Executive.c **** unsigned char tmpHead;
|
|
|
324 |
210:Executive.c ****
|
|
|
325 |
211:Executive.c **** DISABLE_INTS();
|
|
|
326 |
97 .stabn 68,0,211,.LM1-Exec_writeEventFifo
|
|
|
327 |
98 .LM1:
|
|
|
328 |
99 /* #APP */
|
|
|
329 |
100 0000 F894 cli
|
|
|
330 |
212:Executive.c **** Exec_eventFifo[Exec_eventFifoHead] = event;
|
|
|
331 |
101 .stabn 68,0,212,.LM2-Exec_writeEventFifo
|
|
|
332 |
102 .LM2:
|
|
|
333 |
103 /* #NOAPP */
|
|
|
334 |
104 0002 9091 0000 lds r25,Exec_eventFifoHead
|
|
|
335 |
105 0006 E0E0 ldi r30,lo8(Exec_eventFifo)
|
|
|
336 |
106 0008 F0E0 ldi r31,hi8(Exec_eventFifo)
|
|
|
337 |
107 000a E90F add r30,r25
|
|
|
338 |
108 000c F11D adc r31,__zero_reg__
|
|
|
339 |
109 000e 8083 st Z,r24
|
|
|
340 |
213:Executive.c ****
|
|
|
341 |
214:Executive.c **** /* now move the head up */
|
|
|
342 |
215:Executive.c **** tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK);
|
|
|
343 |
216:Executive.c **** Exec_eventFifoHead = tmpHead;
|
|
|
344 |
110 .stabn 68,0,216,.LM3-Exec_writeEventFifo
|
|
|
345 |
111 .LM3:
|
|
|
346 |
112 0010 9F5F subi r25,lo8(-(1))
|
|
|
347 |
113 0012 9770 andi r25,lo8(7)
|
|
|
348 |
114 0014 9093 0000 sts Exec_eventFifoHead,r25
|
|
|
349 |
217:Executive.c **** ENABLE_INTS();
|
|
|
350 |
115 .stabn 68,0,217,.LM4-Exec_writeEventFifo
|
|
|
351 |
116 .LM4:
|
|
|
352 |
117 /* #APP */
|
|
|
353 |
118 0018 7894 sei
|
|
|
354 |
119 /* #NOAPP */
|
|
|
355 |
120 /* epilogue: frame size=0 */
|
|
|
356 |
121 001a 0895 ret
|
|
|
357 |
122 /* epilogue end (size=1) */
|
|
|
358 |
123 /* function Exec_writeEventFifo size 16 (15) */
|
|
|
359 |
124 .size Exec_writeEventFifo, .-Exec_writeEventFifo
|
|
|
360 |
125 .Lscope0:
|
|
|
361 |
GAS LISTING /tmp/cceEDT7g.s page 7
|
|
|
362 |
|
|
|
363 |
|
|
|
364 |
126 .stabs "",36,0,0,.Lscope0-Exec_writeEventFifo
|
|
|
365 |
127 .stabd 78,0,0
|
|
|
366 |
128 .stabs "Exec_run:F(0,15)",36,0,90,Exec_run
|
|
|
367 |
129 .global Exec_run
|
|
|
368 |
130 .type Exec_run, @function
|
|
|
369 |
131 Exec_run:
|
|
|
370 |
132 .stabd 46,0,0
|
|
|
371 |
133 .stabn 68,0,90,.LM5-Exec_run
|
|
|
372 |
134 .LM5:
|
|
|
373 |
135 /* prologue: frame size=0 */
|
|
|
374 |
136 /* prologue end (size=0) */
|
|
|
375 |
137 .L30:
|
|
|
376 |
138 .stabn 68,0,95,.LM6-Exec_run
|
|
|
377 |
139 .LM6:
|
|
|
378 |
140 001c 8091 0000 lds r24,fastEventBitmask
|
|
|
379 |
141 0020 8823 tst r24
|
|
|
380 |
142 0022 99F0 breq .L6
|
|
|
381 |
143 .stabn 68,0,100,.LM7-Exec_run
|
|
|
382 |
144 .LM7:
|
|
|
383 |
145 0024 80FF sbrs r24,0
|
|
|
384 |
146 0026 07C0 rjmp .L8
|
|
|
385 |
147 .stabn 68,0,102,.LM8-Exec_run
|
|
|
386 |
148 .LM8:
|
|
|
387 |
149 /* #APP */
|
|
|
388 |
150 0028 F894 cli
|
|
|
389 |
151 .stabn 68,0,103,.LM9-Exec_run
|
|
|
390 |
152 .LM9:
|
|
|
391 |
153 /* #NOAPP */
|
|
|
392 |
154 002a 8E7F andi r24,lo8(-2)
|
|
|
393 |
155 002c 8093 0000 sts fastEventBitmask,r24
|
|
|
394 |
156 .stabn 68,0,104,.LM10-Exec_run
|
|
|
395 |
157 .LM10:
|
|
|
396 |
158 /* #APP */
|
|
|
397 |
159 0030 7894 sei
|
|
|
398 |
160 .stabn 68,0,105,.LM11-Exec_run
|
|
|
399 |
161 .LM11:
|
|
|
400 |
162 /* #NOAPP */
|
|
|
401 |
163 0032 00D0 rcall FrameMgr_processLine
|
|
|
402 |
164 .stabn 68,0,109,.LM12-Exec_run
|
|
|
403 |
165 .LM12:
|
|
|
404 |
166 0034 00D0 rcall UIMgr_transmitPendingData
|
|
|
405 |
167 .L8:
|
|
|
406 |
168 .stabn 68,0,116,.LM13-Exec_run
|
|
|
407 |
169 .LM13:
|
|
|
408 |
170 0036 8091 0000 lds r24,fastEventBitmask
|
|
|
409 |
171 003a 81FF sbrs r24,1
|
|
|
410 |
172 003c 06C0 rjmp .L6
|
|
|
411 |
173 .stabn 68,0,118,.LM14-Exec_run
|
|
|
412 |
174 .LM14:
|
|
|
413 |
175 /* #APP */
|
|
|
414 |
176 003e F894 cli
|
|
|
415 |
177 .stabn 68,0,119,.LM15-Exec_run
|
|
|
416 |
178 .LM15:
|
|
|
417 |
179 /* #NOAPP */
|
|
|
418 |
180 0040 8D7F andi r24,lo8(-3)
|
|
|
419 |
181 0042 8093 0000 sts fastEventBitmask,r24
|
|
|
420 |
182 .stabn 68,0,120,.LM16-Exec_run
|
|
|
421 |
GAS LISTING /tmp/cceEDT7g.s page 8
|
|
|
422 |
|
|
|
423 |
|
|
|
424 |
183 .LM16:
|
|
|
425 |
184 /* #APP */
|
|
|
426 |
185 0046 7894 sei
|
|
|
427 |
186 .stabn 68,0,121,.LM17-Exec_run
|
|
|
428 |
187 .LM17:
|
|
|
429 |
188 /* #NOAPP */
|
|
|
430 |
189 0048 00D0 rcall FrameMgr_acquireLine
|
|
|
431 |
190 .L6:
|
|
|
432 |
191 .stabn 68,0,125,.LM18-Exec_run
|
|
|
433 |
192 .LM18:
|
|
|
434 |
193 004a 2091 0000 lds r18,Exec_eventFifoTail
|
|
|
435 |
194 004e 8091 0000 lds r24,Exec_eventFifoHead
|
|
|
436 |
195 0052 8217 cp r24,r18
|
|
|
437 |
196 0054 19F3 breq .L30
|
|
|
438 |
197 .LBB4:
|
|
|
439 |
198 .LBB5:
|
|
|
440 |
199 .stabn 68,0,189,.LM19-Exec_run
|
|
|
441 |
200 .LM19:
|
|
|
442 |
201 /* #APP */
|
|
|
443 |
202 0056 F894 cli
|
|
|
444 |
203 .stabn 68,0,191,.LM20-Exec_run
|
|
|
445 |
204 .LM20:
|
|
|
446 |
205 /* #NOAPP */
|
|
|
447 |
206 0058 E22F mov r30,r18
|
|
|
448 |
207 005a FF27 clr r31
|
|
|
449 |
208 005c E050 subi r30,lo8(-(Exec_eventFifo))
|
|
|
450 |
209 005e F040 sbci r31,hi8(-(Exec_eventFifo))
|
|
|
451 |
210 0060 9081 ld r25,Z
|
|
|
452 |
211 .stabn 68,0,193,.LM21-Exec_run
|
|
|
453 |
212 .LM21:
|
|
|
454 |
213 0062 822F mov r24,r18
|
|
|
455 |
214 0064 8F5F subi r24,lo8(-(1))
|
|
|
456 |
215 0066 8770 andi r24,lo8(7)
|
|
|
457 |
216 0068 8093 0000 sts Exec_eventFifoTail,r24
|
|
|
458 |
217 .stabn 68,0,194,.LM22-Exec_run
|
|
|
459 |
218 .LM22:
|
|
|
460 |
219 /* #APP */
|
|
|
461 |
220 006c 7894 sei
|
|
|
462 |
221 /* #NOAPP */
|
|
|
463 |
222 .LBE5:
|
|
|
464 |
223 .LBE4:
|
|
|
465 |
224 .stabn 68,0,128,.LM23-Exec_run
|
|
|
466 |
225 .LM23:
|
|
|
467 |
226 006e 892F mov r24,r25
|
|
|
468 |
227 0070 9927 clr r25
|
|
|
469 |
228 0072 8031 cpi r24,lo8(16)
|
|
|
470 |
229 0074 31F1 breq .L16
|
|
|
471 |
230 0076 8131 cpi r24,lo8(17)
|
|
|
472 |
231 0078 68F4 brsh .L21
|
|
|
473 |
232 007a 8230 cpi r24,lo8(2)
|
|
|
474 |
233 007c C9F0 breq .L13
|
|
|
475 |
234 007e 8330 cpi r24,lo8(3)
|
|
|
476 |
235 0080 18F4 brsh .L22
|
|
|
477 |
236 0082 8130 cpi r24,lo8(1)
|
|
|
478 |
237 0084 59F6 brne .L30
|
|
|
479 |
238 0086 2BC0 rjmp .L12
|
|
|
480 |
239 .L22:
|
|
|
481 |
GAS LISTING /tmp/cceEDT7g.s page 9
|
|
|
482 |
|
|
|
483 |
|
|
|
484 |
240 0088 8430 cpi r24,lo8(4)
|
|
|
485 |
241 008a 31F1 breq .L14
|
|
|
486 |
242 008c 8830 cpi r24,lo8(8)
|
|
|
487 |
243 008e 09F0 breq .+2
|
|
|
488 |
244 0090 C5CF rjmp .L30
|
|
|
489 |
245 0092 1FC0 rjmp .L15
|
|
|
490 |
246 .L21:
|
|
|
491 |
247 0094 8038 cpi r24,lo8(-128)
|
|
|
492 |
248 0096 79F0 breq .L18
|
|
|
493 |
249 0098 8138 cpi r24,lo8(-127)
|
|
|
494 |
250 009a 20F4 brsh .L23
|
|
|
495 |
251 009c 8032 cpi r24,lo8(32)
|
|
|
496 |
252 009e 09F0 breq .+2
|
|
|
497 |
253 00a0 BDCF rjmp .L30
|
|
|
498 |
254 00a2 14C0 rjmp .L17
|
|
|
499 |
255 .L23:
|
|
|
500 |
256 00a4 8138 cpi r24,lo8(-127)
|
|
|
501 |
257 00a6 51F0 breq .L19
|
|
|
502 |
258 00a8 8039 cpi r24,lo8(-112)
|
|
|
503 |
259 00aa 09F0 breq .+2
|
|
|
504 |
260 00ac B7CF rjmp .L30
|
|
|
505 |
261 00ae 1CC0 rjmp .L20
|
|
|
506 |
262 .L13:
|
|
|
507 |
263 .stabn 68,0,131,.LM24-Exec_run
|
|
|
508 |
264 .LM24:
|
|
|
509 |
265 00b0 82E0 ldi r24,lo8(2)
|
|
|
510 |
266 00b2 00D0 rcall FrameMgr_dispatchEvent
|
|
|
511 |
267 00b4 B3CF rjmp .L30
|
|
|
512 |
268 .L18:
|
|
|
513 |
269 .stabn 68,0,135,.LM25-Exec_run
|
|
|
514 |
270 .LM25:
|
|
|
515 |
271 00b6 80E8 ldi r24,lo8(-128)
|
|
|
516 |
272 00b8 00D0 rcall FrameMgr_dispatchEvent
|
|
|
517 |
273 00ba B0CF rjmp .L30
|
|
|
518 |
274 .L19:
|
|
|
519 |
275 .stabn 68,0,139,.LM26-Exec_run
|
|
|
520 |
276 .LM26:
|
|
|
521 |
277 00bc 81E8 ldi r24,lo8(-127)
|
|
|
522 |
278 00be 00D0 rcall FrameMgr_dispatchEvent
|
|
|
523 |
279 00c0 ADCF rjmp .L30
|
|
|
524 |
280 .L16:
|
|
|
525 |
281 .stabn 68,0,143,.LM27-Exec_run
|
|
|
526 |
282 .LM27:
|
|
|
527 |
283 00c2 80E1 ldi r24,lo8(16)
|
|
|
528 |
284 00c4 00D0 rcall FrameMgr_dispatchEvent
|
|
|
529 |
285 .stabn 68,0,144,.LM28-Exec_run
|
|
|
530 |
286 .LM28:
|
|
|
531 |
287 00c6 80E1 ldi r24,lo8(16)
|
|
|
532 |
288 00c8 00D0 rcall UIMgr_dispatchEvent
|
|
|
533 |
289 00ca A8CF rjmp .L30
|
|
|
534 |
290 .L17:
|
|
|
535 |
291 .stabn 68,0,148,.LM29-Exec_run
|
|
|
536 |
292 .LM29:
|
|
|
537 |
293 00cc 80E2 ldi r24,lo8(32)
|
|
|
538 |
294 00ce 00D0 rcall FrameMgr_dispatchEvent
|
|
|
539 |
295 00d0 A5CF rjmp .L30
|
|
|
540 |
296 .L15:
|
|
|
541 |
GAS LISTING /tmp/cceEDT7g.s page 10
|
|
|
542 |
|
|
|
543 |
|
|
|
544 |
297 .stabn 68,0,152,.LM30-Exec_run
|
|
|
545 |
298 .LM30:
|
|
|
546 |
299 00d2 88E0 ldi r24,lo8(8)
|
|
|
547 |
300 00d4 00D0 rcall FrameMgr_dispatchEvent
|
|
|
548 |
301 00d6 A2CF rjmp .L30
|
|
|
549 |
302 .L14:
|
|
|
550 |
303 .stabn 68,0,156,.LM31-Exec_run
|
|
|
551 |
304 .LM31:
|
|
|
552 |
305 00d8 84E0 ldi r24,lo8(4)
|
|
|
553 |
306 00da 00D0 rcall FrameMgr_dispatchEvent
|
|
|
554 |
307 00dc 9FCF rjmp .L30
|
|
|
555 |
308 .L12:
|
|
|
556 |
309 .stabn 68,0,160,.LM32-Exec_run
|
|
|
557 |
310 .LM32:
|
|
|
558 |
311 00de 81E0 ldi r24,lo8(1)
|
|
|
559 |
312 00e0 00D0 rcall UIMgr_dispatchEvent
|
|
|
560 |
313 .stabn 68,0,161,.LM33-Exec_run
|
|
|
561 |
314 .LM33:
|
|
|
562 |
315 00e2 81E0 ldi r24,lo8(1)
|
|
|
563 |
316 00e4 00D0 rcall FrameMgr_dispatchEvent
|
|
|
564 |
317 00e6 9ACF rjmp .L30
|
|
|
565 |
318 .L20:
|
|
|
566 |
319 .stabn 68,0,165,.LM34-Exec_run
|
|
|
567 |
320 .LM34:
|
|
|
568 |
321 00e8 80E9 ldi r24,lo8(-112)
|
|
|
569 |
322 00ea 00D0 rcall UIMgr_dispatchEvent
|
|
|
570 |
323 00ec 97CF rjmp .L30
|
|
|
571 |
324 /* epilogue: frame size=0 */
|
|
|
572 |
325 /* epilogue: noreturn */
|
|
|
573 |
326 /* epilogue end (size=0) */
|
|
|
574 |
327 /* function Exec_run size 111 (111) */
|
|
|
575 |
328 .size Exec_run, .-Exec_run
|
|
|
576 |
329 .stabs "dataByte:r(0,11)",64,0,187,25
|
|
|
577 |
330 .stabn 192,0,0,.LBB5-Exec_run
|
|
|
578 |
331 .stabn 224,0,0,.LBE5-Exec_run
|
|
|
579 |
332 .Lscope1:
|
|
|
580 |
333 .stabs "",36,0,0,.Lscope1-Exec_run
|
|
|
581 |
334 .stabd 78,0,0
|
|
|
582 |
335 .global Exec_eventFifoHead
|
|
|
583 |
336 .global Exec_eventFifoHead
|
|
|
584 |
337 .section .bss
|
|
|
585 |
338 .type Exec_eventFifoHead, @object
|
|
|
586 |
339 .size Exec_eventFifoHead, 1
|
|
|
587 |
340 Exec_eventFifoHead:
|
|
|
588 |
341 0000 00 .skip 1,0
|
|
|
589 |
342 .global Exec_eventFifoTail
|
|
|
590 |
343 .global Exec_eventFifoTail
|
|
|
591 |
344 .type Exec_eventFifoTail, @object
|
|
|
592 |
345 .size Exec_eventFifoTail, 1
|
|
|
593 |
346 Exec_eventFifoTail:
|
|
|
594 |
347 0001 00 .skip 1,0
|
|
|
595 |
348 .global fastEventBitmask
|
|
|
596 |
349 .global fastEventBitmask
|
|
|
597 |
350 .type fastEventBitmask, @object
|
|
|
598 |
351 .size fastEventBitmask, 1
|
|
|
599 |
352 fastEventBitmask:
|
|
|
600 |
353 0002 00 .skip 1,0
|
|
|
601 |
GAS LISTING /tmp/cceEDT7g.s page 11
|
|
|
602 |
|
|
|
603 |
|
|
|
604 |
354 .comm Exec_eventFifo,8,1
|
|
|
605 |
355 .stabs "fastEventBitmask:G(0,11)",32,0,74,0
|
|
|
606 |
356 .stabs "Exec_eventFifo:G(0,16)=ar(0,17)=r(0,17);0;0177777;;0;7;(0,11)",32,0,63,0
|
|
|
607 |
357 .stabs "Exec_eventFifoHead:G(0,11)",32,0,64,0
|
|
|
608 |
358 .stabs "Exec_eventFifoTail:G(0,11)",32,0,65,0
|
|
|
609 |
359 .text
|
|
|
610 |
360 .stabs "",100,0,0,.Letext0
|
|
|
611 |
361 .Letext0:
|
|
|
612 |
362 /* File "Executive.c": code 127 = 0x007f ( 126), prologues 0, epilogues 1 */
|
|
|
613 |
GAS LISTING /tmp/cceEDT7g.s page 12
|
|
|
614 |
|
|
|
615 |
|
|
|
616 |
DEFINED SYMBOLS
|
|
|
617 |
*ABS*:00000000 Executive.c
|
|
|
618 |
/tmp/cceEDT7g.s:3 *ABS*:0000003f __SREG__
|
|
|
619 |
/tmp/cceEDT7g.s:4 *ABS*:0000003e __SP_H__
|
|
|
620 |
/tmp/cceEDT7g.s:5 *ABS*:0000003d __SP_L__
|
|
|
621 |
/tmp/cceEDT7g.s:6 *ABS*:00000000 __tmp_reg__
|
|
|
622 |
/tmp/cceEDT7g.s:7 *ABS*:00000001 __zero_reg__
|
|
|
623 |
/tmp/cceEDT7g.s:91 .text:00000000 Exec_writeEventFifo
|
|
|
624 |
/tmp/cceEDT7g.s:340 .bss:00000000 Exec_eventFifoHead
|
|
|
625 |
*COM*:00000008 Exec_eventFifo
|
|
|
626 |
/tmp/cceEDT7g.s:131 .text:0000001c Exec_run
|
|
|
627 |
/tmp/cceEDT7g.s:352 .bss:00000002 fastEventBitmask
|
|
|
628 |
/tmp/cceEDT7g.s:346 .bss:00000001 Exec_eventFifoTail
|
|
|
629 |
|
|
|
630 |
UNDEFINED SYMBOLS
|
|
|
631 |
__do_copy_data
|
|
|
632 |
__do_clear_bss
|
|
|
633 |
FrameMgr_processLine
|
|
|
634 |
UIMgr_transmitPendingData
|
|
|
635 |
FrameMgr_acquireLine
|
|
|
636 |
FrameMgr_dispatchEvent
|
|
|
637 |
UIMgr_dispatchEvent
|