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

📄 dprintf.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 867              		.loc 1 330 0 868 0648 0000838C 		lw	$3,%lo(scanstr)($4) 869 064c FFFF6224 		addiu	$2,$3,-1 870 0650 000082AC 		sw	$2,%lo(scanstr)($4) 871 0654 0800E003 		j	$31 872 0658 FFFF6290 		lbu	$2,-1($3) 873              	 874              	$L145: 875              		.loc 1 327 0 876 065c 0000023C 		lui	$2,%hi(NOT_EOL) 877 0660 040040AC 		sw	$0,%lo(NOT_EOL)($2) 878              	$L147: 331:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 332:/mnt/hgfs/boot/booter/source/dprintf.c **** 	return EOF;
 879              		.loc 1 332 0 333:/mnt/hgfs/boot/booter/source/dprintf.c **** }
 880              		.loc 1 333 0 881 0664 0800E003 		j	$31 882 0668 FFFF0224 		li	$2,-1			# 0xffffffffffffffff 883              	 884              		.set	macro 885              		.set	reorder 886              	$LFE5: 887              		.end	sgetc 888              		.align	2 889              		.globl	index 890              		.ent	index 891              		.type	index, @function 892              	index: 893              	$LFB6: 334:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 335:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 336:/mnt/hgfs/boot/booter/source/dprintf.c **** /************************************************************************
 337:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 338:/mnt/hgfs/boot/booter/source/dprintf.c ****  *                          index
 339:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Description :
 340:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  -------------
 341:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 342:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Return values :
 343:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  ---------------
 344:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 345:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Return pointer to char c in string s, if it occurs, NUL otherwise.
 346:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 347:/mnt/hgfs/boot/booter/source/dprintf.c ****  ************************************************************************/
GAS LISTING /tmp/ccybp2uc.s 			page 23 348:/mnt/hgfs/boot/booter/source/dprintf.c **** char *
 349:/mnt/hgfs/boot/booter/source/dprintf.c **** index( char *s, int c)
 350:/mnt/hgfs/boot/booter/source/dprintf.c **** {
 894              		.loc 1 350 0 895              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 896              		.mask	0x00000000,0 897              		.fmask	0x00000000,0 898              		.set	noreorder 899              		.set	nomacro 900              		 351:/mnt/hgfs/boot/booter/source/dprintf.c **** 	int i;
 352:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 353:/mnt/hgfs/boot/booter/source/dprintf.c **** 	while ((i = *s) && (c != i))
 354:/mnt/hgfs/boot/booter/source/dprintf.c **** 		s++;
 901              		.loc 1 354 0 902 066c 00008390 		lbu	$3,0($4) 903 0670 00160300 		sll	$2,$3,24 904 0674 03160200 		sra	$2,$2,24 905 0678 09004010 		beq	$2,$0,$L151 906 067c 00000000 		nop 907              	 908              	$L156: 355:/mnt/hgfs/boot/booter/source/dprintf.c **** 	return (*s ? s : NUL);
 909              		.loc 1 355 0 910              		.loc 1 354 0 911 0680 0800A210 		beq	$5,$2,$L158 912 0684 001E0300 		sll	$3,$3,24 913              	 914 0688 01008424 		addiu	$4,$4,1 915 068c 00008390 		lbu	$3,0($4) 916 0690 00160300 		sll	$2,$3,24 917 0694 03160200 		sra	$2,$2,24 918 0698 F9FF4014 		bne	$2,$0,$L156 919 069c 00000000 		nop 920              	 921              	$L151: 922              		.loc 1 355 0 923 06a0 001E0300 		sll	$3,$3,24 924              	$L158: 925 06a4 031E0300 		sra	$3,$3,24 356:/mnt/hgfs/boot/booter/source/dprintf.c **** }
 926              		.loc 1 356 0 927 06a8 21100000 		move	$2,$0 928 06ac 0800E003 		j	$31 929 06b0 0B108300 		movn	$2,$4,$3 930              	 931              		.set	macro 932              		.set	reorder 933              	$LFE6: 934              		.end	index 935              		.align	2 936              		.ent	eatblanks 937              		.type	eatblanks, @function 938              	eatblanks: 939              	$LFB7: 357:/mnt/hgfs/boot/booter/source/dprintf.c ****  358:/mnt/hgfs/boot/booter/source/dprintf.c **** /************************************************************************
GAS LISTING /tmp/ccybp2uc.s 			page 24 359:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 360:/mnt/hgfs/boot/booter/source/dprintf.c ****  *                          eatblanks
 361:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Description :
 362:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  -------------
 363:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 364:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Get characters from input medium until no longer whitespace.
 365:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 366:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Return values :
 367:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  ---------------
 368:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 369:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  FALSE normally, or TRUE at end of line.
 370:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 371:/mnt/hgfs/boot/booter/source/dprintf.c ****  ************************************************************************/
 372:/mnt/hgfs/boot/booter/source/dprintf.c **** static BOOL
 373:/mnt/hgfs/boot/booter/source/dprintf.c **** eatblanks( int (*xgetc)() )     
 374:/mnt/hgfs/boot/booter/source/dprintf.c **** {
 940              		.loc 1 374 0 941              		.frame	$sp,48,$31		# vars= 0, regs= 8/0, args= 16, gp= 0 942              		.mask	0x807f0000,-4 943              		.fmask	0x00000000,0 944              		.set	noreorder 945              		.set	nomacro 946              		 947 06b4 D0FFBD27 		addiu	$sp,$sp,-48 948              	$LCFI22: 949 06b8 2800B6AF 		sw	$22,40($sp) 950              	$LCFI23: 951 06bc 2400B5AF 		sw	$21,36($sp) 952              	$LCFI24: 953 06c0 2000B4AF 		sw	$20,32($sp) 954              	$LCFI25: 955 06c4 1C00B3AF 		sw	$19,28($sp) 956              	$LCFI26: 957 06c8 1800B2AF 		sw	$18,24($sp) 958              	$LCFI27: 959 06cc 1400B1AF 		sw	$17,20($sp) 960              	$LCFI28: 961 06d0 1000B0AF 		sw	$16,16($sp) 962              	$LCFI29: 963 06d4 2C00BFAF 		sw	$31,44($sp) 964              	$LCFI30: 965              		.loc 1 374 0 966 06d8 21888000 		move	$17,$4 967 06dc 20001024 		li	$16,32			# 0x20 968 06e0 09001224 		li	$18,9			# 0x9 969 06e4 0A001324 		li	$19,10			# 0xa 970 06e8 0D001424 		li	$20,13			# 0xd 971 06ec 0C001524 		li	$21,12			# 0xc 972 06f0 0B001624 		li	$22,11			# 0xb 973              	$L168: 375:/mnt/hgfs/boot/booter/source/dprintf.c **** 	char c;
 376:/mnt/hgfs/boot/booter/source/dprintf.c **** 	
 377:/mnt/hgfs/boot/booter/source/dprintf.c **** 	while (1) 378:/mnt/hgfs/boot/booter/source/dprintf.c **** 	{ 379:/mnt/hgfs/boot/booter/source/dprintf.c **** 		c = (*xgetc)(NEXT); 974              		.loc 1 379 0 975 06f4 09F82002 		jal	$17GAS LISTING /tmp/ccybp2uc.s 			page 25 976 06f8 01000424 		li	$4,1			# 0x1 977              	 978 06fc 00160200 		sll	$2,$2,24 979 0700 03160200 		sra	$2,$2,24 380:/mnt/hgfs/boot/booter/source/dprintf.c **** 		if(!isspace(c))
 980              		.loc 1 380 0 981 0704 FBFF5010 		beq	$2,$16,$L168 982 0708 00000000 		nop 983              	 984 070c F9FF5210 		beq	$2,$18,$L168 985 0710 00000000 		nop 986              	 987 0714 F7FF5310 		beq	$2,$19,$L168 988 0718 00000000 		nop 989              	 990 071c F5FF5410 		beq	$2,$20,$L168 991 0720 00000000 		nop 992              	 993 0724 F3FF5510 		beq	$2,$21,$L168 994 0728 00000000 		nop 995              	 996 072c F1FF5610 		beq	$2,$22,$L168 997 0730 00000000 		nop 998              	 381:/mnt/hgfs/boot/booter/source/dprintf.c **** 			break;
 382:/mnt/hgfs/boot/booter/source/dprintf.c **** 	} 383:/mnt/hgfs/boot/booter/source/dprintf.c **** 	if ((*xgetc)(BACK) == EOF)
 999              		.loc 1 383 0 1000 0734 09F82002 		jal	$17 1001 0738 21200000 		move	$4,$0 1002              	 384:/mnt/hgfs/boot/booter/source/dprintf.c **** 		return TRUE;
 385:/mnt/hgfs/boot/booter/source/dprintf.c **** 	else
 386:/mnt/hgfs/boot/booter/source/dprintf.c **** 		return FALSE;
 387:/mnt/hgfs/boot/booter/source/dprintf.c **** }
 1003              		.loc 1 387 0 1004 073c 2C00BF8F 		lw	$31,44($sp) 1005 0740 2800B68F 		lw	$22,40($sp) 1006 0744 2400B58F 		lw	$21,36($sp) 1007 0748 2000B48F 		lw	$20,32($sp) 1008 074c 1C00B38F 		lw	$19,28($sp) 1009 0750 1800B28F 		lw	$18,24($sp) 1010 0754 1400B18F 		lw	$17,20($sp) 1011 0758 1000B08F 		lw	$16,16($sp) 1012              		.loc 1 384 0 1013 075c 27100200 		nor	$2,$0,$2 1014              		.loc 1 387 0 1015 0760 0100422C 		sltu	$2,$2,1 1016 0764 0800E003 		j	$31 1017 0768 3000BD27 		addiu	$sp,$sp,48 1018              	 1019              		.set	macro 1020              		.set	reorder 1021              	$LFE7: 1022              		.end	eatblanks 1023              		.data 1024              		.align	2GAS LISTING /tmp/ccybp2uc.s 			page 26 1025              		.type	digits.0, @object 1026              		.size	digits.0, 17 1027              	digits.0: 1028 0000 30313233 		.ascii	"0123456789abcdef\000" 1028      34353637  1028      38396162  1028      63646566  1028      00 1029 0011 00000000 		.section	.rodata.str1.4 1029      00000000  1029      00000000  1029      000000 1030 0031 000000   		.align	2 1031              	$LC3: 1032 0034 444F5845 		.ascii	"DOXEF\000" 1032      4600 1033 003a 0000     		.align	2 1034              	$LC4: 1035 003c 20090A00 		.ascii	" \t\n\000" 1036              		.section	.rodata.cst4,"aM",@progbits,4 1037              		.align	2 1038              	$LC5: 1039 0000 00000000 		.word	digits.0 1040              		.text 1041              		.align	2 1042              		.ent	unformat 1043              		.type	unformat, @function 1044              	unformat: 1045              	$LFB9: 388:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 389:/mnt/hgfs/boot/booter/source/dprintf.c **** /************************************************************************
 390:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 391:/mnt/hgfs/boot/booter/source/dprintf.c ****  *                          nxtnumber
 392:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Description :
 393:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  -------------
 394:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 395:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Get the ascii string of a number with given base from input
 396:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  medium, return its value.
 397:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 398:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Return values :
 399:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  ---------------
 400:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 401:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  See description above.
 402:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 403:/mnt/hgfs/boot/booter/source/dprintf.c ****  ************************************************************************/
 404:/mnt/hgfs/boot/booter/source/dprintf.c **** static long
 405:/mnt/hgfs/boot/booter/source/dprintf.c **** nxtnumber( int base, int (*xgetc)() )
 406:/mnt/hgfs/boot/booter/source/dprintf.c **** {
 407:/mnt/hgfs/boot/booter/source/dprintf.c **** 	int c;
 408:/mnt/hgfs/boot/booter/source/dprintf.c **** 	long value;
 409:/mnt/hgfs/boot/booter/source/dprintf.c **** 	BOOL minus;
 410:/mnt/hgfs/boot/booter/source/dprintf.c **** 	static char digits[] = "0123456789abcdef";
 411:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 412:/mnt/hgfs/boot/booter/source/dprintf.c **** 	if (width <= 0)
 413:/mnt/hgfs/boot/booter/source/dprintf.c **** 		return 0L;
 414:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 415:/mnt/hgfs/boot/booter/source/dprintf.c **** 	value = 0;
GAS LISTING /tmp/ccybp2uc.s 			page 27 416:/mnt/hgfs/boot/booter/source/dprintf.c **** 	minus = FALSE;
 417:/mnt/hgfs/boot/booter/source/dprintf.c **** 	if ((c = (*xgetc)(NEXT)) == '-')
 418:/mnt/hgfs/boot/booter/source/dprintf.c **** 	{ 419:/mnt/hgfs/boot/booter/source/dprintf.c **** 		minus = TRUE;
 420:/mnt/hgfs/boot/booter/source/dprintf.c **** 		--width;
 421:/mnt/hgfs/boot/booter/source/dprintf.c **** 	}
 422:/mnt/hgfs/boot/booter/source/dprintf.c **** 	else if (c == '+')
 423:/mnt/hgfs/boot/booter/source/dprintf.c **** 		--width;
 424:/mnt/hgfs/boot/booter/source/dprintf.c **** 	else
 425:/mnt/hgfs/boot/booter/source/dprintf.c **** 		(*xgetc)(BACK);
 426:/mnt/hgfs/boot/booter/source/dprintf.c **** 	while (width--)
 427:/mnt/hgfs/boot/booter/source/dprintf.c **** 	{ 428:/mnt/hgfs/boot/booter/source/dprintf.c **** 		c = (int)(index((char *)digits, tolower((*xgetc)(NEXT))) - (char *)digits); 429:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 430:/mnt/hgfs/boot/booter/source/dprintf.c **** 		if (c < 0 || c >= base)
 431:/mnt/hgfs/boot/booter/source/dprintf.c **** 		{       (*xgetc)(BACK);
 432:/mnt/hgfs/boot/booter/source/dprintf.c **** 			break;
 433:/mnt/hgfs/boot/booter/source/dprintf.c **** 		}
 434:/mnt/hgfs/boot/booter/source/dprintf.c **** 		value *= base;
 435:/mnt/hgfs/boot/booter/source/dprintf.c **** 		value += c;
 436:/mnt/hgfs/boot/booter/source/dprintf.c **** 	}
 437:/mnt/hgfs/boot/booter/source/dprintf.c **** 	return (minus ? -value : value);
 438:/mnt/hgfs/boot/booter/source/dprintf.c **** }
 439:/mnt/hgfs/boot/booter/source/dprintf.c **** 
 440:/mnt/hgfs/boot/booter/source/dprintf.c **** /************************************************************************
 441:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 442:/mnt/hgfs/boot/booter/source/dprintf.c ****  *                          unformat
 443:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Description :
 444:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  -------------
 445:/mnt/hgfs/boot/booter/source/dprintf.c ****  *
 446:/mnt/hgfs/boot/booter/source/dprintf.c ****  *  Perform scanf() on getch input medium, using format fmt and

⌨️ 快捷键说明

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