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

📄 stdlib.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 158:/mnt/hgfs/boot/booter/source/stdlib.c **** 		case 'F': 159:/mnt/hgfs/boot/booter/source/stdlib.c **** 		case 'f': 160:/mnt/hgfs/boot/booter/source/stdlib.c **** 			return 15; 161:/mnt/hgfs/boot/booter/source/stdlib.c **** 			break; 162:/mnt/hgfs/boot/booter/source/stdlib.c **** 		default: 163:/mnt/hgfs/boot/booter/source/stdlib.c **** 			return 0; 492              		.loc 1 163 0 164:/mnt/hgfs/boot/booter/source/stdlib.c **** 	} 165:/mnt/hgfs/boot/booter/source/stdlib.c **** } 493              		.loc 1 165 0 494 023c 0800E003 		j	$31 495 0240 21100000 		move	$2,$0 496              	 497              	$L59: 498              		.loc 1 160 0 499 0244 0800E003 		j	$31 500 0248 0F000224 		li	$2,15			# 0xf 501              	 502              	$L47: 503              		.loc 1 136 0 504 024c 0800E003 		j	$31 505 0250 2110A000 		move	$2,$5 506              	 507              	$L49: 508              		.loc 1 140 0 509 0254 0800E003 		j	$31 510 0258 0A000224 		li	$2,10			# 0xa 511              	 512              	$L51: 513              		.loc 1 144 0 514 025c 0800E003 		j	$31 515 0260 0B000224 		li	$2,11			# 0xbGAS LISTING /tmp/ccLTWmfM.s 			page 13 516              	 517              	$L53: 518              		.loc 1 148 0 519 0264 0800E003 		j	$31 520 0268 0C000224 		li	$2,12			# 0xc 521              	 522              	$L55: 523              		.loc 1 152 0 524 026c 0800E003 		j	$31 525 0270 0D000224 		li	$2,13			# 0xd 526              	 527              	$L57: 528              		.loc 1 156 0 529 0274 0800E003 		j	$31 530 0278 0E000224 		li	$2,14			# 0xe 531              	 532              		.set	macro 533              		.set	reorder 534              	$LFE10: 535              		.end	hexchartoi 536              		.align	2 537              		.globl	tolower 538              		.ent	tolower 539              		.type	tolower, @function 540              	tolower: 541              	$LFB11: 166:/mnt/hgfs/boot/booter/source/stdlib.c ****  167:/mnt/hgfs/boot/booter/source/stdlib.c **** /******************************************************************** 168:/mnt/hgfs/boot/booter/source/stdlib.c **** int isspace(const char ch) { 169:/mnt/hgfs/boot/booter/source/stdlib.c ****   switch (ch) { 170:/mnt/hgfs/boot/booter/source/stdlib.c ****     case ' ' : 171:/mnt/hgfs/boot/booter/source/stdlib.c ****     case '\f': 172:/mnt/hgfs/boot/booter/source/stdlib.c ****     case '\n': 173:/mnt/hgfs/boot/booter/source/stdlib.c ****     case '\r': 174:/mnt/hgfs/boot/booter/source/stdlib.c ****     case '\t': 175:/mnt/hgfs/boot/booter/source/stdlib.c ****     case '\v': 176:/mnt/hgfs/boot/booter/source/stdlib.c ****       return 1; 177:/mnt/hgfs/boot/booter/source/stdlib.c ****     default  : 178:/mnt/hgfs/boot/booter/source/stdlib.c ****       return 0; 179:/mnt/hgfs/boot/booter/source/stdlib.c ****   } 180:/mnt/hgfs/boot/booter/source/stdlib.c **** } 181:/mnt/hgfs/boot/booter/source/stdlib.c ****   182:/mnt/hgfs/boot/booter/source/stdlib.c **** /******************************************************************** 183:/mnt/hgfs/boot/booter/source/stdlib.c **** int isalpha(const char ch) { 184:/mnt/hgfs/boot/booter/source/stdlib.c ****   if (((ch >= 'A') && (ch <= 'Z')) || 185:/mnt/hgfs/boot/booter/source/stdlib.c ****       ((ch >= 'a') && (ch <= 'z'))) 186:/mnt/hgfs/boot/booter/source/stdlib.c ****     return 1; 187:/mnt/hgfs/boot/booter/source/stdlib.c ****   return 0; 188:/mnt/hgfs/boot/booter/source/stdlib.c **** } 189:/mnt/hgfs/boot/booter/source/stdlib.c ****   190:/mnt/hgfs/boot/booter/source/stdlib.c **** /******************************************************************** 191:/mnt/hgfs/boot/booter/source/stdlib.c **** int isupper(const char ch) { 192:/mnt/hgfs/boot/booter/source/stdlib.c ****   if ((ch >= 'A') && (ch <= 'Z')) return 1; 193:/mnt/hgfs/boot/booter/source/stdlib.c ****   return 0; 194:/mnt/hgfs/boot/booter/source/stdlib.c **** } 195:/mnt/hgfs/boot/booter/source/stdlib.c ****  196:/mnt/hgfs/boot/booter/source/stdlib.c **** /********************************************************************GAS LISTING /tmp/ccLTWmfM.s 			page 14 197:/mnt/hgfs/boot/booter/source/stdlib.c **** int islower(const char ch) { 198:/mnt/hgfs/boot/booter/source/stdlib.c ****   if ((ch >= 'a') && (ch <= 'z')) return 1; 199:/mnt/hgfs/boot/booter/source/stdlib.c ****   return 0; 200:/mnt/hgfs/boot/booter/source/stdlib.c **** } 201:/mnt/hgfs/boot/booter/source/stdlib.c ****  202:/mnt/hgfs/boot/booter/source/stdlib.c **** /******************************************************************** 203:/mnt/hgfs/boot/booter/source/stdlib.c **** int isdigit(const char ch) { 204:/mnt/hgfs/boot/booter/source/stdlib.c ****   if ((ch >= '0') && (ch <= '9')) return 1; 205:/mnt/hgfs/boot/booter/source/stdlib.c ****   return 0; 206:/mnt/hgfs/boot/booter/source/stdlib.c **** } 207:/mnt/hgfs/boot/booter/source/stdlib.c ****  208:/mnt/hgfs/boot/booter/source/stdlib.c **** /******************************************************************* 209:/mnt/hgfs/boot/booter/source/stdlib.c **** int isxdigit(const char ch) { 210:/mnt/hgfs/boot/booter/source/stdlib.c ****   if (((ch >= '0') && (ch <= '9')) || 211:/mnt/hgfs/boot/booter/source/stdlib.c ****       ((ch >= 'A') && (ch <= 'F')) || 212:/mnt/hgfs/boot/booter/source/stdlib.c ****       ((ch >= 'a') && (ch <= 'f'))) 213:/mnt/hgfs/boot/booter/source/stdlib.c ****     return 1; 214:/mnt/hgfs/boot/booter/source/stdlib.c ****   return 0; 215:/mnt/hgfs/boot/booter/source/stdlib.c **** } 216:/mnt/hgfs/boot/booter/source/stdlib.c **** */ 217:/mnt/hgfs/boot/booter/source/stdlib.c ****  218:/mnt/hgfs/boot/booter/source/stdlib.c **** /*******************************************************************/ 219:/mnt/hgfs/boot/booter/source/stdlib.c **** int tolower(const char ch)
 220:/mnt/hgfs/boot/booter/source/stdlib.c **** {
 542              		.loc 1 220 0 543              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 544              		.mask	0x00000000,0 545              		.fmask	0x00000000,0 546              		.set	noreorder 547              		.set	nomacro 548              		 549              		.loc 1 220 0 550 027c 00160400 		sll	$2,$4,24 551 0280 03160200 		sra	$2,$2,24 221:/mnt/hgfs/boot/booter/source/stdlib.c **** 	if (isupper(ch))
 552              		.loc 1 221 0 553 0284 BFFF4324 		addiu	$3,$2,-65 554 0288 FF006330 		andi	$3,$3,0x00ff 555 028c 1A00632C 		sltu	$3,$3,26 222:/mnt/hgfs/boot/booter/source/stdlib.c **** 		return ch + ('a' - 'A'); else
 556              		.loc 1 222 0 557 0290 20004424 		addiu	$4,$2,32 223:/mnt/hgfs/boot/booter/source/stdlib.c **** 		return ch;
 224:/mnt/hgfs/boot/booter/source/stdlib.c **** } 558              		.loc 1 224 0 559 0294 0800E003 		j	$31 560 0298 0B108300 		movn	$2,$4,$3 561              	 562              		.set	macro 563              		.set	reorder 564              	$LFE11: 565              		.end	tolower 566              		.align	2 567              		.globl	strcpy 568              		.ent	strcpy 569              		.type	strcpy, @function 570              	strcpy:GAS LISTING /tmp/ccLTWmfM.s 			page 15 571              	$LFB12: 225:/mnt/hgfs/boot/booter/source/stdlib.c ****  226:/mnt/hgfs/boot/booter/source/stdlib.c **** void strcpy(char* dest, const char* source)
 227:/mnt/hgfs/boot/booter/source/stdlib.c **** {
 572              		.loc 1 227 0 573              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 574              		.mask	0x00000000,0 575              		.fmask	0x00000000,0 576              		.set	noreorder 577              		.set	nomacro 578              		 228:/mnt/hgfs/boot/booter/source/stdlib.c **** 	int i;
 229:/mnt/hgfs/boot/booter/source/stdlib.c **** 	for(i = 0; source[i] != 0; ++i)
 579              		.loc 1 229 0 580 029c 0000A280 		lb	$2,0($5) 581              		.loc 1 227 0 582 02a0 21308000 		move	$6,$4 583              		.loc 1 229 0 584 02a4 0A004010 		beq	$2,$0,$L71 585 02a8 21200000 		move	$4,$0 586              	 587 02ac 2118A000 		move	$3,$5 588              	$L69: 230:/mnt/hgfs/boot/booter/source/stdlib.c **** 	{
 231:/mnt/hgfs/boot/booter/source/stdlib.c **** 		dest[i] = source[i];
 589              		.loc 1 231 0 590 02b0 00006390 		lbu	$3,0($3) 591 02b4 2110C400 		addu	$2,$6,$4 592              		.loc 1 229 0 593 02b8 01008424 		addiu	$4,$4,1 594              		.loc 1 231 0 595 02bc 000043A0 		sb	$3,0($2) 596              		.loc 1 229 0 597 02c0 2118A400 		addu	$3,$5,$4 598 02c4 00006280 		lb	$2,0($3) 599 02c8 F9FF4014 		bne	$2,$0,$L69 600 02cc 00000000 		nop 601              	 602              	$L71: 232:/mnt/hgfs/boot/booter/source/stdlib.c **** 	}
 233:/mnt/hgfs/boot/booter/source/stdlib.c **** 
 234:/mnt/hgfs/boot/booter/source/stdlib.c **** 	dest[i] = 0;
 603              		.loc 1 234 0 604 02d0 2110C400 		addu	$2,$6,$4 605 02d4 0800E003 		j	$31 606 02d8 000040A0 		sb	$0,0($2) 607              	 608              		.set	macro 609              		.set	reorder 610              	$LFE12: 611              		.end	strcpy 612              		.align	2 613              		.globl	strcmp 614              		.ent	strcmp 615              		.type	strcmp, @function 616              	strcmp: 617              	$LFB13:GAS LISTING /tmp/ccLTWmfM.s 			page 16 235:/mnt/hgfs/boot/booter/source/stdlib.c **** }
 236:/mnt/hgfs/boot/booter/source/stdlib.c ****  237:/mnt/hgfs/boot/booter/source/stdlib.c **** int strcmp(const char *s1, const char *s2)
 238:/mnt/hgfs/boot/booter/source/stdlib.c **** {
 618              		.loc 1 238 0 619              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 620              		.mask	0x00000000,0 621              		.fmask	0x00000000,0 622              		.set	noreorder 623              		.set	nomacro 624              		 239:/mnt/hgfs/boot/booter/source/stdlib.c **** 	while (*s1 || *s2)
 240:/mnt/hgfs/boot/booter/source/stdlib.c **** 		if (*s1++ != *s2++)
 241:/mnt/hgfs/boot/booter/source/stdlib.c **** 			return (*--s1 - *--s2);
 625              		.loc 1 241 0 626 02dc C3000008 		j	$L90 627 02e0 00008290 		lbu	$2,0($4) 628              	 629              	$L89: 630              		.loc 1 241 0 631 02e4 0000A390 		lbu	$3,0($5) 632              		.loc 1 240 0 633              		.loc 1 241 0 634 02e8 16006010 		beq	$3,$0,$L88 635 02ec 001E0300 		sll	$3,$3,24 636              	 637              		.loc 1 240 0 638 02f0 00160200 		sll	$2,$2,24 639 02f4 031E0300 		sra	$3,$3,24 640 02f8 03160200 		sra	$2,$2,24 641 02fc 0100A524 		addiu	$5,$5,1 642 0300 0C004314 		bne	$2,$3,$L82 643 0304 01008424 		addiu	$4,$4,1 644              	 645              	$L87: 646              		.loc 1 241 0 647 0308 00008290 		lbu	$2,0($4) 648              	$L90: 649 030c F5FF4010 		beq	$2,$0,$L89 650 0310 00000000 		nop 651              	 652 0314 0000A390 		lbu	$3,0($5) 653              		.loc 1 240 0 654 0318 00160200 		sll	$2,$2,24 655 031c 03160200 		sra	$2,$2,24 656 0320 001E0300 		sll	$3,$3,24 657 0324 031E0300 		sra	$3,$3,24 658 0328 0100A524 		addiu	$5,$5,1 659 032c F6FF4310 		beq	$2,$3,$L87 660 0330 01008424 		addiu	$4,$4,1 661              	 662              	$L82: 663              		.loc 1 241 0 664 0334 FFFF8380 		lb	$3,-1($4) 665 0338 FFFFA280 		lb	$2,-1($5) 666 033c 0800E003 		j	$31 667 0340 23106200 		subu	$2,$3,$2GAS LISTING /tmp/ccLTWmfM.s 			page 17 668              	 669              	$L88: 242:/mnt/hgfs/boot/booter/source/stdlib.c **** 	return 0;
 670              		.loc 1 242 0 243:/mnt/hgfs/boot/booter/source/stdlib.c **** } 671              		.loc 1 243 0 672 0344 0800E003 		j	$31 673 0348 21100000 		move	$2,$0 674              	 675              		.set	macro 676              		.set	reorder 677              	$LFE13: 678              		.end	strcmp 679              		.align	2 680              		.globl	strncmp 681              		.ent	strncmp 682              		.type	strncmp, @function 683              	strncmp: 684              	$LFB14: 244:/mnt/hgfs/boot/booter/source/stdlib.c ****  245:/mnt/hgfs/boot/booter/source/stdlib.c **** int strncmp(const char *s1, const char *s2, int n)
 246:/mnt/hgfs/boot/booter/source/stdlib.c **** {
 685              		.loc 1 246 0 686              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 687              		.mask	0x00000000,0 688              		.fmask	0x00000000,0 689              		.set	noreorder 690              		.set	nomacro 691              		 692 034c FFFF0724 		li	$7,-1			# 0xffffffffffffffff 693              	$L92: 247:/mnt/hgfs/boot/booter/source/stdlib.c **** 	while ((*s1 || *s2) && n--)
 248:/mnt/hgfs/boot/booter/source/stdlib.c **** 		if (*s1++ != *s2++)
 249:/mnt/hgfs/boot/booter/source/stdlib.c **** 			return (*--s1 - *--s2);
 694              		.loc 1 249 0 695 0350 00008380 		lb	$3,0($4) 696 0354 FFFFC624 		addiu	$6,$6,-1 697              		.loc 1 248 0 698              		.loc 1 249 0 699 0358 04006014 		bne	$3,$0,$L94 700 035c 01008424 		addiu	$4,$4,1 701              	 702 0360 0000A280 		lb	$2,0($5) 703 0364 0A004010 		beq	$2,$0,$L93 704 0368 00000000 		nop 705              	 706              	$L94: 707 036c 0800C710 		beq	$6,$7,$L93 708 0370 00000000 		nop 709              	 710              		.loc 1 248 0 711 0374 0000A280 		lb	$2,0($5) 712 0378 F5FF6210 		beq	$3,$2,$L92 713 037c 0100A524 		addiu	$5,$5,1 714              	 715              		.loc 1 249 0 716 0380 FFFF8380 		lb	$3,-1($4)GAS LISTING /tmp/ccLTWmfM.s 			page 18 717 0384 FFFFA280 		lb	$2,-1($5) 718 0388 0800E003 		j	$31 719 038c 23106200 		subu	$2,$3,$2 720              	 721              	$L93: 250:/mnt/hgfs/boot/booter/source/stdlib.c **** 	return 0;
 722              		.loc 1 250 0 251:/mnt/hgfs/boot/booter/source/stdlib.c **** } 723              		.loc 1 251 0

⌨️ 快捷键说明

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