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

📄 fat.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 537              		.type	getNextCluster, @function 538              	getNextCluster: 539              	$LFB5: 223:/mnt/hgfs/boot/booter/source/applications/booter/fat.c ****  224:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** int getNextCluster(int currentCluster) 225:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** { 540              		.loc 1 225 0 541              		.frame	$sp,48,$31		# vars= 0, regs= 7/0, args= 16, gp= 0 542              		.mask	0x803f0000,-8 543              		.fmask	0x00000000,0 544              		.set	noreorder 545              		.set	nomacro 546              		 547 036c D0FFBD27 		addiu	$sp,$sp,-48 548              	$LCFI11: 226:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	int FATOffset, ThisFATSecNum, ThisFATEntOffset, next; 227:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	next = 0; 228:/mnt/hgfs/boot/booter/source/applications/booter/fat.c ****  229:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	switch(fat.type) 549              		.loc 1 229 0 550 0370 0000063C 		lui	$6,%hi(fat) 551              		.loc 1 225 0 552 0374 2400B5AF 		sw	$21,36($sp) 553              	$LCFI12: 554 0378 2000B4AF 		sw	$20,32($sp) 555              	$LCFI13: 556              		.loc 1 229 0 557 037c 0000C224 		addiu	$2,$6,%lo(fat) 558              		.loc 1 225 0 559 0380 2800BFAF 		sw	$31,40($sp) 560              	$LCFI14: 561 0384 1C00B3AF 		sw	$19,28($sp) 562              	$LCFI15: 563 0388 1800B2AF 		sw	$18,24($sp) 564              	$LCFI16: 565 038c 1400B1AF 		sw	$17,20($sp) 566              	$LCFI17: 567 0390 1000B0AF 		sw	$16,16($sp) 568              	$LCFI18: 569              		.loc 1 229 0 570 0394 3402438C 		lw	$3,564($2) 571 0398 02000224 		li	$2,2			# 0x2 572              		.loc 1 225 0 573 039c 21A88000 		move	$21,$4 574              		.loc 1 227 0 575              		.loc 1 229 0 576 03a0 52006210 		beq	$3,$2,$L36 577 03a4 21A00000 		move	$20,$0 578              	 579 03a8 0300622C 		sltu	$2,$3,3 580 03ac 2D004014 		bne	$2,$0,$L49 581 03b0 01000224 		li	$2,1			# 0x1 582              	 583 03b4 03000224 		li	$2,3			# 0x3GAS LISTING /tmp/ccZKkRKo.s 			page 17 584 03b8 78006210 		beq	$3,$2,$L37 585 03bc 00000000 		nop 586              	 587              	$L34: 230:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	{ 231:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		case FAT12: FATOffset = currentCluster * 3 / 2; break; 232:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		case FAT16: FATOffset = currentCluster * 2; break; 233:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		case FAT32: FATOffset = currentCluster * 4; break; 234:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	} 235:/mnt/hgfs/boot/booter/source/applications/booter/fat.c ****  236:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	ThisFATSecNum = fat.reservedSectorCount + (FATOffset / fat.bytesPerSector); 588              		.loc 1 236 0 589 03c0 0000D124 		addiu	$17,$6,%lo(fat) 590              	$L52: 591 03c4 0002228E 		lw	$2,512($17) 592 03c8 0402238E 		lw	$3,516($17) 237:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	ThisFATEntOffset = FATOffset % fat.bytesPerSector; 238:/mnt/hgfs/boot/booter/source/applications/booter/fat.c ****  239:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	if(fatCachedSector != ThisFATSecNum)	//is FAT sector cached? 593              		.loc 1 239 0 594 03cc 0000123C 		lui	$18,%hi(fatCachedSector) 595              		.loc 1 236 0 596 03d0 1A00A200 		div	$0,$5,$2 597 03d4 02004014 		bne	$2,$0,1f 598 03d8 00000000 		nop 599 03dc 0D000700 		break	7 600              	1: 601              		.loc 1 239 0 602 03e0 0000448E 		lw	$4,%lo(fatCachedSector)($18) 603              		.loc 1 236 0 604 03e4 12100000 		mflo	$2 605 03e8 21806200 		addu	$16,$3,$2 606 03ec 10980000 		mfhi	$19 240:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	{		 241:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		fatDiskFunctions.read(fat.rootSector + ThisFATSecNum, 1, (void*)fatTableCache);	//read FAT table  607              		.loc 1 241 0 608              		.loc 1 239 0 609 03f0 0A009010 		beq	$4,$16,$L39 610 03f4 0000033C 		lui	$3,%hi(fatDiskFunctions+8) 611              	 612              		.loc 1 241 0 613 03f8 3C02248E 		lw	$4,572($17) 614 03fc 0800628C 		lw	$2,%lo(fatDiskFunctions+8)($3) 615 0400 0000063C 		lui	$6,%hi(fatTableCache) 616 0404 21209000 		addu	$4,$4,$16 617 0408 0000C624 		addiu	$6,$6,%lo(fatTableCache) 618 040c 09F84000 		jal	$2 619 0410 01000524 		li	$5,1			# 0x1 620              	 242:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		fatCachedSector = ThisFATSecNum; 621              		.loc 1 242 0 622 0414 21200002 		move	$4,$16 623 0418 000050AE 		sw	$16,%lo(fatCachedSector)($18) 624              	$L39: 243:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	} 244:/mnt/hgfs/boot/booter/source/applications/booter/fat.c ****  245:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	switch(fat.type)GAS LISTING /tmp/ccZKkRKo.s 			page 18 625              		.loc 1 245 0 626 041c 3402238E 		lw	$3,564($17) 627 0420 02000224 		li	$2,2			# 0x2 628 0424 33006210 		beq	$3,$2,$L46 629 0428 0300622C 		sltu	$2,$3,3 630              	 631 042c 15004010 		beq	$2,$0,$L48 632 0430 03000224 		li	$2,3			# 0x3 633              	 634 0434 01000224 		li	$2,1			# 0x1 246:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	{ 247:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		case FAT12: 248:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			if(ThisFATEntOffset == (fat.bytesPerSector - 1)) 249:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			{ 250:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				next = fatTableCache[ThisFATEntOffset] & 0x0ff; 251:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				fatCachedSector++; 252:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				fatDiskFunctions.read(fat.rootSector + fatCachedSector, 1, (void*)fatTableCache); 253:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				next |= (fatTableCache[0] & 0x0ff) << 8; 254:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			} 255:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			else 256:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			{ 257:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				next = ((fatTableCache[ThisFATEntOffset+1] & 0x0ff) << 8) | (fatTableCache[ThisFATEntOffset] &  258:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			} 259:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			if(currentCluster & 1) 260:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				next >>= 4; 261:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			else 262:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 				next &= 0x0fff; 263:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			break; 264:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		case FAT16: 265:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			next = ((fatTableCache[ThisFATEntOffset+1] & 0x0ff) << 8) | (fatTableCache[ThisFATEntOffset] & 0 266:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			break; 267:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 		case FAT32: 268:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			next = ((fatTableCache[ThisFATEntOffset+3] & 0x00f) << 24) | ((fatTableCache[ThisFATEntOffset+2] 269:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 			break; 270:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	} 271:/mnt/hgfs/boot/booter/source/applications/booter/fat.c ****  272:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** 	return next; 273:/mnt/hgfs/boot/booter/source/applications/booter/fat.c **** } 635              		.loc 1 273 0 636              		.loc 1 245 0 637 0438 3F006210 		beq	$3,$2,$L41 638 043c 21108002 		move	$2,$20 639              	 640              	$L53: 641              		.loc 1 273 0 642 0440 2800BF8F 		lw	$31,40($sp) 643 0444 2400B58F 		lw	$21,36($sp) 644 0448 2000B48F 		lw	$20,32($sp) 645 044c 1C00B38F 		lw	$19,28($sp) 646 0450 1800B28F 		lw	$18,24($sp) 647 0454 1400B18F 		lw	$17,20($sp) 648 0458 1000B08F 		lw	$16,16($sp) 649 045c 0800E003 		j	$31 650 0460 3000BD27 		addiu	$sp,$sp,48 651              	 652              	$L49: 653              		.loc 1 236 0GAS LISTING /tmp/ccZKkRKo.s 			page 19 654              		.loc 1 229 0 655 0464 D7FF6214 		bne	$3,$2,$L52 656 0468 0000D124 		addiu	$17,$6,%lo(fat) 657              	 658              		.loc 1 231 0 659 046c 40100400 		sll	$2,$4,1 660 0470 21104400 		addu	$2,$2,$4 661 0474 C21F0200 		srl	$3,$2,31 662 0478 21104300 		addu	$2,$2,$3 663 047c F1000008 		j	$L52 664 0480 43280200 		sra	$5,$2,1 665              	 666              	$L48: 667              		.loc 1 273 0 668              		.loc 1 245 0 669 0484 EEFF6214 		bne	$3,$2,$L53 670 0488 21108002 		move	$2,$20 671              	 672              		.loc 1 268 0 673 048c 0000023C 		lui	$2,%hi(fatTableCache) 674 0490 00004224 		addiu	$2,$2,%lo(fatTableCache) 675 0494 21106202 		addu	$2,$19,$2 676 0498 03004390 		lbu	$3,3($2) 677 049c 02004490 		lbu	$4,2($2) 678 04a0 01004590 		lbu	$5,1($2) 679 04a4 0F006330 		andi	$3,$3,0xf 680 04a8 00004690 		lbu	$6,0($2) 681 04ac 001E0300 		sll	$3,$3,24 682 04b0 00240400 		sll	$4,$4,16 683 04b4 25186400 		or	$3,$3,$4 684 04b8 002A0500 		sll	$5,$5,8 685 04bc 25186500 		or	$3,$3,$5 686 04c0 25A06600 		or	$20,$3,$6 687              		.loc 1 273 0 688 04c4 21108002 		move	$2,$20 689 04c8 2800BF8F 		lw	$31,40($sp) 690 04cc 2400B58F 		lw	$21,36($sp) 691 04d0 2000B48F 		lw	$20,32($sp) 692 04d4 1C00B38F 		lw	$19,28($sp) 693 04d8 1800B28F 		lw	$18,24($sp) 694 04dc 1400B18F 		lw	$17,20($sp) 695 04e0 1000B08F 		lw	$16,16($sp) 696 04e4 0800E003 		j	$31 697 04e8 3000BD27 		addiu	$sp,$sp,48 698              	 699              	$L36: 700              		.loc 1 232 0 701 04ec F0000008 		j	$L34 702 04f0 40280400 		sll	$5,$4,1 703              	 704              	$L46: 705              		.loc 1 265 0 706 04f4 0000023C 		lui	$2,%hi(fatTableCache) 707 04f8 00004224 		addiu	$2,$2,%lo(fatTableCache) 708 04fc 21106202 		addu	$2,$19,$2 709 0500 01004390 		lbu	$3,1($2) 710 0504 00004490 		lbu	$4,0($2)GAS LISTING /tmp/ccZKkRKo.s 			page 20 711              		.loc 1 273 0 712 0508 2800BF8F 		lw	$31,40($sp) 713              		.loc 1 265 0 714 050c 001A0300 		sll	$3,$3,8 715 0510 25A06400 		or	$20,$3,$4 716              		.loc 1 273 0 717 0514 21108002 		move	$2,$20 718 0518 2400B58F 		lw	$21,36($sp) 719 051c 2000B48F 		lw	$20,32($sp) 720 0520 1C00B38F 		lw	$19,28($sp) 721 0524 1800B28F 		lw	$18,24($sp) 722 0528 1400B18F 		lw	$17,20($sp) 723 052c 1000B08F 		lw	$16,16($sp) 724 0530 0800E003 		j	$31 725 0534 3000BD27 		addiu	$sp,$sp,48 726              	 727              	$L41: 728              		.loc 1 248 0 729 0538 0002228E 		lw	$2,512($17) 730 053c FFFF4224 		addiu	$2,$2,-1 731              		.loc 1 257 0 732              		.loc 1 248 0 733 0540 18005310 		beq	$2,$19,$L50 734 0544 0000023C 		lui	$2,%hi(fatTableCache) 735              	 736              		.loc 1 257 0 737 0548 00004224 		addiu	$2,$2,%lo(fatTableCache) 738 054c 21106202 		addu	$2,$19,$2 739 0550 01004390 		lbu	$3,1($2) 740 0554 00004490 		lbu	$4,0($2) 741 0558 001A0300 		sll	$3,$3,8 742 055c 25A06400 		or	$20,$3,$4 743              		.loc 1 260 0 744 0560 03111400 		sra	$2,$20,4 745 0564 FF0F8332 		andi	$3,$20,0xfff 746              		.loc 1 259 0 747 0568 0100A432 		andi	$4,$21,0x1 748              		.loc 1 260 0 749 056c 21A04000 		move	$20,$2 750 0570 0AA06400 		movz	$20,$3,$4 751              	$L51: 752              		.loc 1 273 0 753 0574 21108002 		move	$2,$20 754 0578 2800BF8F 		lw	$31,40($sp) 755 057c 2400B58F 		lw	$21,36($sp) 756 0580 2000B48F 		lw	$20,32($sp) 757 0584 1C00B38F 		lw	$19,28($sp) 758 0588 1800B28F 		lw	$18,24($sp) 759 058c 1400B18F 		lw	$17,20($sp) 760 0590 1000B08F 		lw	$16,16($sp) 761 0594 0800E003 		j	$31 762 0598 3000BD27 		addiu	$sp,$sp,48 763              	 764              	$L37: 765              		.loc 1 233 0 766 059c F0000008 		j	$L34 767 05a0 80280400 		sll	$5,$4,2GAS LISTING /tmp/ccZKkRKo.s 			page 21 768              	 769              	$L50: 770              		.loc 1 252 0 771 05a4 3C02258E 		lw	$5,572($17) 772 05a8 0000033C 		lui	$3,%hi(fatDiskFunctions+8)

⌨️ 快捷键说明

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