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

📄 stdlib.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
GAS LISTING /tmp/ccLTWmfM.s 			page 1   1              		.section .mdebug.abi32   2              		.previous   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 57010000 		.text   9      02006E00    9      00000101    9      FB0E0A00    9      01010101   10              	$Ltext0:  11              		.align	2  12              		.globl	putc  13              		.ent	putc  14              		.type	putc, @function  15              	putc:  16              	$LFB2:  17              		.file 1 "/mnt/hgfs/boot/booter/source/stdlib.c"   1:/mnt/hgfs/boot/booter/source/stdlib.c **** #include "example.h"   2:/mnt/hgfs/boot/booter/source/stdlib.c ****    3:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************/   4:/mnt/hgfs/boot/booter/source/stdlib.c **** void   5:/mnt/hgfs/boot/booter/source/stdlib.c **** putc (int ch)   6:/mnt/hgfs/boot/booter/source/stdlib.c **** {  18              		.loc 1 6 0  19              		.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, gp= 0  20              		.mask	0x80000000,-8  21              		.fmask	0x00000000,0  22              		.set	noreorder  23              		.set	nomacro  24              		  25 0000 E8FFBD27 		addiu	$sp,$sp,-24  26              	$LCFI0:   7:/mnt/hgfs/boot/booter/source/stdlib.c **** 	if (ch == '\n')  27              		.loc 1 7 0  28 0004 0A000224 		li	$2,10			# 0xa  29              		.loc 1 6 0  30              	$LCFI1:  31              		.loc 1 7 0  32 0008 04008210 		beq	$4,$2,$L5  33 000c 1000BFAF 		sw	$31,16($sp)  34              	   8:/mnt/hgfs/boot/booter/source/stdlib.c **** 	{   9:/mnt/hgfs/boot/booter/source/stdlib.c **** 		platformPutChar('\r');  10:/mnt/hgfs/boot/booter/source/stdlib.c **** 		platformPutChar('\n');  11:/mnt/hgfs/boot/booter/source/stdlib.c **** 	}  12:/mnt/hgfs/boot/booter/source/stdlib.c **** 	else  13:/mnt/hgfs/boot/booter/source/stdlib.c **** 		platformPutChar(ch);  14:/mnt/hgfs/boot/booter/source/stdlib.c **** }  35              		.loc 1 14 0  36 0010 1000BF8F 		lw	$31,16($sp)  37              		.loc 1 13 0  38 0014 00000008 		j	platformPutChar  39 0018 1800BD27 		addiu	$sp,$sp,24GAS LISTING /tmp/ccLTWmfM.s 			page 2  40              	  41              	$L5:  42              		.loc 1 9 0  43 001c 0000000C 		jal	platformPutChar  44 0020 0D000424 		li	$4,13			# 0xd  45              	  46              		.loc 1 14 0  47 0024 1000BF8F 		lw	$31,16($sp)  48              		.loc 1 10 0  49 0028 0A000424 		li	$4,10			# 0xa  50              		.loc 1 14 0  51              		.loc 1 13 0  52 002c 00000008 		j	platformPutChar  53 0030 1800BD27 		addiu	$sp,$sp,24  54              	  55              		.set	macro  56              		.set	reorder  57              	$LFE2:  58              		.end	putc  59              		.align	2  60              		.globl	kbhit  61              		.ent	kbhit  62              		.type	kbhit, @function  63              	kbhit:  64              	$LFB3:  15:/mnt/hgfs/boot/booter/source/stdlib.c ****   16:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************/  17:/mnt/hgfs/boot/booter/source/stdlib.c **** int  18:/mnt/hgfs/boot/booter/source/stdlib.c **** kbhit (void)  19:/mnt/hgfs/boot/booter/source/stdlib.c **** {  65              		.loc 1 19 0  66              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0  67              		.mask	0x00000000,0  68              		.fmask	0x00000000,0  69              		.set	noreorder  70              		.set	nomacro  71              		  20:/mnt/hgfs/boot/booter/source/stdlib.c **** 	return platformCheckChar();  72              		.loc 1 20 0  73 0034 00000008 		j	platformCheckChar  74 0038 00000000 		nop  75              	  76              		.set	macro  77              		.set	reorder  78              	$LFE3:  79              		.end	kbhit  80              		.align	2  81              		.globl	getc  82              		.ent	getc  83              		.type	getc, @function  84              	getc:  85              	$LFB4:  21:/mnt/hgfs/boot/booter/source/stdlib.c **** }  22:/mnt/hgfs/boot/booter/source/stdlib.c ****   23:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************/  24:/mnt/hgfs/boot/booter/source/stdlib.c **** int  25:/mnt/hgfs/boot/booter/source/stdlib.c **** getc (void)GAS LISTING /tmp/ccLTWmfM.s 			page 3  26:/mnt/hgfs/boot/booter/source/stdlib.c **** {  86              		.loc 1 26 0  87              		.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, gp= 0  88              		.mask	0x80010000,-4  89              		.fmask	0x00000000,0  90              		.set	noreorder  91              		.set	nomacro  92              		  93 003c E8FFBD27 		addiu	$sp,$sp,-24  94              	$LCFI2:  95 0040 1400BFAF 		sw	$31,20($sp)  96              	$LCFI3:  97              		.loc 1 26 0  98              	$LCFI4:  27:/mnt/hgfs/boot/booter/source/stdlib.c **** 	int ch;  28:/mnt/hgfs/boot/booter/source/stdlib.c **** 	  29:/mnt/hgfs/boot/booter/source/stdlib.c **** 	ch = platformGetChar();  99              		.loc 1 29 0 100 0044 0000000C 		jal	platformGetChar 101 0048 1000B0AF 		sw	$16,16($sp) 102              	 103 004c 21804000 		move	$16,$2  30:/mnt/hgfs/boot/booter/source/stdlib.c **** 	putc(ch); 104              		.loc 1 30 0 105 0050 0000000C 		jal	putc 106 0054 21204000 		move	$4,$2 107              	  31:/mnt/hgfs/boot/booter/source/stdlib.c **** 	return ch;  32:/mnt/hgfs/boot/booter/source/stdlib.c **** } 108              		.loc 1 32 0 109 0058 21100002 		move	$2,$16 110 005c 1400BF8F 		lw	$31,20($sp) 111 0060 1000B08F 		lw	$16,16($sp) 112 0064 0800E003 		j	$31 113 0068 1800BD27 		addiu	$sp,$sp,24 114              	 115              		.set	macro 116              		.set	reorder 117              	$LFE4: 118              		.end	getc 119              		.align	2 120              		.globl	getc_noecho 121              		.ent	getc_noecho 122              		.type	getc_noecho, @function 123              	getc_noecho: 124              	$LFB5:  33:/mnt/hgfs/boot/booter/source/stdlib.c ****   34:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************/  35:/mnt/hgfs/boot/booter/source/stdlib.c **** int  36:/mnt/hgfs/boot/booter/source/stdlib.c **** getc_noecho (void)  37:/mnt/hgfs/boot/booter/source/stdlib.c **** { 125              		.loc 1 37 0 126              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 127              		.mask	0x00000000,0 128              		.fmask	0x00000000,0 129              		.set	noreorder 130              		.set	nomacroGAS LISTING /tmp/ccLTWmfM.s 			page 4 131              		  38:/mnt/hgfs/boot/booter/source/stdlib.c **** 	int ch;  39:/mnt/hgfs/boot/booter/source/stdlib.c **** 	  40:/mnt/hgfs/boot/booter/source/stdlib.c **** 	ch = platformGetChar(); 132              		.loc 1 40 0 133 006c 00000008 		j	platformGetChar 134 0070 00000000 		nop 135              	 136              		.set	macro 137              		.set	reorder 138              	$LFE5: 139              		.end	getc_noecho 140              		.align	2 141              		.globl	puts 142              		.ent	puts 143              		.type	puts, @function 144              	puts: 145              	$LFB6:  41:/mnt/hgfs/boot/booter/source/stdlib.c **** 	return ch;  42:/mnt/hgfs/boot/booter/source/stdlib.c **** }  43:/mnt/hgfs/boot/booter/source/stdlib.c ****   44:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************/  45:/mnt/hgfs/boot/booter/source/stdlib.c **** void  46:/mnt/hgfs/boot/booter/source/stdlib.c **** puts (const char *s)  47:/mnt/hgfs/boot/booter/source/stdlib.c **** { 146              		.loc 1 47 0 147              		.frame	$sp,24,$31		# vars= 0, regs= 2/0, args= 16, gp= 0 148              		.mask	0x80010000,-4 149              		.fmask	0x00000000,0 150              		.set	noreorder 151              		.set	nomacro 152              		 153 0074 E8FFBD27 		addiu	$sp,$sp,-24 154              	$LCFI5: 155 0078 1000B0AF 		sw	$16,16($sp) 156              	$LCFI6: 157 007c 21808000 		move	$16,$4 158              		.loc 1 47 0 159              	$LCFI7: 160 0080 24000008 		j	$L15 161 0084 1400BFAF 		sw	$31,20($sp) 162              	 163              	$L16:  48:/mnt/hgfs/boot/booter/source/stdlib.c **** 	while (*s)  49:/mnt/hgfs/boot/booter/source/stdlib.c **** 	{  50:/mnt/hgfs/boot/booter/source/stdlib.c **** 		putc(*s++); 164              		.loc 1 50 0 165 0088 0000000C 		jal	putc 166 008c 01001026 		addiu	$16,$16,1 167              	 168              	$L15: 169 0090 00000482 		lb	$4,0($16) 170 0094 FCFF8014 		bne	$4,$0,$L16 171 0098 1400BF8F 		lw	$31,20($sp) 172              	 173 009c 1000B08F 		lw	$16,16($sp) 174 00a0 0800E003 		j	$31GAS LISTING /tmp/ccLTWmfM.s 			page 5 175 00a4 1800BD27 		addiu	$sp,$sp,24 176              	 177              		.set	macro 178              		.set	reorder 179              	$LFE6: 180              		.end	puts 181              		.section	.rodata.str1.4,"aMS",@progbits,1 182              		.align	2 183              	$LC0: 184 0000 200800   		.ascii	" \b\000" 185 0003 00       		.text 186              		.align	2 187              		.globl	gets 188              		.ent	gets 189              		.type	gets, @function 190              	gets: 191              	$LFB7:  51:/mnt/hgfs/boot/booter/source/stdlib.c **** 	}  52:/mnt/hgfs/boot/booter/source/stdlib.c **** }  53:/mnt/hgfs/boot/booter/source/stdlib.c ****   54:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************/  55:/mnt/hgfs/boot/booter/source/stdlib.c **** char *  56:/mnt/hgfs/boot/booter/source/stdlib.c **** gets (char *s)  57:/mnt/hgfs/boot/booter/source/stdlib.c **** { 192              		.loc 1 57 0 193              		.frame	$sp,48,$31		# vars= 0, regs= 7/0, args= 16, gp= 0 194              		.mask	0x803f0000,-8 195              		.fmask	0x00000000,0 196              		.set	noreorder 197              		.set	nomacro 198              		 199 00a8 D0FFBD27 		addiu	$sp,$sp,-48 200              	$LCFI8: 201 00ac 2400B5AF 		sw	$21,36($sp) 202              	$LCFI9: 203 00b0 2000B4AF 		sw	$20,32($sp) 204              	$LCFI10: 205 00b4 1C00B3AF 		sw	$19,28($sp) 206              	$LCFI11: 207 00b8 1800B2AF 		sw	$18,24($sp) 208              	$LCFI12: 209 00bc 1400B1AF 		sw	$17,20($sp) 210              	$LCFI13: 211 00c0 21908000 		move	$18,$4  58:/mnt/hgfs/boot/booter/source/stdlib.c **** 	int i = 0; 212              		.loc 1 58 0 213 00c4 21880000 		move	$17,$0 214 00c8 08001524 		li	$21,8			# 0x8 215 00cc 0000143C 		lui	$20,%hi($LC0) 216 00d0 0A001324 		li	$19,10			# 0xa 217              		.loc 1 57 0 218 00d4 2800BFAF 		sw	$31,40($sp) 219              	$LCFI14: 220              		.loc 1 57 0 221              	$LCFI15: 222 00d8 3B000008 		j	$L18 223 00dc 1000B0AF 		sw	$16,16($sp)GAS LISTING /tmp/ccLTWmfM.s 			page 6 224              	 225              	$L21:  59:/mnt/hgfs/boot/booter/source/stdlib.c **** 	int ch;  60:/mnt/hgfs/boot/booter/source/stdlib.c ****   61:/mnt/hgfs/boot/booter/source/stdlib.c **** 	do  62:/mnt/hgfs/boot/booter/source/stdlib.c **** 	{  63:/mnt/hgfs/boot/booter/source/stdlib.c **** 		ch = getc();  64:/mnt/hgfs/boot/booter/source/stdlib.c **** 		if (ch == '\b')  65:/mnt/hgfs/boot/booter/source/stdlib.c **** 		{  66:/mnt/hgfs/boot/booter/source/stdlib.c **** 			if (i > 0)  67:/mnt/hgfs/boot/booter/source/stdlib.c **** 				--i;  68:/mnt/hgfs/boot/booter/source/stdlib.c **** 			puts(" \b");  69:/mnt/hgfs/boot/booter/source/stdlib.c **** 		}  70:/mnt/hgfs/boot/booter/source/stdlib.c **** 		else  71:/mnt/hgfs/boot/booter/source/stdlib.c **** 		{  72:/mnt/hgfs/boot/booter/source/stdlib.c **** 			s[i++] = ch; 226              		.loc 1 72 0 227 00e0 01003126 		addiu	$17,$17,1  73:/mnt/hgfs/boot/booter/source/stdlib.c **** 		}  74:/mnt/hgfs/boot/booter/source/stdlib.c **** 	} while (ch != '\n'); 228              		.loc 1 74 0 229 00e4 0C001312 		beq	$16,$19,$L24 230 00e8 000050A0 		sb	$16,0($2) 231              	 232              	$L18: 233              		.loc 1 63 0 234 00ec 0000000C 		jal	getc 235 00f0 00000000 		nop 236              	 237 00f4 21804000 		move	$16,$2 238              		.loc 1 67 0 239 00f8 2A181100 		slt	$3,$0,$17 240              		.loc 1 68 0 241 00fc 00008426 		addiu	$4,$20,%lo($LC0) 242              		.loc 1 72 0 243              		.loc 1 64 0 244 0100 F7FF1516 		bne	$16,$21,$L21 245 0104 21103202 		addu	$2,$17,$18 246              	 247              		.loc 1 67 0 248              		.loc 1 68 0

⌨️ 快捷键说明

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