Subversion Repositories svnkaklik

Rev

Rev 151 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 151 Rev 174
Line 1... Line 1...
1
GAS LISTING /tmp/ccGIWzET.s 			page 1
1
GAS LISTING /tmp/ccKNlHA9.s 			page 1
2
 
2
 
3
 
3
 
4
   1               		.file	"UartInterface.c"
4
   1               		.file	"UartInterface.c"
5
   2               		.arch atmega8
5
   2               		.arch atmega8
6
   3               	__SREG__ = 0x3f
6
   3               	__SREG__ = 0x3f
Line 8... Line 8...
8
   5               	__SP_L__ = 0x3d
8
   5               	__SP_L__ = 0x3d
9
   6               	__tmp_reg__ = 0
9
   6               	__tmp_reg__ = 0
10
   7               	__zero_reg__ = 1
10
   7               	__zero_reg__ = 1
11
   8               		.global __do_copy_data
11
   8               		.global __do_copy_data
12
   9               		.global __do_clear_bss
12
   9               		.global __do_clear_bss
13
  10               		.stabs	"/home/kaklik/projects/roboti/istrobot/2007/ATmega8/AVRcam/",100,0,2,.Ltext0
13
  10               		.stabs	"/home/kaklik/projects/programy/Atmel_C/AVRcam/",100,0,2,.Ltext0
14
  11               		.stabs	"UartInterface.c",100,0,2,.Ltext0
14
  11               		.stabs	"UartInterface.c",100,0,2,.Ltext0
15
  12               		.text
15
  12               		.text
16
  13               	.Ltext0:
16
  13               	.Ltext0:
17
  14               		.stabs	"gcc2_compiled.",60,0,0,0
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
18
  15               		.stabs	"int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
Line 56... Line 56...
56
  53               		.stabs	"uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
56
  53               		.stabs	"uint_fast8_t:t(4,20)=(4,2)",128,0,205,0
57
  54               		.stabs	"int_fast16_t:t(4,21)=(4,3)",128,0,210,0
57
  54               		.stabs	"int_fast16_t:t(4,21)=(4,3)",128,0,210,0
58
  55               		.stabs	"uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
58
  55               		.stabs	"uint_fast16_t:t(4,22)=(4,4)",128,0,215,0
59
  56               		.stabs	"int_fast32_t:t(4,23)=(4,5)",128,0,220,0
59
  56               		.stabs	"int_fast32_t:t(4,23)=(4,5)",128,0,220,0
60
  57               		.stabs	"uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
60
  57               		.stabs	"uint_fast32_t:t(4,24)=(4,6)",128,0,225,0
61
GAS LISTING /tmp/ccGIWzET.s 			page 2
61
GAS LISTING /tmp/ccKNlHA9.s 			page 2
62
 
62
 
63
 
63
 
64
  58               		.stabs	"int_fast64_t:t(4,25)=(4,7)",128,0,230,0
64
  58               		.stabs	"int_fast64_t:t(4,25)=(4,7)",128,0,230,0
65
  59               		.stabs	"uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
65
  59               		.stabs	"uint_fast64_t:t(4,26)=(4,8)",128,0,235,0
66
  60               		.stabs	"intmax_t:t(4,27)=(4,7)",128,0,249,0
66
  60               		.stabs	"intmax_t:t(4,27)=(4,7)",128,0,249,0
Line 72... Line 72...
72
  66               		.stabn	162,0,0,0
72
  66               		.stabn	162,0,0,0
73
  67               		.stabn	162,0,0,0
73
  67               		.stabn	162,0,0,0
74
  68               		.stabs	"CommonDefs.h",130,0,0,0
74
  68               		.stabs	"CommonDefs.h",130,0,0,0
75
  69               		.stabs	"bool_t:t(5,1)=(0,11)",128,0,56,0
75
  69               		.stabs	"bool_t:t(5,1)=(0,11)",128,0,56,0
76
  70               		.stabn	162,0,0,0
76
  70               		.stabn	162,0,0,0
77
  71               		.stabs	"UartInt_init:F(0,15)",36,0,77,UartInt_init
77
  71               		.stabs	"UartInt_init:F(0,15)",36,0,76,UartInt_init
78
  72               	.global	UartInt_init
78
  72               	.global	UartInt_init
79
  73               		.type	UartInt_init, @function
79
  73               		.type	UartInt_init, @function
80
  74               	UartInt_init:
80
  74               	UartInt_init:
81
  75               		.stabd	46,0,0
81
  75               		.stabd	46,0,0
82
   1:UartInterface.c **** /*
82
   1:UartInterface.c **** /*
Line 116... Line 116...
116
  35:UartInterface.c ****     Revision History:
116
  35:UartInterface.c ****     Revision History:
117
  36:UartInterface.c ****     Date        Rel Ver.    Notes
117
  36:UartInterface.c ****     Date        Rel Ver.    Notes
118
  37:UartInterface.c ****     4/10/2004      0.1     Module created
118
  37:UartInterface.c ****     4/10/2004      0.1     Module created
119
  38:UartInterface.c ****     6/30/2004      1.0     Initial release for Circuit Cellar
119
  38:UartInterface.c ****     6/30/2004      1.0     Initial release for Circuit Cellar
120
  39:UartInterface.c ****                            contest.
120
  39:UartInterface.c ****                            contest.
121
GAS LISTING /tmp/ccGIWzET.s 			page 3
121
GAS LISTING /tmp/ccKNlHA9.s 			page 3
122
 
122
 
123
 
123
 
124
  40:UartInterface.c ****     11/15/2004     1.2     Updated UART baud rate regs so that
124
  40:UartInterface.c ****     11/15/2004     1.2     Updated UART baud rate regs so that
125
  41:UartInterface.c ****                            it runs at 115.2 kbps when the input
125
  41:UartInterface.c ****                            it runs at 115.2 kbps when the input
126
  42:UartInterface.c ****                            crystal is at 17.7 MHz (which is the
126
  42:UartInterface.c ****                            crystal is at 17.7 MHz (which is the
Line 132... Line 132...
132
  48:UartInterface.c **** ***********************************************************/
132
  48:UartInterface.c **** ***********************************************************/
133
  49:UartInterface.c **** 
133
  49:UartInterface.c **** 
134
  50:UartInterface.c **** /*	Includes */
134
  50:UartInterface.c **** /*	Includes */
135
  51:UartInterface.c **** #include <avr/io.h>
135
  51:UartInterface.c **** #include <avr/io.h>
136
  52:UartInterface.c **** #include <avr/interrupt.h>
136
  52:UartInterface.c **** #include <avr/interrupt.h>
137
  53:UartInterface.c **** #include <avr/signal.h>
-
 
138
  54:UartInterface.c **** #include "CommonDefs.h"
137
  53:UartInterface.c **** #include "CommonDefs.h"
139
  55:UartInterface.c **** #include "UartInterface.h" 
138
  54:UartInterface.c **** #include "UartInterface.h" 
140
  56:UartInterface.c **** #include "UIMgr.h"
139
  55:UartInterface.c **** #include "UIMgr.h"
141
  57:UartInterface.c **** #include "Executive.h"
140
  56:UartInterface.c **** #include "Executive.h"
142
  58:UartInterface.c **** 
141
  57:UartInterface.c **** 
143
  59:UartInterface.c **** /*  Local Variables */
142
  58:UartInterface.c **** /*  Local Variables */
144
  60:UartInterface.c **** 
143
  59:UartInterface.c **** 
145
  61:UartInterface.c **** /* 	Local Structures and Typedefs */
144
  60:UartInterface.c **** /* 	Local Structures and Typedefs */
146
  62:UartInterface.c **** 
145
  61:UartInterface.c **** 
147
  63:UartInterface.c **** /*  Extern Variables */
146
  62:UartInterface.c **** /*  Extern Variables */
148
  64:UartInterface.c **** 
147
  63:UartInterface.c **** 
149
  65:UartInterface.c **** /*  Definitions */
148
  64:UartInterface.c **** /*  Definitions */
150
  66:UartInterface.c **** 
149
  65:UartInterface.c **** 
151
  67:UartInterface.c **** /***********************************************************
150
  66:UartInterface.c **** /***********************************************************
152
  68:UartInterface.c **** 	Function Name: UartInt_init
151
  67:UartInterface.c **** 	Function Name: UartInt_init
153
  69:UartInterface.c **** 	Function Description: This function is responsible for
152
  68:UartInterface.c **** 	Function Description: This function is responsible for
154
  70:UartInterface.c **** 	initializing the UART interface on the mega8.  This 
153
  69:UartInterface.c **** 	initializing the UART interface on the mega8.  This 
155
  71:UartInterface.c **** 	interface is set to communicate at 115.2 Kbps, with an
154
  70:UartInterface.c **** 	interface is set to communicate at 115.2 Kbps, with an
156
  72:UartInterface.c **** 	8N1 protocol.
155
  71:UartInterface.c **** 	8N1 protocol.
157
  73:UartInterface.c **** 	Inputs:  none
156
  72:UartInterface.c **** 	Inputs:  none
158
  74:UartInterface.c **** 	Outputs: none
157
  73:UartInterface.c **** 	Outputs: none
159
  75:UartInterface.c **** ***********************************************************/	
158
  74:UartInterface.c **** ***********************************************************/	
160
  76:UartInterface.c **** void UartInt_init(void)
159
  75:UartInterface.c **** void UartInt_init(void)
161
  77:UartInterface.c **** {	
160
  76:UartInterface.c **** {	
162
  76               		.stabn	68,0,77,.LM0-UartInt_init
161
  76               		.stabn	68,0,76,.LM0-UartInt_init
163
  77               	.LM0:
162
  77               	.LM0:
164
  78               	/* prologue: frame size=0 */
163
  78               	/* prologue: frame size=0 */
165
  79               	/* prologue end (size=0) */
164
  79               	/* prologue end (size=0) */
166
  78:UartInterface.c **** 	/* set up the baud rate registers so the UART will operate
165
  77:UartInterface.c **** 	/* set up the baud rate registers so the UART will operate
167
  79:UartInterface.c **** 	at 115.2 Kbps */
166
  78:UartInterface.c **** 	at 115.2 Kbps */
168
  80:UartInterface.c **** 	UBRRH = 0x00;
167
  79:UartInterface.c **** 	UBRRH = 0x00;
169
  80               		.stabn	68,0,80,.LM1-UartInt_init
168
  80               		.stabn	68,0,79,.LM1-UartInt_init
170
  81               	.LM1:
169
  81               	.LM1:
171
  82 0000 10BC      		out 64-0x20,__zero_reg__
170
  82 0000 10BC      		out 64-0x20,__zero_reg__
172
  81:UartInterface.c **** 
171
  80:UartInterface.c **** 
173
  82:UartInterface.c **** #ifdef NO_CRYSTAL    
172
  81:UartInterface.c **** #ifdef NO_CRYSTAL    
174
  83:UartInterface.c ****     UBRRL = 18;  /* 18 for double clocking at 115.2 kbps */
173
  82:UartInterface.c ****     UBRRL = 18;  /* 18 for double clocking at 115.2 kbps */
175
  83               		.stabn	68,0,83,.LM2-UartInt_init
174
  83               		.stabn	68,0,82,.LM2-UartInt_init
176
  84               	.LM2:
175
  84               	.LM2:
177
  85 0002 82E1      		ldi r24,lo8(18)
176
  85 0002 82E1      		ldi r24,lo8(18)
178
  86 0004 89B9      		out 41-0x20,r24
177
  86 0004 89B9      		out 41-0x20,r24
179
  84:UartInterface.c **** #else    
178
  83:UartInterface.c **** #else    
180
  85:UartInterface.c **** 	UBRRL = 0x08;  /* for 16 MHz crystal at 115.2 kbps */
179
  84:UartInterface.c **** 	UBRRL = 0x08;  /* for 16 MHz crystal at 115.2 kbps */
-
 
180
  85:UartInterface.c **** #endif    
181
GAS LISTING /tmp/ccGIWzET.s 			page 4
181
GAS LISTING /tmp/ccKNlHA9.s 			page 4
182
 
182
 
183
 
183
 
184
  86:UartInterface.c **** #endif    
-
 
185
  87:UartInterface.c **** 	
184
  86:UartInterface.c **** 	
186
  88:UartInterface.c **** 	/* enable the tx and rx capabilities of the UART...as well 
185
  87:UartInterface.c **** 	/* enable the tx and rx capabilities of the UART...as well 
187
  89:UartInterface.c **** 		as the receive complete interrupt */
186
  88:UartInterface.c **** 		as the receive complete interrupt */
188
  90:UartInterface.c **** 	UCSRB = (1<<RXCIE)|(1<<RXEN)|(1<<TXEN);	
187
  89:UartInterface.c **** 	UCSRB = (1<<RXCIE)|(1<<RXEN)|(1<<TXEN);	
189
  87               		.stabn	68,0,90,.LM3-UartInt_init
188
  87               		.stabn	68,0,89,.LM3-UartInt_init
190
  88               	.LM3:
189
  88               	.LM3:
191
  89 0006 88E9      		ldi r24,lo8(-104)
190
  89 0006 88E9      		ldi r24,lo8(-104)
192
  90 0008 8AB9      		out 42-0x20,r24
191
  90 0008 8AB9      		out 42-0x20,r24
193
  91:UartInterface.c **** 	
192
  90:UartInterface.c **** 	
194
  92:UartInterface.c **** 	/* set up the control registers so the UART works at 8N1 */
193
  91:UartInterface.c **** 	/* set up the control registers so the UART works at 8N1 */
195
  93:UartInterface.c **** 	UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);
194
  92:UartInterface.c **** 	UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);
196
  91               		.stabn	68,0,93,.LM4-UartInt_init
195
  91               		.stabn	68,0,92,.LM4-UartInt_init
197
  92               	.LM4:
196
  92               	.LM4:
198
  93 000a 86E8      		ldi r24,lo8(-122)
197
  93 000a 86E8      		ldi r24,lo8(-122)
199
  94 000c 80BD      		out 64-0x20,r24
198
  94 000c 80BD      		out 64-0x20,r24
200
  94:UartInterface.c ****     
199
  93:UartInterface.c ****     
201
  95:UartInterface.c **** #ifdef NO_CRYSTAL     
200
  94:UartInterface.c **** #ifdef NO_CRYSTAL     
202
  96:UartInterface.c ****     /* set the baud rate to use the double-speed */
201
  95:UartInterface.c ****     /* set the baud rate to use the double-speed */
203
  97:UartInterface.c ****     UCSRA = (1<<U2X);
202
  96:UartInterface.c ****     UCSRA = (1<<U2X);
204
  95               		.stabn	68,0,97,.LM5-UartInt_init
203
  95               		.stabn	68,0,96,.LM5-UartInt_init
205
  96               	.LM5:
204
  96               	.LM5:
206
  97 000e 82E0      		ldi r24,lo8(2)
205
  97 000e 82E0      		ldi r24,lo8(2)
207
  98 0010 8BB9      		out 43-0x20,r24
206
  98 0010 8BB9      		out 43-0x20,r24
208
  99               	/* epilogue: frame size=0 */
207
  99               	/* epilogue: frame size=0 */
209
 100 0012 0895      		ret
208
 100 0012 0895      		ret
Line 211... Line 210...
211
 102               	/* function UartInt_init size 10 (9) */
210
 102               	/* function UartInt_init size 10 (9) */
212
 103               		.size	UartInt_init, .-UartInt_init
211
 103               		.size	UartInt_init, .-UartInt_init
213
 104               	.Lscope0:
212
 104               	.Lscope0:
214
 105               		.stabs	"",36,0,0,.Lscope0-UartInt_init
213
 105               		.stabs	"",36,0,0,.Lscope0-UartInt_init
215
 106               		.stabd	78,0,0
214
 106               		.stabd	78,0,0
216
 107               		.stabs	"UartInt_txByte:F(0,15)",36,0,116,UartInt_txByte
215
 107               		.stabs	"UartInt_txByte:F(0,15)",36,0,115,UartInt_txByte
217
 108               		.stabs	"txByte:P(0,11)",64,0,115,24
216
 108               		.stabs	"txByte:P(0,11)",64,0,114,24
218
 109               	.global	UartInt_txByte
217
 109               	.global	UartInt_txByte
219
 110               		.type	UartInt_txByte, @function
218
 110               		.type	UartInt_txByte, @function
220
 111               	UartInt_txByte:
219
 111               	UartInt_txByte:
221
 112               		.stabd	46,0,0
220
 112               		.stabd	46,0,0
222
  98:UartInterface.c **** #endif    
221
  97:UartInterface.c **** #endif    
223
  99:UartInterface.c **** 	
222
  98:UartInterface.c **** 	
224
 100:UartInterface.c **** }
223
  99:UartInterface.c **** }
225
 101:UartInterface.c **** 
224
 100:UartInterface.c **** 
226
 102:UartInterface.c **** /***********************************************************
225
 101:UartInterface.c **** /***********************************************************
227
 103:UartInterface.c **** 	Function Name: UartInt_txByte
226
 102:UartInterface.c **** 	Function Name: UartInt_txByte
228
 104:UartInterface.c **** 	Function Description: This function is responsible for
227
 103:UartInterface.c **** 	Function Description: This function is responsible for
229
 105:UartInterface.c **** 	transmitting a single byte on the uart.  
228
 104:UartInterface.c **** 	transmitting a single byte on the uart.  
230
 106:UartInterface.c **** 	Inputs:  txByte - the byte to send
229
 105:UartInterface.c **** 	Inputs:  txByte - the byte to send
231
 107:UartInterface.c **** 	Outputs: none
230
 106:UartInterface.c **** 	Outputs: none
232
 108:UartInterface.c **** 	NOTES: When the TX UDRE (data register empty) is set, there
231
 107:UartInterface.c **** 	NOTES: When the TX UDRE (data register empty) is set, there
233
 109:UartInterface.c **** 	is puposefully no interrupt...thus, to send a string of
232
 108:UartInterface.c **** 	is puposefully no interrupt...thus, to send a string of
234
 110:UartInterface.c **** 	data out, the calling routine needs to hold up the entire
233
 109:UartInterface.c **** 	data out, the calling routine needs to hold up the entire
235
 111:UartInterface.c **** 	application while this takes place (or just send one
234
 110:UartInterface.c **** 	application while this takes place (or just send one
236
 112:UartInterface.c **** 	byte at a time at strtegically timed intervals, like
235
 111:UartInterface.c **** 	byte at a time at strtegically timed intervals, like
237
 113:UartInterface.c **** 	the stats data is sent out :-)
236
 112:UartInterface.c **** 	the stats data is sent out :-)
238
 114:UartInterface.c **** ***********************************************************/
237
 113:UartInterface.c **** ***********************************************************/
239
 115:UartInterface.c **** void UartInt_txByte(unsigned char txByte)
238
 114:UartInterface.c **** void UartInt_txByte(unsigned char txByte)
240
 116:UartInterface.c **** {
239
 115:UartInterface.c **** {
-
 
240
 113               		.stabn	68,0,115,.LM6-UartInt_txByte
241
GAS LISTING /tmp/ccGIWzET.s 			page 5
241
GAS LISTING /tmp/ccKNlHA9.s 			page 5
242
 
242
 
243
 
243
 
244
 113               		.stabn	68,0,116,.LM6-UartInt_txByte
-
 
245
 114               	.LM6:
244
 114               	.LM6:
246
 115               	/* prologue: frame size=0 */
245
 115               	/* prologue: frame size=0 */
247
 116               	/* prologue end (size=0) */
246
 116               	/* prologue end (size=0) */
248
 117               	.L5:
247
 117               	.L5:
249
 117:UartInterface.c **** 	/* Wait for empty transmit buffer */
248
 116:UartInterface.c **** 	/* Wait for empty transmit buffer */
250
 118:UartInterface.c **** 	while ( !( UCSRA & (1<<UDRE)) );
249
 117:UartInterface.c **** 	while ( !( UCSRA & (1<<UDRE)) );
251
 118               		.stabn	68,0,118,.LM7-UartInt_txByte
250
 118               		.stabn	68,0,117,.LM7-UartInt_txByte
252
 119               	.LM7:
251
 119               	.LM7:
253
 120 0014 5D9B      		sbis 43-0x20,5
252
 120 0014 5D9B      		sbis 43-0x20,5
254
 121 0016 FECF      		rjmp .L5
253
 121 0016 FECF      		rjmp .L5
255
 119:UartInterface.c **** 	/* Put data into buffer, sends the data */
254
 118:UartInterface.c **** 	/* Put data into buffer, sends the data */
256
 120:UartInterface.c **** 	UDR = txByte;
255
 119:UartInterface.c **** 	UDR = txByte;
257
 122               		.stabn	68,0,120,.LM8-UartInt_txByte
256
 122               		.stabn	68,0,119,.LM8-UartInt_txByte
258
 123               	.LM8:
257
 123               	.LM8:
259
 124 0018 8CB9      		out 44-0x20,r24
258
 124 0018 8CB9      		out 44-0x20,r24
260
 125               	/* epilogue: frame size=0 */
259
 125               	/* epilogue: frame size=0 */
261
 126 001a 0895      		ret
260
 126 001a 0895      		ret
262
 127               	/* epilogue end (size=1) */
261
 127               	/* epilogue end (size=1) */
263
 128               	/* function UartInt_txByte size 4 (3) */
262
 128               	/* function UartInt_txByte size 4 (3) */
264
 129               		.size	UartInt_txByte, .-UartInt_txByte
263
 129               		.size	UartInt_txByte, .-UartInt_txByte
265
 130               	.Lscope1:
264
 130               	.Lscope1:
266
 131               		.stabs	"",36,0,0,.Lscope1-UartInt_txByte
265
 131               		.stabs	"",36,0,0,.Lscope1-UartInt_txByte
267
 132               		.stabd	78,0,0
266
 132               		.stabd	78,0,0
268
 133               		.stabs	"__vector_11:F(0,15)",36,0,139,__vector_11
267
 133               		.stabs	"__vector_11:F(0,15)",36,0,138,__vector_11
269
 134               	.global	__vector_11
268
 134               	.global	__vector_11
270
 135               		.type	__vector_11, @function
269
 135               		.type	__vector_11, @function
271
 136               	__vector_11:
270
 136               	__vector_11:
272
 137               		.stabd	46,0,0
271
 137               		.stabd	46,0,0
273
 121:UartInterface.c **** }
272
 120:UartInterface.c **** }
274
 122:UartInterface.c **** 
273
 121:UartInterface.c **** 
275
 123:UartInterface.c **** /***********************************************************
274
 122:UartInterface.c **** /***********************************************************
276
 124:UartInterface.c **** 	Function Name: SIG_UART_RECV ISR
275
 123:UartInterface.c **** 	Function Name: SIG_UART_RECV ISR
277
 125:UartInterface.c **** 	Function Description: This function is responsible for
276
 124:UartInterface.c **** 	Function Description: This function is responsible for
278
 126:UartInterface.c **** 	handling the interrupt caused when a data byte is 
277
 125:UartInterface.c **** 	handling the interrupt caused when a data byte is 
279
 127:UartInterface.c ****     received by the UART.
278
 126:UartInterface.c ****     received by the UART.
280
 128:UartInterface.c **** 	Inputs:  none
279
 127:UartInterface.c **** 	Inputs:  none
281
 129:UartInterface.c **** 	Outputs: none
280
 128:UartInterface.c **** 	Outputs: none
282
 130:UartInterface.c **** 	NOTES: This function was originally written in assembly,
281
 129:UartInterface.c **** 	NOTES: This function was originally written in assembly,
283
 131:UartInterface.c ****     but moved over to C when the setting of the "T" bit at
282
 130:UartInterface.c ****     but moved over to C when the setting of the "T" bit at
284
 132:UartInterface.c ****     the end of the routine was no longer necessary (this
283
 131:UartInterface.c ****     the end of the routine was no longer necessary (this
285
 133:UartInterface.c ****     theoretically allowed the AVRcam to respond to serial
284
 132:UartInterface.c ****     theoretically allowed the AVRcam to respond to serial
286
 134:UartInterface.c ****     bytes in the middle of tracking or dumping a frame.
285
 133:UartInterface.c ****     bytes in the middle of tracking or dumping a frame.
287
 135:UartInterface.c ****     But it wasn't really needed, and understanding the C
286
 134:UartInterface.c ****     But it wasn't really needed, and understanding the C
288
 136:UartInterface.c ****     is easier  :-)
287
 135:UartInterface.c ****     is easier  :-)
289
 137:UartInterface.c **** ***********************************************************/
288
 136:UartInterface.c **** ***********************************************************/
290
 138:UartInterface.c **** SIGNAL(SIG_UART_RECV)
289
 137:UartInterface.c **** SIGNAL(SIG_UART_RECV)
291
 139:UartInterface.c **** {
290
 138:UartInterface.c **** {
292
 138               		.stabn	68,0,139,.LM9-__vector_11
291
 138               		.stabn	68,0,138,.LM9-__vector_11
293
 139               	.LM9:
292
 139               	.LM9:
294
 140               	/* prologue: frame size=0 */
293
 140               	/* prologue: frame size=0 */
295
 141 001c 1F92      		push __zero_reg__
294
 141 001c 1F92      		push __zero_reg__
296
 142 001e 0F92      		push __tmp_reg__
295
 142 001e 0F92      		push __tmp_reg__
297
 143 0020 0FB6      		in __tmp_reg__,__SREG__
296
 143 0020 0FB6      		in __tmp_reg__,__SREG__
298
 144 0022 0F92      		push __tmp_reg__
297
 144 0022 0F92      		push __tmp_reg__
299
 145 0024 1124      		clr __zero_reg__
298
 145 0024 1124      		clr __zero_reg__
300
 146 0026 8F93      		push r24
299
 146 0026 8F93      		push r24
-
 
300
 147 0028 9F93      		push r25
301
GAS LISTING /tmp/ccGIWzET.s 			page 6
301
GAS LISTING /tmp/ccKNlHA9.s 			page 6
302
 
302
 
303
 
303
 
304
 147 0028 9F93      		push r25
-
 
305
 148 002a EF93      		push r30
304
 148 002a EF93      		push r30
306
 149 002c FF93      		push r31
305
 149 002c FF93      		push r31
307
 150               	/* prologue end (size=9) */
306
 150               	/* prologue end (size=9) */
308
 140:UartInterface.c ****     unsigned char tmpHead;
307
 139:UartInterface.c ****     unsigned char tmpHead;
309
 141:UartInterface.c ****     /* read the data byte, put it in the serial queue, and
308
 140:UartInterface.c ****     /* read the data byte, put it in the serial queue, and
310
 142:UartInterface.c ****     post the event */
309
 141:UartInterface.c ****     post the event */
311
 143:UartInterface.c ****  
310
 142:UartInterface.c ****  
312
 144:UartInterface.c ****     UIMgr_rxFifo[UIMgr_rxFifoHead] = UDR;
311
 143:UartInterface.c ****     UIMgr_rxFifo[UIMgr_rxFifoHead] = UDR;
313
 151               		.stabn	68,0,144,.LM10-__vector_11
312
 151               		.stabn	68,0,143,.LM10-__vector_11
314
 152               	.LM10:
313
 152               	.LM10:
315
 153 002e 8091 0000 		lds r24,UIMgr_rxFifoHead
314
 153 002e 8091 0000 		lds r24,UIMgr_rxFifoHead
316
 154 0032 9CB1      		in r25,44-0x20
315
 154 0032 9CB1      		in r25,44-0x20
317
 155 0034 E0E0      		ldi r30,lo8(UIMgr_rxFifo)
316
 155 0034 E0E0      		ldi r30,lo8(UIMgr_rxFifo)
318
 156 0036 F0E0      		ldi r31,hi8(UIMgr_rxFifo)
317
 156 0036 F0E0      		ldi r31,hi8(UIMgr_rxFifo)
319
 157 0038 E80F      		add r30,r24
318
 157 0038 E80F      		add r30,r24
320
 158 003a F11D      		adc r31,__zero_reg__
319
 158 003a F11D      		adc r31,__zero_reg__
321
 159 003c 9083      		st Z,r25
320
 159 003c 9083      		st Z,r25
322
 145:UartInterface.c **** 
321
 144:UartInterface.c **** 
323
 146:UartInterface.c ****     /* now move the head up */
322
 145:UartInterface.c ****     /* now move the head up */
324
 147:UartInterface.c ****     tmpHead = (UIMgr_rxFifoHead + 1) & (UI_MGR_RX_FIFO_MASK);
323
 146:UartInterface.c ****     tmpHead = (UIMgr_rxFifoHead + 1) & (UI_MGR_RX_FIFO_MASK);
325
 148:UartInterface.c ****     UIMgr_rxFifoHead = tmpHead;
324
 147:UartInterface.c ****     UIMgr_rxFifoHead = tmpHead;
326
 160               		.stabn	68,0,148,.LM11-__vector_11
325
 160               		.stabn	68,0,147,.LM11-__vector_11
327
 161               	.LM11:
326
 161               	.LM11:
328
 162 003e 8F5F      		subi r24,lo8(-(1))
327
 162 003e 8F5F      		subi r24,lo8(-(1))
329
 163 0040 8F71      		andi r24,lo8(31)
328
 163 0040 8F71      		andi r24,lo8(31)
330
 164 0042 8093 0000 		sts UIMgr_rxFifoHead,r24
329
 164 0042 8093 0000 		sts UIMgr_rxFifoHead,r24
331
 149:UartInterface.c ****     
330
 148:UartInterface.c ****     
332
 150:UartInterface.c ****     /* write the serial received event to the event fifo */
331
 149:UartInterface.c ****     /* write the serial received event to the event fifo */
333
 151:UartInterface.c ****     Exec_eventFifo[Exec_eventFifoHead] = EV_SERIAL_DATA_RECEIVED;
332
 150:UartInterface.c ****     Exec_eventFifo[Exec_eventFifoHead] = EV_SERIAL_DATA_RECEIVED;
334
 165               		.stabn	68,0,151,.LM12-__vector_11
333
 165               		.stabn	68,0,150,.LM12-__vector_11
335
 166               	.LM12:
334
 166               	.LM12:
336
 167 0046 8091 0000 		lds r24,Exec_eventFifoHead
335
 167 0046 8091 0000 		lds r24,Exec_eventFifoHead
337
 168 004a E0E0      		ldi r30,lo8(Exec_eventFifo)
336
 168 004a E0E0      		ldi r30,lo8(Exec_eventFifo)
338
 169 004c F0E0      		ldi r31,hi8(Exec_eventFifo)
337
 169 004c F0E0      		ldi r31,hi8(Exec_eventFifo)
339
 170 004e E80F      		add r30,r24
338
 170 004e E80F      		add r30,r24
340
 171 0050 F11D      		adc r31,__zero_reg__
339
 171 0050 F11D      		adc r31,__zero_reg__
341
 172 0052 91E0      		ldi r25,lo8(1)
340
 172 0052 91E0      		ldi r25,lo8(1)
342
 173 0054 9083      		st Z,r25
341
 173 0054 9083      		st Z,r25
343
 152:UartInterface.c **** 
342
 151:UartInterface.c **** 
344
 153:UartInterface.c ****     /* now move the head up */
343
 152:UartInterface.c ****     /* now move the head up */
345
 154:UartInterface.c ****     tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK);
344
 153:UartInterface.c ****     tmpHead = (Exec_eventFifoHead + 1) & (EXEC_EVENT_FIFO_MASK);
346
 155:UartInterface.c ****     Exec_eventFifoHead = tmpHead;
345
 154:UartInterface.c ****     Exec_eventFifoHead = tmpHead;
347
 174               		.stabn	68,0,155,.LM13-__vector_11
346
 174               		.stabn	68,0,154,.LM13-__vector_11
348
 175               	.LM13:
347
 175               	.LM13:
349
 176 0056 8F5F      		subi r24,lo8(-(1))
348
 176 0056 8F5F      		subi r24,lo8(-(1))
350
 177 0058 8770      		andi r24,lo8(7)
349
 177 0058 8770      		andi r24,lo8(7)
351
 178 005a 8093 0000 		sts Exec_eventFifoHead,r24
350
 178 005a 8093 0000 		sts Exec_eventFifoHead,r24
352
 179               	/* epilogue: frame size=0 */
351
 179               	/* epilogue: frame size=0 */
Line 356... Line 355...
356
 183 0064 8F91      		pop r24
355
 183 0064 8F91      		pop r24
357
 184 0066 0F90      		pop __tmp_reg__
356
 184 0066 0F90      		pop __tmp_reg__
358
 185 0068 0FBE      		out __SREG__,__tmp_reg__
357
 185 0068 0FBE      		out __SREG__,__tmp_reg__
359
 186 006a 0F90      		pop __tmp_reg__
358
 186 006a 0F90      		pop __tmp_reg__
360
 187 006c 1F90      		pop __zero_reg__
359
 187 006c 1F90      		pop __zero_reg__
-
 
360
 188 006e 1895      		reti
361
GAS LISTING /tmp/ccGIWzET.s 			page 7
361
GAS LISTING /tmp/ccKNlHA9.s 			page 7
362
 
362
 
363
 
363
 
364
 188 006e 1895      		reti
-
 
365
 189               	/* epilogue end (size=9) */
364
 189               	/* epilogue end (size=9) */
366
 190               	/* function __vector_11 size 42 (24) */
365
 190               	/* function __vector_11 size 42 (24) */
367
 191               		.size	__vector_11, .-__vector_11
366
 191               		.size	__vector_11, .-__vector_11
368
 192               	.Lscope2:
367
 192               	.Lscope2:
369
 193               		.stabs	"",36,0,0,.Lscope2-__vector_11
368
 193               		.stabs	"",36,0,0,.Lscope2-__vector_11
370
 194               		.stabd	78,0,0
369
 194               		.stabd	78,0,0
371
 195               		.stabs	"",100,0,0,.Letext0
370
 195               		.stabs	"",100,0,0,.Letext0
372
 196               	.Letext0:
371
 196               	.Letext0:
373
 197               	/* File "UartInterface.c": code   56 = 0x0038 (  36), prologues   9, epilogues  11 */
372
 197               	/* File "UartInterface.c": code   56 = 0x0038 (  36), prologues   9, epilogues  11 */
374
GAS LISTING /tmp/ccGIWzET.s 			page 8
373
GAS LISTING /tmp/ccKNlHA9.s 			page 8
375
 
374
 
376
 
375
 
377
DEFINED SYMBOLS
376
DEFINED SYMBOLS
378
                            *ABS*:00000000 UartInterface.c
377
                            *ABS*:00000000 UartInterface.c
379
     /tmp/ccGIWzET.s:3      *ABS*:0000003f __SREG__
378
     /tmp/ccKNlHA9.s:3      *ABS*:0000003f __SREG__
380
     /tmp/ccGIWzET.s:4      *ABS*:0000003e __SP_H__
379
     /tmp/ccKNlHA9.s:4      *ABS*:0000003e __SP_H__
381
     /tmp/ccGIWzET.s:5      *ABS*:0000003d __SP_L__
380
     /tmp/ccKNlHA9.s:5      *ABS*:0000003d __SP_L__
382
     /tmp/ccGIWzET.s:6      *ABS*:00000000 __tmp_reg__
381
     /tmp/ccKNlHA9.s:6      *ABS*:00000000 __tmp_reg__
383
     /tmp/ccGIWzET.s:7      *ABS*:00000001 __zero_reg__
382
     /tmp/ccKNlHA9.s:7      *ABS*:00000001 __zero_reg__
384
     /tmp/ccGIWzET.s:74     .text:00000000 UartInt_init
383
     /tmp/ccKNlHA9.s:74     .text:00000000 UartInt_init
385
     /tmp/ccGIWzET.s:111    .text:00000014 UartInt_txByte
384
     /tmp/ccKNlHA9.s:111    .text:00000014 UartInt_txByte
386
     /tmp/ccGIWzET.s:136    .text:0000001c __vector_11
385
     /tmp/ccKNlHA9.s:136    .text:0000001c __vector_11
387
 
386
 
388
UNDEFINED SYMBOLS
387
UNDEFINED SYMBOLS
389
__do_copy_data
388
__do_copy_data
390
__do_clear_bss
389
__do_clear_bss
391
UIMgr_rxFifoHead
390
UIMgr_rxFifoHead