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

📄 adc.lst

📁 LPC2114 AD采集 uVison2环境编辑
💻 LST
📖 第 1 页 / 共 2 页
字号:
ARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 1   1              		.file	"adc.c"   2              		.file 1 "adc.c"   3              		.section	.debug_abbrev,"",%progbits   4              	.Ldebug_abbrev0:   5              		.section	.debug_info,"",%progbits   6              	.Ldebug_info0:   7              		.section	.debug_line,"",%progbits   8              	.Ldebug_line0:   9 0000 4E000000 		.text   9      02001900    9      00000201    9      FB0E0A00    9      01010101   10              	.Ltext0:  11              		.align	2  12              		.global	puthex  13              		.type	puthex, %function  14              	puthex:  15              	.LFB3:   1:adc.c         **** /******************************************************************************/   2:adc.c         **** /*  This file is part of the uVision/ARM development tools                    */   3:adc.c         **** /*  Copyright KEIL ELEKTRONIK GmbH 2002-2004                                  */   4:adc.c         **** /******************************************************************************/   5:adc.c         **** /*                                                                            */   6:adc.c         **** /*  BLINKY.C:  LED Flasher                                                    */   7:adc.c         **** /*                                                                            */   8:adc.c         **** /******************************************************************************/   9:adc.c         ****                     10:adc.c         **** #include <LPC21xx.H>                       /* LPC21xx definitions */  11:adc.c         ****   12:adc.c         **** extern void init_serial (void);            /* Initialize Serial Interface     */  13:adc.c         **** extern int  putchar (int ch);              /* Write character to Serial Port  */  14:adc.c         **** extern int  getchar (void);                /* Read character from Serial Port */  15:adc.c         ****   16:adc.c         ****   17:adc.c         **** void puthex (int hex) {                    /* Write Hex Digit to Serial Port  */  16              		.loc 1 17 0  17              		@ Function supports interworking.  18              		@ args = 0, pretend = 0, frame = 0  19              		@ frame_needed = 1, uses_anonymous_args = 0  20 0000 0DC0A0E1 		mov	ip, sp  21              	.LCFI0:  22 0004 00D82DE9 		stmfd	sp!, {fp, ip, lr, pc}  23              	.LCFI1:  24 0008 04B04CE2 		sub	fp, ip, #4  25              	.LCFI2:  18:adc.c         ****   if (hex > 9) putchar('A' + (hex - 10));  26              		.loc 1 18 0  27 000c 090050E3 		cmp	r0, #9  28 0010 370080C2 		addgt	r0, r0, #55  19:adc.c         ****   else         putchar('0' +  hex);  29              		.loc 1 19 0  30 0014 300080D2 		addle	r0, r0, #48  31 0018 FEFFFFEB 		bl	putchar  20:adc.c         **** }  32              		.loc 1 20 0  33 001c 00681BE9 		ldmea	fp, {fp, sp, lr}ARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 2  34 0020 1EFF2FE1 		bx	lr  35              	.LFE3:  36              		.size	puthex, .-puthex  37              		.align	2  38              		.global	putstr  39              		.type	putstr, %function  40              	putstr:  41              	.LFB5:  21:adc.c         ****   22:adc.c         **** void putstr (char *p) {                    /* Write string */  42              		.loc 1 22 0  43              		@ Function supports interworking.  44              		@ args = 0, pretend = 0, frame = 0  45              		@ frame_needed = 1, uses_anonymous_args = 0  46 0024 0DC0A0E1 		mov	ip, sp  47              	.LCFI3:  48 0028 10D82DE9 		stmfd	sp!, {r4, fp, ip, lr, pc}  49              	.LCFI4:  50 002c 04B04CE2 		sub	fp, ip, #4  51              	.LCFI5:  52 0030 0040A0E1 		mov	r4, r0  23:adc.c         ****   while (*p) {  53              		.loc 1 23 0  54 0034 0030D0E5 		ldrb	r3, [r0, #0]	@ zero_extendqisi2  55 0038 000053E3 		cmp	r3, #0  56 003c 1300000A 		beq	.L11  57              	.L9:  24:adc.c         ****     putchar (*p++);  58              		.loc 1 24 0  59 0040 0000D4E5 		ldrb	r0, [r4, #0]	@ zero_extendqisi2  60 0044 FEFFFFEB 		bl	putchar  61 0048 0130F4E5 		ldrb	r3, [r4, #1]!	@ zero_extendqisi2  62 004c 000053E3 		cmp	r3, #0  63 0050 0E00001A 		bne	.L9  64              	.L11:  25:adc.c         ****   }  26:adc.c         **** }  65              		.loc 1 26 0  66 0054 10681BE9 		ldmea	fp, {r4, fp, sp, lr}  67 0058 1EFF2FE1 		bx	lr  68              	.LFE5:  69              		.size	putstr, .-putstr  70              		.section	.rodata.str1.4,"aMS",%progbits,1  71              		.align	2  72              	.LC0:  73 0000 0A       		.ascii	"\n"  74 0001 41494E30 		.ascii	"AIN0 Result = 0x\000"  74      20526573   74      756C7420   74      3D203078   74      00  75 0012 0000     		.text  76              		.align	2  77              		.global	delay  78              		.type	delay, %function  79              	delay:  80              	.LFB7:ARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 3  27:adc.c         ****   28:adc.c         ****   29:adc.c         **** void delay (void) {                        /* Delay function */  81              		.loc 1 29 0  82              		@ Function supports interworking.  83              		@ args = 0, pretend = 0, frame = 0  84              		@ frame_needed = 1, uses_anonymous_args = 0  85 005c 0DC0A0E1 		mov	ip, sp  86              	.LCFI6:  87 0060 10D82DE9 		stmfd	sp!, {r4, fp, ip, lr, pc}  88              	.LCFI7:  89 0064 04B04CE2 		sub	fp, ip, #4  90              	.LCFI8:  30:adc.c         ****   unsigned int cnt;  31:adc.c         ****   unsigned int val;  32:adc.c         ****   33:adc.c         ****   ADCR |= 0x01000000;                      /* Start A/D Conversion */  91              		.loc 1 33 0  92              	.LBB2:  93 0068 0E22A0E3 		mov	r2, #-536870912  94 006c 0D2982E2 		add	r2, r2, #212992  95 0070 003092E5 		ldr	r3, [r2, #0]  96 0074 013483E3 		orr	r3, r3, #16777216  97 0078 003082E5 		str	r3, [r2, #0]  34:adc.c         ****   do {  98              		.loc 1 34 0  99 007c 4E32A0E3 		mov	r3, #-536870908 100 0080 0D3983E2 		add	r3, r3, #212992 101              	.L13:  35:adc.c         ****     val = ADDR;                            /* Read A/D Data Register */ 102              		.loc 1 35 0 103 0084 004093E5 		ldr	r4, [r3, #0]  36:adc.c         ****   } while ((val & 0x80000000) == 0);       /* Wait for end of A/D Conversion */ 104              		.loc 1 36 0 105 0088 000054E3 		cmp	r4, #0 106 008c 1F0000AA 		bge	.L13  37:adc.c         ****   ADCR &= ~0x01000000;                     /* Stop A/D Conversion */ 107              		.loc 1 37 0 108 0090 0E22A0E3 		mov	r2, #-536870912 109 0094 0D2982E2 		add	r2, r2, #212992 110 0098 003092E5 		ldr	r3, [r2, #0] 111 009c 0134C3E3 		bic	r3, r3, #16777216 112 00a0 003082E5 		str	r3, [r2, #0]  38:adc.c         ****   val = (val >> 6) & 0x03FF;               /* Extract AIN0 Value */ 113              		.loc 1 38 0 114 00a4 2443A0E1 		mov	r4, r4, lsr #6 115 00a8 044BA0E1 		mov	r4, r4, asl #22 116 00ac 244BA0E1 		mov	r4, r4, lsr #22  39:adc.c         ****   40:adc.c         ****   putstr ("\nAIN0 Result = 0x");           /* Output A/D Conversion Result */ 117              		.loc 1 40 0 118 00b0 44009FE5 		ldr	r0, .L24 119 00b4 FEFFFFEB 		bl	putstr  41:adc.c         ****   puthex((val >> 8) & 0x0F);               /* Write 1. Hex Digit */ 120              		.loc 1 41 0 121 00b8 2404A0E1 		mov	r0, r4, lsr #8 122 00bc FEFFFFEB 		bl	puthexARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 4  42:adc.c         ****   puthex((val >> 4) & 0x0F);               /* Write 2. Hex Digit */ 123              		.loc 1 42 0 124 00c0 2402A0E1 		mov	r0, r4, lsr #4 125 00c4 0F0000E2 		and	r0, r0, #15 126 00c8 FEFFFFEB 		bl	puthex  43:adc.c         ****   puthex (val & 0x0F);                     /* Write 3. Hex Digit */ 127              		.loc 1 43 0 128 00cc 0F0004E2 		and	r0, r4, #15 129 00d0 FEFFFFEB 		bl	puthex  44:adc.c         ****   45:adc.c         ****   val = (val >> 2) << 12;                  /* Adjust Delay Value */ 130              		.loc 1 45 0 131 00d4 2441A0E1 		mov	r4, r4, lsr #2 132 00d8 0446A0E1 		mov	r4, r4, asl #12  46:adc.c         ****   for (cnt = 0; cnt < val; cnt++);         /* Delay */ 133              		.loc 1 46 0 134 00dc 0030A0E3 		mov	r3, #0 135 00e0 040053E1 		cmp	r3, r4 136 00e4 3B00002A 		bcs	.L23 137              	.L21: 138 00e8 013083E2 		add	r3, r3, #1 139 00ec 040053E1 		cmp	r3, r4 140 00f0 3800003A 		bcc	.L21 141              	.L23:  47:adc.c         **** } 142              		.loc 1 47 0 143 00f4 10681BE9 		ldmea	fp, {r4, fp, sp, lr} 144 00f8 1EFF2FE1 		bx	lr 145              	.L25: 146              		.align	2 147              	.L24: 148 00fc 00000000 		.word	.LC0 149              	.LBE2: 150              	.LFE7: 151              		.size	delay, .-delay 152              		.align	2 153              		.global	main 154              		.type	main, %function 155              	main: 156              	.LFB9:  48:adc.c         ****   49:adc.c         ****   50:adc.c         **** int main (void) { 157              		.loc 1 50 0 158              		@ Function supports interworking. 159              		@ args = 0, pretend = 0, frame = 0 160              		@ frame_needed = 1, uses_anonymous_args = 0 161 0100 0DC0A0E1 		mov	ip, sp 162              	.LCFI9: 163 0104 30D82DE9 		stmfd	sp!, {r4, r5, fp, ip, lr, pc} 164              	.LCFI10: 165 0108 04B04CE2 		sub	fp, ip, #4 166              	.LCFI11:  51:adc.c         ****   unsigned int n;  52:adc.c         ****   53:adc.c         ****   IODIR1 = 0x00FF0000;                     /* P1.16..23 defined as Outputs  */ 167              		.loc 1 53 0ARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 5 168              	.LBB3: 169 010c 0E32A0E3 		mov	r3, #-536870912 170 0110 0A3983E2 		add	r3, r3, #163840 171 0114 183083E2 		add	r3, r3, #24 172 0118 FF48A0E3 		mov	r4, #16711680 173 011c 004083E5 		str	r4, [r3, #0]  54:adc.c         ****   ADCR   = 0x002E0401;                     /* Setup A/D: 10-bit AIN0 @ 3MHz */ 174              		.loc 1 54 0 175 0120 0E22A0E3 		mov	r2, #-536870912 176 0124 0D2982E2 		add	r2, r2, #212992 177 0128 2E38A0E3 		mov	r3, #3014656 178 012c 013B83E2 		add	r3, r3, #1024 179 0130 013083E2 		add	r3, r3, #1 180 0134 003082E5 		str	r3, [r2, #0]  55:adc.c         ****   init_serial();                           /* Initialize Serial Interface   */ 181              		.loc 1 55 0 182 0138 FEFFFFEB 		bl	init_serial  56:adc.c         ****   IOSET1=0x00ff0000; 183              		.loc 1 56 0 184 013c 0E32A0E3 		mov	r3, #-536870912 185 0140 0A3983E2 		add	r3, r3, #163840 186 0144 143083E2 		add	r3, r3, #20 187 0148 004083E5 		str	r4, [r3, #0]  57:adc.c         ****   while (1) {                              /* Loop forever */ 188              		.loc 1 57 0 189 014c 0E52A0E3 		mov	r5, #-536870912 190 0150 0A5985E2 		add	r5, r5, #163840 191              	.L35:  58:adc.c         ****     for (n = 0x00010000; n <= 0x00800000; n <<= 1) { 192              		.loc 1 58 0 193 0154 0148A0E3 		mov	r4, #65536 194              	.L34:  59:adc.c         ****       /* Blink LED 0, 1, 2, 3, 4, 5, 6, 7 */  60:adc.c         ****       IOCLR1 = n;                          /* Turn on LED */ 195              		.loc 1 60 0 196 0158 1C4085E5 		str	r4, [r5, #28]  61:adc.c         ****       delay();                             /* Delay */ 197              		.loc 1 61 0 198 015c FEFFFFEB 		bl	delay  62:adc.c         ****       IOSET1 = 0x00FF0000;                 /* Turn off LEDs */ 199              		.loc 1 62 0 200 0160 FF38A0E3 		mov	r3, #16711680 201 0164 143085E5 		str	r3, [r5, #20] 202              		.loc 1 58 0 203 0168 8440A0E1 		mov	r4, r4, asl #1 204 016c 020554E3 		cmp	r4, #8388608 205 0170 5400009A 		bls	.L34 206 0174 530000EA 		b	.L35  63:adc.c         ****     }  64:adc.c         ****   }  65:adc.c         **** } 207              		.loc 1 65 0 208              	.LBE3: 209              	.LFE9: 210              		.size	main, .-main 211              		.section	.debug_frame,"",%progbits 212              	.Lframe0:ARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 6 213 0000 0C000000 		.4byte	.LECIE0-.LSCIE0 214              	.LSCIE0: 215 0004 FFFFFFFF 		.4byte	0xffffffff 216 0008 01       		.byte	0x1 217 0009 00       		.ascii	"\000" 218 000a 01       		.uleb128 0x1 219 000b 7C       		.sleb128 -4 220 000c 0E       		.byte	0xe 221 000d 0C       		.byte	0xc 222 000e 0D       		.uleb128 0xd 223 000f 00       		.uleb128 0x0 224              		.align	2 225              	.LECIE0: 226              	.LSFDE0: 227 0010 1C000000 		.4byte	.LEFDE0-.LASFDE0 228              	.LASFDE0: 229 0014 00000000 		.4byte	.Lframe0 230 0018 00000000 		.4byte	.LFB3 231 001c 24000000 		.4byte	.LFE3-.LFB3 232 0020 44       		.byte	0x4 233              		.4byte	.LCFI0-.LFB3 234 0021 0D       		.byte	0xd 235 0022 0C       		.uleb128 0xc 236 0023 44       		.byte	0x4 237              		.4byte	.LCFI1-.LCFI0 238 0024 8E       		.byte	0x8e 239 0025 02       		.uleb128 0x2 240 0026 8D       		.byte	0x8d 241 0027 03       		.uleb128 0x3 242 0028 8B       		.byte	0x8b 243 0029 04       		.uleb128 0x4 244 002a 44       		.byte	0x4 245              		.4byte	.LCFI2-.LCFI1 246 002b 0C       		.byte	0xc 247 002c 0B       		.uleb128 0xb 248 002d 04       		.uleb128 0x4 249 002e 0000     		.align	2 250              	.LEFDE0: 251              	.LSFDE2: 252 0030 1C000000 		.4byte	.LEFDE2-.LASFDE2 253              	.LASFDE2: 254 0034 00000000 		.4byte	.Lframe0 255 0038 24000000 		.4byte	.LFB5 256 003c 38000000 		.4byte	.LFE5-.LFB5 257 0040 44       		.byte	0x4 258              		.4byte	.LCFI3-.LFB5 259 0041 0D       		.byte	0xd 260 0042 0C       		.uleb128 0xc 261 0043 44       		.byte	0x4 262              		.4byte	.LCFI4-.LCFI3 263 0044 8E       		.byte	0x8e 264 0045 02       		.uleb128 0x2 265 0046 8D       		.byte	0x8d 266 0047 03       		.uleb128 0x3 267 0048 8B       		.byte	0x8b 268 0049 04       		.uleb128 0x4 269 004a 84       		.byte	0x84ARM GAS  /cygdrive/c/DOCUME~1/yon/LOCALS~1/Temp/cc4gEHD9.s 			page 7 270 004b 05       		.uleb128 0x5 271 004c 44       		.byte	0x4 272              		.4byte	.LCFI5-.LCFI4 273 004d 0C       		.byte	0xc 274 004e 0B       		.uleb128 0xb 275 004f 04       		.uleb128 0x4 276              		.align	2 277              	.LEFDE2: 278              	.LSFDE4: 279 0050 1C000000 		.4byte	.LEFDE4-.LASFDE4 280              	.LASFDE4: 281 0054 00000000 		.4byte	.Lframe0 282 0058 5C000000 		.4byte	.LFB7 283 005c A4000000 		.4byte	.LFE7-.LFB7 284 0060 44       		.byte	0x4 285              		.4byte	.LCFI6-.LFB7 286 0061 0D       		.byte	0xd 287 0062 0C       		.uleb128 0xc 288 0063 44       		.byte	0x4 289              		.4byte	.LCFI7-.LCFI6

⌨️ 快捷键说明

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