📄 dprintf.lst
字号:
444 0324 09F8A002 jal $21 445 0328 0400F726 addiu $23,$23,4 446 447 .loc 1 100 0 448 032c FFFF3126 addiu $17,$17,-1 449 .loc 1 97 0 450 0330 5B000008 j $L18 451 0334 21800000 move $16,$0 452 453 .set macro 454 .set reorder 455 $LFE3: 456 .end printf 457 .align 2 458 .globl sprintf 459 .ent sprintf 460 .type sprintf, @function 461 sprintf: 462 $LFB4: 149:/mnt/hgfs/boot/booter/source/dprintf.c **** } 150:/mnt/hgfs/boot/booter/source/dprintf.c **** 151:/mnt/hgfs/boot/booter/source/dprintf.c **** voidGAS LISTING /tmp/ccybp2uc.s page 12 152:/mnt/hgfs/boot/booter/source/dprintf.c **** sprintf (char *out, const char *fmt,...) 153:/mnt/hgfs/boot/booter/source/dprintf.c **** { 463 .loc 1 153 0 464 .frame $sp,96,$31 # vars= 40, regs= 10/0, args= 16, gp= 0 465 .mask 0xc0ff0000,-4 466 .fmask 0x00000000,0 467 .set noreorder 468 .set nomacro 469 470 0338 A0FFBD27 addiu $sp,$sp,-96 471 $LCFI11: 472 033c 4C00B5AF sw $21,76($sp) 473 $LCFI12: 474 0340 4400B3AF sw $19,68($sp) 475 $LCFI13: 476 0344 3C00B1AF sw $17,60($sp) 477 $LCFI14: 478 0348 3800B0AF sw $16,56($sp) 479 $LCFI15: 480 034c 5C00BFAF sw $31,92($sp) 481 $LCFI16: 482 0350 5800BEAF sw $fp,88($sp) 483 $LCFI17: 484 0354 5400B7AF sw $23,84($sp) 485 $LCFI18: 486 0358 5000B6AF sw $22,80($sp) 487 $LCFI19: 488 035c 4800B4AF sw $20,72($sp) 489 $LCFI20: 490 0360 4000B2AF sw $18,64($sp) 491 $LCFI21: 492 .loc 1 153 0 493 0364 2188A000 move $17,$5 154:/mnt/hgfs/boot/booter/source/dprintf.c **** va_list argp; 155:/mnt/hgfs/boot/booter/source/dprintf.c **** int *i; 156:/mnt/hgfs/boot/booter/source/dprintf.c **** char *charp; 157:/mnt/hgfs/boot/booter/source/dprintf.c **** int f1, pbi, ival; 158:/mnt/hgfs/boot/booter/source/dprintf.c **** int lzflag, rjust; 159:/mnt/hgfs/boot/booter/source/dprintf.c **** int c; 160:/mnt/hgfs/boot/booter/source/dprintf.c **** char pbuf[40]; 161:/mnt/hgfs/boot/booter/source/dprintf.c **** int col; 162:/mnt/hgfs/boot/booter/source/dprintf.c **** 163:/mnt/hgfs/boot/booter/source/dprintf.c **** va_start(argp,fmt); 164:/mnt/hgfs/boot/booter/source/dprintf.c **** col = 0; 165:/mnt/hgfs/boot/booter/source/dprintf.c **** while( c = *fmt++ ) 166:/mnt/hgfs/boot/booter/source/dprintf.c **** { 167:/mnt/hgfs/boot/booter/source/dprintf.c **** if( c == '%' ) 168:/mnt/hgfs/boot/booter/source/dprintf.c **** { 169:/mnt/hgfs/boot/booter/source/dprintf.c **** f1 = 0; 170:/mnt/hgfs/boot/booter/source/dprintf.c **** c = *fmt++; 171:/mnt/hgfs/boot/booter/source/dprintf.c **** if( c == '-' ) 172:/mnt/hgfs/boot/booter/source/dprintf.c **** { 173:/mnt/hgfs/boot/booter/source/dprintf.c **** rjust = 1; 174:/mnt/hgfs/boot/booter/source/dprintf.c **** c = *fmt++; 175:/mnt/hgfs/boot/booter/source/dprintf.c **** } 176:/mnt/hgfs/boot/booter/source/dprintf.c **** lzflag = (c == '0'); 177:/mnt/hgfs/boot/booter/source/dprintf.c **** while( isdigit(c) )GAS LISTING /tmp/ccybp2uc.s page 13 178:/mnt/hgfs/boot/booter/source/dprintf.c **** { 179:/mnt/hgfs/boot/booter/source/dprintf.c **** f1 = f1 * 10 + c - '0'; 180:/mnt/hgfs/boot/booter/source/dprintf.c **** c = *fmt++; 181:/mnt/hgfs/boot/booter/source/dprintf.c **** } 182:/mnt/hgfs/boot/booter/source/dprintf.c **** 183:/mnt/hgfs/boot/booter/source/dprintf.c **** if( c == 'x' ) 184:/mnt/hgfs/boot/booter/source/dprintf.c **** { 185:/mnt/hgfs/boot/booter/source/dprintf.c **** i = (int *)va_arg(argp,int); 186:/mnt/hgfs/boot/booter/source/dprintf.c **** pbi = fmtnum(pbuf,(int)i,16,"0123456789abcdef"); 187:/mnt/hgfs/boot/booter/source/dprintf.c **** } 188:/mnt/hgfs/boot/booter/source/dprintf.c **** else if( c == 'X' ) 189:/mnt/hgfs/boot/booter/source/dprintf.c **** { 190:/mnt/hgfs/boot/booter/source/dprintf.c **** i = (int *)va_arg(argp,int); 191:/mnt/hgfs/boot/booter/source/dprintf.c **** pbi = fmtnum(pbuf,(int)i,16,"0123456789ABCDEF"); 192:/mnt/hgfs/boot/booter/source/dprintf.c **** } 193:/mnt/hgfs/boot/booter/source/dprintf.c **** else if( c == 'd' || c == 'D' ) 194:/mnt/hgfs/boot/booter/source/dprintf.c **** { 195:/mnt/hgfs/boot/booter/source/dprintf.c **** i = (int *)va_arg(argp,int); 196:/mnt/hgfs/boot/booter/source/dprintf.c **** ival = (int)i; 197:/mnt/hgfs/boot/booter/source/dprintf.c **** if( ival < 0 ) 198:/mnt/hgfs/boot/booter/source/dprintf.c **** { 199:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = '-'; 200:/mnt/hgfs/boot/booter/source/dprintf.c **** ival = -ival; 201:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 202:/mnt/hgfs/boot/booter/source/dprintf.c **** } 203:/mnt/hgfs/boot/booter/source/dprintf.c **** pbi = fmtnum(pbuf,ival,10,"0123456789"); 204:/mnt/hgfs/boot/booter/source/dprintf.c **** } 205:/mnt/hgfs/boot/booter/source/dprintf.c **** else if( c == 'c' ) 206:/mnt/hgfs/boot/booter/source/dprintf.c **** { 207:/mnt/hgfs/boot/booter/source/dprintf.c **** i = (int *)va_arg(argp,int); 208:/mnt/hgfs/boot/booter/source/dprintf.c **** pbi = 0; 209:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = *i; 210:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 211:/mnt/hgfs/boot/booter/source/dprintf.c **** --f1; 212:/mnt/hgfs/boot/booter/source/dprintf.c **** } 213:/mnt/hgfs/boot/booter/source/dprintf.c **** else if( c == 's' || c == 'S' ) 214:/mnt/hgfs/boot/booter/source/dprintf.c **** { 215:/mnt/hgfs/boot/booter/source/dprintf.c **** i = (int *)va_arg(argp,int); 216:/mnt/hgfs/boot/booter/source/dprintf.c **** pbi = 0; 217:/mnt/hgfs/boot/booter/source/dprintf.c **** charp = (char *)(i); 218:/mnt/hgfs/boot/booter/source/dprintf.c **** while( *charp ) 219:/mnt/hgfs/boot/booter/source/dprintf.c **** { 220:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = *charp++; 221:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 222:/mnt/hgfs/boot/booter/source/dprintf.c **** --f1; 223:/mnt/hgfs/boot/booter/source/dprintf.c **** } 224:/mnt/hgfs/boot/booter/source/dprintf.c **** } 225:/mnt/hgfs/boot/booter/source/dprintf.c **** else if( c == 't' || c == 'T' ) 226:/mnt/hgfs/boot/booter/source/dprintf.c **** { 227:/mnt/hgfs/boot/booter/source/dprintf.c **** pbi = 0; 228:/mnt/hgfs/boot/booter/source/dprintf.c **** while( col < f1 ) 229:/mnt/hgfs/boot/booter/source/dprintf.c **** { 230:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = ' '; 231:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 232:/mnt/hgfs/boot/booter/source/dprintf.c **** } 233:/mnt/hgfs/boot/booter/source/dprintf.c **** f1 = 0; 234:/mnt/hgfs/boot/booter/source/dprintf.c **** }GAS LISTING /tmp/ccybp2uc.s page 14 235:/mnt/hgfs/boot/booter/source/dprintf.c **** 236:/mnt/hgfs/boot/booter/source/dprintf.c **** f1 -= pbi; 237:/mnt/hgfs/boot/booter/source/dprintf.c **** while( f1 > 0 ) 238:/mnt/hgfs/boot/booter/source/dprintf.c **** { 239:/mnt/hgfs/boot/booter/source/dprintf.c **** if( lzflag ) 240:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = '0'; 241:/mnt/hgfs/boot/booter/source/dprintf.c **** else 242:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = ' '; 243:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 244:/mnt/hgfs/boot/booter/source/dprintf.c **** --f1; 245:/mnt/hgfs/boot/booter/source/dprintf.c **** } 246:/mnt/hgfs/boot/booter/source/dprintf.c **** 247:/mnt/hgfs/boot/booter/source/dprintf.c **** while( pbi > 0 ) 248:/mnt/hgfs/boot/booter/source/dprintf.c **** { 249:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = pbuf[--pbi]; 250:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 251:/mnt/hgfs/boot/booter/source/dprintf.c **** } 252:/mnt/hgfs/boot/booter/source/dprintf.c **** } 253:/mnt/hgfs/boot/booter/source/dprintf.c **** else 254:/mnt/hgfs/boot/booter/source/dprintf.c **** { 255:/mnt/hgfs/boot/booter/source/dprintf.c **** *out++ = c; 256:/mnt/hgfs/boot/booter/source/dprintf.c **** ++col; 494 .loc 1 256 0 495 0368 0000A580 lb $5,0($5) 496 .loc 1 153 0 497 036c 21808000 move $16,$4 498 0370 6800A6AF sw $6,104($sp) 499 0374 6C00A7AF sw $7,108($sp) 500 .loc 1 256 0 501 0378 01003126 addiu $17,$17,1 502 .loc 1 163 0 503 037c 6800B527 addiu $21,$sp,104 504 .loc 1 164 0 505 .loc 1 256 0 506 0380 4300A010 beq $5,$0,$L117 507 0384 21980000 move $19,$0 508 509 0388 2D001E24 li $fp,45 # 0x2d 510 038c FCFF1724 li $23,-4 # 0xfffffffffffffffc 511 0390 EC000008 j $L115 512 0394 1000B627 addiu $22,$sp,16 513 514 $L80: 515 .loc 1 255 0 516 0398 000005A2 sb $5,0($16) 517 .loc 1 256 0 518 039c 01007326 addiu $19,$19,1 519 .loc 1 255 0 520 03a0 01001026 addiu $16,$16,1 521 .loc 1 256 0 522 03a4 00002582 lb $5,0($17) 523 $L140: 524 03a8 3900A010 beq $5,$0,$L117 525 03ac 01003126 addiu $17,$17,1 526 527 $L115: 528 .loc 1 167 0GAS LISTING /tmp/ccybp2uc.s page 15 529 03b0 25000224 li $2,37 # 0x25 530 .loc 1 169 0 531 .loc 1 167 0 532 03b4 F8FFA214 bne $5,$2,$L80 533 03b8 21900000 move $18,$0 534 535 .loc 1 170 0 536 03bc 00002582 lb $5,0($17) 537 .loc 1 171 0 538 03c0 3000BE10 beq $5,$fp,$L132 539 03c4 01003126 addiu $17,$17,1 540 541 $L81: 542 .loc 1 180 0 543 03c8 D0FFA224 addiu $2,$5,-48 544 .loc 1 176 0 545 03cc 3000A338 xori $3,$5,0x30 546 .loc 1 180 0 547 03d0 0A00422C sltu $2,$2,10 548 .loc 1 176 0 549 03d4 FF000008 j $L128 550 03d8 0100742C sltu $20,$3,1 551 552 $L133: 553 .loc 1 179 0 554 03dc 21105200 addu $2,$2,$18 555 03e0 40100200 sll $2,$2,1 556 03e4 21104500 addu $2,$2,$5 557 .loc 1 180 0 558 03e8 00002582 lb $5,0($17) 559 .loc 1 179 0 560 03ec D0FF5224 addiu $18,$2,-48 561 .loc 1 180 0 562 03f0 01003126 addiu $17,$17,1 563 03f4 D0FFA224 addiu $2,$5,-48 564 03f8 0A00422C sltu $2,$2,10 565 $L128: 566 .loc 1 179 0 567 .loc 1 180 0 568 03fc F7FF4014 bne $2,$0,$L133 569 0400 80101200 sll $2,$18,2 570 571 .loc 1 183 0 572 0404 78000224 li $2,120 # 0x78 573 .loc 1 188 0 574 .loc 1 183 0 575 0408 5600A210 beq $5,$2,$L134 576 040c 58000224 li $2,88 # 0x58 577 578 .loc 1 193 0 579 .loc 1 188 0 580 0410 6F00A210 beq $5,$2,$L135 581 0414 64000224 li $2,100 # 0x64 582 583 .loc 1 193 0 584 0418 2A00A210 beq $5,$2,$L90 585 041c 44000224 li $2,68 # 0x44GAS LISTING /tmp/ccybp2uc.s page 16 586 587 .loc 1 205 0 588 .loc 1 193 0 589 0420 2800A210 beq $5,$2,$L90 590 0424 63000224 li $2,99 # 0x63 591 592 .loc 1 213 0 593 .loc 1 205 0 594 0428 6F00A210 beq $5,$2,$L136 595 042c 73000224 li $2,115 # 0x73 596 597 .loc 1 215 0 598 .loc 1 213 0 599 0430 5700A210 beq $5,$2,$L142 600 0434 0300A226 addiu $2,$21,3 601 602 0438 53000224 li $2,83 # 0x53 603 .loc 1 215 0 604 .loc 1 213 0 605 043c 5400A210 beq $5,$2,$L96 606 0440 0300A226 addiu $2,$21,3 607 608 .loc 1 225 0 609 0444 74000224 li $2,116 # 0x74 610 0448 0300A210 beq $5,$2,$L102 611 044c 54000224 li $2,84 # 0x54 612 613 0450 2C00A214 bne $5,$2,$L86 614 0454 00000000 nop 615 616 $L102: 617 .loc 1 231 0 618 0458 2A107202 slt $2,$19,$18 619 .loc 1 227 0 620 .loc 1 231 0 621 045c 07004010 beq $2,$0,$L123 622 0460 21400000 move $8,$0 623 624 0464 20000324 li $3,32 625 $L105: 626 0468 01007326 addiu $19,$19,1 627 046c 2A107202 slt $2,$19,$18 628 .loc 1 230 0 629 0470 000003A2 sb $3,0($16) 630 .loc 1 231 0 631 0474 FCFF4014 bne $2,$0,$L105 632 0478 01001026 addiu $16,$16,1 633 634 $L123: 635 .loc 1 233 0 636 047c 41010008 j $L86 637 0480 21900000 move $18,$0 638 639 $L132:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -