⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 consol.lst

📁 一个机器人开发的相关嵌入式开发源码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 134:consol.c      ****     case 'd':
 135:consol.c      ****       ul = lflag ? va_arg(ap, long) : va_arg(ap, unsigned int);
 190              		.loc 1 135 0 191 015c 004095E5 		ldr	r4, [r5, #0] 192              	.LVL28: 136:consol.c      ****       if ((long)ul < 0)
 193              		.loc 1 136 0 194 0160 000054E3 		cmp	r4, #0 195 0164 045085E2 		add	r5, r5, #4 196 0168 5D0000AA 		bge	.L39 137:consol.c      ****       {
 138:consol.c      ****         outputFnk('-');
ARM GAS  /cygdrive/c/DOCUME~1/HOWARD~1/LOCALS~1/Temp/ccwlrNcM.s 			page 7 197              		.loc 1 138 0 198 016c 2D00A0E3 		mov	r0, #45 199              	.LVL29: 200 0170 0FE0A0E1 		mov	lr, pc 201 0174 16FF2FE1 		bx	r6 202              	.LVL30: 139:consol.c      ****         ul = -(long)ul;
 203              		.loc 1 139 0 204 0178 004064E2 		rsb	r4, r4, #0 205              	.LVL31: 206              	.L39: 140:consol.c      ****       }
 141:consol.c      ****       printNum(outputFnk, ul, 10);
 207              		.loc 1 141 0 208 017c 0410A0E1 		mov	r1, r4 209 0180 0600A0E1 		mov	r0, r6 210              	.LVL32: 211 0184 0A20A0E3 		mov	r2, #10 212              	.LVL33: 213 0188 FEFFFFEB 		bl	printNum 214              	.LVL34: 215 018c 280000EA 		b	.L57 216              	.LVL35: 217              	.L26: 218              	.LVL36: 142:consol.c      ****       break;
 143:consol.c      **** 
 144:consol.c      ****     case 'o':
 145:consol.c      ****       ul = va_arg(ap, unsigned int);
 146:consol.c      ****       printNum(outputFnk, ul, 8);
 219              		.loc 1 146 0 220 0190 001095E5 		ldr	r1, [r5, #0] 221 0194 0600A0E1 		mov	r0, r6 222              	.LVL37: 223 0198 0820A0E3 		mov	r2, #8 224              	.LVL38: 225 019c 730000EA 		b	.L56 226              	.LVL39: 227              	.L29: 228              	.LVL40: 147:consol.c      ****       break;
 148:consol.c      **** 
 149:consol.c      ****     case 'u':
 150:consol.c      ****       ul = va_arg(ap, unsigned int);
 151:consol.c      ****       printNum(outputFnk, ul, 10);
 229              		.loc 1 151 0 230 01a0 001095E5 		ldr	r1, [r5, #0] 231 01a4 0600A0E1 		mov	r0, r6 232              	.LVL41: 233 01a8 0A20A0E3 		mov	r2, #10 234              	.LVL42: 235 01ac 730000EA 		b	.L56 236              	.LVL43: 237              	.L27: 152:consol.c      ****       break;
 153:consol.c      **** 
 154:consol.c      ****     case 'p':
ARM GAS  /cygdrive/c/DOCUME~1/HOWARD~1/LOCALS~1/Temp/ccwlrNcM.s 			page 8 155:consol.c      ****       outputFnk('0');
 238              		.loc 1 155 0 239 01b0 3000A0E3 		mov	r0, #48 240              	.LVL44: 241 01b4 0FE0A0E1 		mov	lr, pc 242 01b8 16FF2FE1 		bx	r6 243              	.LVL45: 156:consol.c      ****       outputFnk('x');
 244              		.loc 1 156 0 245 01bc 7800A0E3 		mov	r0, #120 246 01c0 0FE0A0E1 		mov	lr, pc 247 01c4 16FF2FE1 		bx	r6 248              	.LVL46: 249              	.L30: 250              	.LVL47: 157:consol.c      ****       lflag = 1;
 158:consol.c      ****       // fall through
 159:consol.c      **** 
 160:consol.c      ****     case 'x':
 161:consol.c      ****       ul = va_arg(ap, unsigned int);
 162:consol.c      ****       printNum(outputFnk, ul, 16);
 251              		.loc 1 162 0 252 01c8 001095E5 		ldr	r1, [r5, #0] 253 01cc 0600A0E1 		mov	r0, r6 254              	.LVL48: 255 01d0 1020A0E3 		mov	r2, #16 256              	.LVL49: 257              	.L56: 258 01d4 FEFFFFEB 		bl	printNum 259              	.LVL50: 260              	.L55: 261              		.loc 1 161 0 262 01d8 043085E2 		add	r3, r5, #4 263              	.LVL51: 264              		.loc 1 162 0 265 01dc 0350A0E1 		mov	r5, r3 266 01e0 280000EA 		b	.L57 267              	.LVL52: 268              	.L22: 163:consol.c      ****       break;
 164:consol.c      **** 
 165:consol.c      ****     default:
 166:consol.c      **** //      outputFnk('%');
 167:consol.c      ****       if (lflag)
 269              		.loc 1 167 0 270 01e4 000053E3 		cmp	r3, #0 168:consol.c      ****         outputFnk('l');
 271              		.loc 1 168 0 272 01e8 6C00A013 		movne	r0, #108 273              	.LVL53: 274 01ec 0FE0A011 		movne	lr, pc 275 01f0 16FF2F11 		bxne	r6 276              	.LVL54: 277              	.L41: 169:consol.c      ****       outputFnk(ch);
 278              		.loc 1 169 0 279 01f4 0400A0E1 		mov	r0, r4ARM GAS  /cygdrive/c/DOCUME~1/HOWARD~1/LOCALS~1/Temp/ccwlrNcM.s 			page 9 280              	.LVL55: 281 01f8 260000EA 		b	.L54 282              	.LVL56: 283              	.L43: 170:consol.c      ****     }
 171:consol.c      ****   }
 172:consol.c      ****   va_end(ap);
 173:consol.c      **** }
 284              		.loc 1 173 0 285 01fc F040BDE8 		ldmfd	sp!, {r4, r5, r6, r7, lr} 286 0200 1EFF2FE1 		bx	lr 287              	.LFE3: 288              		.size	simplePrint, .-simplePrint 289              		.align	2 290              		.global	consolInit 291              		.type	consolInit, %function 292              	consolInit: 293              	.LFB4: 174:consol.c      **** #endif
 175:consol.c      **** 
 176:consol.c      **** /******************************************************************************
 177:consol.c      ****  * Implementation of public functions
 178:consol.c      ****  *****************************************************************************/
 179:consol.c      **** 
 180:consol.c      **** 
 181:consol.c      **** /*****************************************************************************
 182:consol.c      ****  *
 183:consol.c      ****  * Description:
 184:consol.c      ****  *    Initializes the consol channel (init UART, including setting bitrate and 
 185:consol.c      ****  *    GPIO). 
 186:consol.c      ****  *
 187:consol.c      ****  ****************************************************************************/
 188:consol.c      **** void
 189:consol.c      **** consolInit(void)
 190:consol.c      **** {
 294              		.loc 1 190 0 295              		@ Function supports interworking. 296              		@ args = 0, pretend = 0, frame = 0 297              		@ frame_needed = 0, uses_anonymous_args = 0 298              		@ link register save eliminated. 299              	.LVL57: 191:consol.c      **** #if (CONSOL_UART == 0)
 192:consol.c      ****   //enable uart #0 pins in GPIO (P0.0 = TxD0, P0.1 = RxD0)
 193:consol.c      ****   PINSEL0 = (PINSEL0 & 0xfffffff0) | 0x00000005;
 300              		.loc 1 193 0 301 0204 4C209FE5 		ldr	r2, .L61 302 0208 003092E5 		ldr	r3, [r2, #0] 303 020c 0F30C3E3 		bic	r3, r3, #15 194:consol.c      **** #else
 195:consol.c      ****   //enable uart #1 pins in GPIO (P0.8 = TxD1, P9.1 = RxD1)
 196:consol.c      ****   PINSEL0 = (PINSEL0 & 0xfff0ffff) | 0x00050000;
 197:consol.c      **** #endif
 198:consol.c      **** 
 199:consol.c      ****   //initialize bitrate (by first enable DL registers, DLAB-bit = 1)
 200:consol.c      ****   UART_LCR = 0x80;
 304              		.loc 1 200 0 305 0210 44009FE5 		ldr	r0, .L61+4ARM GAS  /cygdrive/c/DOCUME~1/HOWARD~1/LOCALS~1/Temp/ccwlrNcM.s 			page 10 306              		.loc 1 193 0 307 0214 053083E3 		orr	r3, r3, #5 308 0218 003082E5 		str	r3, [r2, #0] 309              		.loc 1 200 0 310 021c 8030A0E3 		mov	r3, #128 311 0220 003080E5 		str	r3, [r0, #0] 201:consol.c      ****   UART_DLL = (unsigned char)(UART_DLL_VALUE & 0x00ff);
 312              		.loc 1 201 0 313 0224 34309FE5 		ldr	r3, .L61+8 202:consol.c      ****   UART_DLM = (unsigned char)(UART_DLL_VALUE>>8);
 314              		.loc 1 202 0 315 0228 34C09FE5 		ldr	ip, .L61+12 316              		.loc 1 201 0 317 022c 0820A0E3 		mov	r2, #8 318 0230 002083E5 		str	r2, [r3, #0] 319              		.loc 1 202 0 320 0234 0010A0E3 		mov	r1, #0 203:consol.c      ****   UART_LCR = 0x00;
 204:consol.c      **** 
 205:consol.c      ****   //initialize LCR: 8N1
 206:consol.c      ****   UART_LCR = 0x03;
 321              		.loc 1 206 0 322 0238 0330A0E3 		mov	r3, #3 323              		.loc 1 202 0 324 023c 00108CE5 		str	r1, [ip, #0] 325              		.loc 1 203 0 326 0240 001080E5 		str	r1, [r0, #0] 327              		.loc 1 206 0 328 0244 003080E5 		str	r3, [r0, #0] 207:consol.c      **** 
 208:consol.c      ****   //reset FIFO
 209:consol.c      ****   UART_FCR = 0x00;
 329              		.loc 1 209 0 330 0248 18309FE5 		ldr	r3, .L61+16 331              		.loc 1 190 0 332              		@ lr needed for prologue 333              		.loc 1 209 0 334 024c 001083E5 		str	r1, [r3, #0] 210:consol.c      **** 
 211:consol.c      ****   //clear interrupt bits
 212:consol.c      ****   UART_IER = 0x00;
 335              		.loc 1 212 0 336 0250 00108CE5 		str	r1, [ip, #0] 213:consol.c      **** }
 337              		.loc 1 213 0 338 0254 1EFF2FE1 		bx	lr 339              	.L62: 340              		.align	2 341              	.L61: 342 0258 00C002E0 		.word	-536690688 343 025c 0CC000E0 		.word	-536821748 344 0260 00C000E0 		.word	-536821760 345 0264 04C000E0 		.word	-536821756 346 0268 08C000E0 		.word	-536821752 347              	.LFE4: 348              		.size	consolInit, .-consolInit 349              		.align	2ARM GAS  /cygdrive/c/DOCUME~1/HOWARD~1/LOCALS~1/Temp/ccwlrNcM.s 			page 11 350              		.global	consolSendChar 351              		.type	consolSendChar, %function 352              	consolSendChar: 353              	.LFB5: 214:consol.c      **** 
 215:consol.c      **** /*****************************************************************************
 216:consol.c      ****  *
 217:consol.c      ****  * Description:
 218:consol.c      ****  *    Blocking consol output routine, i.e., the routine waits until the uart 
 219:consol.c      ****  *    buffer is free and then sends the character. 
 220:consol.c      ****  *
 221:consol.c      ****  * Params:
 222:consol.c      ****  *    [in] charToSend - The character to print (to the consol) 
 223:consol.c      ****  *
 224:consol.c      ****  ****************************************************************************/
 225:consol.c      **** void
 226:consol.c      **** consolSendChar(char charToSend)
 227:consol.c      **** {
 354              		.loc 1 227 0 355              		@ Function supports interworking. 356              		@ args = 0, pretend = 0, frame = 0 357              		@ frame_needed = 0, uses_anonymous_args = 0 358              		@ link register save eliminated. 359              	.LVL58: 360              		@ lr needed for prologue 361 026c FF0000E2 		and	r0, r0, #255 362              	.L65: 228:consol.c      ****   //Wait until THR is empty
 229:consol.c      ****   while(!(UART_LSR & 0x20))
 363              		.loc 1 229 0 364 0270 14309FE5 		ldr	r3, .L70 365 0274 003093E5 		ldr	r3, [r3, #0] 366 0278 200013E3 		tst	r3, #32 367 027c 9A00000A 		beq	.L65 230:consol.c      ****     ;
 231:consol.c      ****   UART_THR = charToSend;
 368              		.loc 1 231 0 369 0280 08309FE5 		ldr	r3, .L70+4 370 0284 000083E5 		str	r0, [r3, #0] 232:consol.c      **** }
 371              		.loc 1 232 0 372 0288 1EFF2FE1 		bx	lr 373              	.L71: 374              		.align	2 375              	.L70: 376 028c 14C000E0 		.word	-536821740 377 0290 00C000E0 		.word	-536821760 378              	.LFE5: 379              		.size	consolSendChar, .-consolSendChar 380              		.align	2 381              		.global	consolSendCh 382              		.type	consolSendCh, %function 383              	consolSendCh: 384              	.LFB6: 233:consol.c      **** 
 234:consol.c      **** /*****************************************************************************
 235:consol.c      ****  *
ARM GAS  /cygdrive/c/DOCUME~1/HOWARD~1/LOCALS~1/Temp/ccwlrNcM.s 			page 12 236:consol.c      ****  * Description:
 237:consol.c      ****  *    Consol output routine that adds extra line feeds at line breaks. 
 238:consol.c      ****  *
 239:consol.c      ****  * Params:
 240:consol.c      ****  *    [in] charToSend - The character to print (to the consol) 
 241:consol.c      ****  *
 242:consol.c      ****  ****************************************************************************/
 243:consol.c      **** void
 244:consol.c      **** consolSendCh(char charToSend)
 245:consol.c      **** {
 385              		.loc 1 245 0 386              		@ Function supports interworking. 387              		@ args = 0, pretend = 0, frame = 0 388              		@ frame_needed = 0, uses_anonymous_args = 0 389              	.LVL59: 390 0294 10402DE9 		stmfd	sp!, {r4, lr} 391              	.LCFI3: 392              		.loc 1 245 0 393 0298 FF4000E2 		and	r4, r0, #255 246:consol.c      ****   if(charToSend == '\n')
 394              		.loc 1 246 0 395 029c 0A0054E3 		cmp	r4, #10 247:consol.c      ****     consolSendChar('\r');
 396              		.loc 1 247 0 397 02a0 0D00A0E3 		mov	r0, #13 398              	.LVL60: 399              		.loc 1 246 0 400              		.loc 1 247 0 401 02a4 FEFFFF0B 		bleq	consolSendChar 402              	.L73: 248:consol.c      **** 
 249:consol.c      ****   consolSendChar(charToSend);
 403              		.loc 1 249 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -