www.pudn.com > LPC1768_SD_Test.rar > retarget.txt, change:2010-03-29,size:13861b


; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision 
; commandline ArmCC [--debug -c --asm --interleave -o.\Obj\retarget.o --depend=.\Obj\retarget.d --device=DARMP1 --apcs=interwork -O0 -IC:\Keil\ARM\INC\NXP -DSTDIO --omf_browse=.\Obj\retarget.crf Retarget.c] 
                          THUMB 
 
                          AREA ||.text||, CODE, READONLY, ALIGN=2 
 
                  sendchar PROC 
;;;42      *----------------------------------------------------------------------------*/ 
;;;43     int sendchar (int c) { 
000000  b510              PUSH     {r4,lr} 
000002  4604              MOV      r4,r0 
;;;44      
;;;45       if (c == '\n')  { 
000004  2c0a              CMP      r4,#0xa 
000006  d103              BNE      |L1.16| 
;;;46         SER_putChar (1, 0x0D); 
000008  210d              MOVS     r1,#0xd 
00000a  2001              MOVS     r0,#1 
00000c  f7fffffe          BL       SER_putChar 
                  |L1.16| 
;;;47       } 
;;;48       SER_putChar (1, c); 
000010  4621              MOV      r1,r4 
000012  2001              MOVS     r0,#1 
000014  f7fffffe          BL       SER_putChar 
;;;49      
;;;50       return (c); 
000018  4620              MOV      r0,r4 
;;;51     } 
00001a  bd10              POP      {r4,pc} 
;;;52      
                          ENDP 
 
                  getkey PROC 
;;;56      *----------------------------------------------------------------------------*/ 
;;;57     int getkey (void) { 
00001c  b510              PUSH     {r4,lr} 
;;;58      
;;;59       return (SER_getChar(1)); 
00001e  2001              MOVS     r0,#1 
000020  f7fffffe          BL       SER_getChar 
;;;60     } 
000024  bd10              POP      {r4,pc} 
;;;61     #endif 
                          ENDP 
 
                  _ttywrch PROC 
;;;64      
;;;65     void _ttywrch (int ch) { 
000026  b510              PUSH     {r4,lr} 
000028  4604              MOV      r4,r0 
;;;66     #ifdef STDIO 
;;;67        sendchar(ch); 
00002a  4620              MOV      r0,r4 
00002c  f7fffffe          BL       sendchar 
;;;68     #endif 
;;;69     } 
000030  bd10              POP      {r4,pc} 
;;;70      
                          ENDP 
 
                  _sys_open PROC 
;;;72      
;;;73     FILEHANDLE _sys_open (const char *name, int openmode) { 
000032  b570              PUSH     {r4-r6,lr} 
000034  4604              MOV      r4,r0 
000036  460d              MOV      r5,r1 
;;;74        /* Register standard Input Output devices. */ 
;;;75        if (strcmp(name, "STDIN") == 0) { 
000038  a151              ADR      r1,|L1.384| 
00003a  4620              MOV      r0,r4 
00003c  f7fffffe          BL       strcmp 
000040  b910              CBNZ     r0,|L1.72| 
;;;76           return (STDIN); 
000042  f2480001          MOV      r0,#0x8001 
                  |L1.70| 
;;;77        } 
;;;78        if (strcmp(name, "STDOUT") == 0) { 
;;;79           return (STDOUT); 
;;;80        } 
;;;81        if (strcmp(name, "STDERR") == 0) { 
;;;82           return (STDERR); 
;;;83        } 
;;;84        return (__fopen (name, openmode)); 
;;;85     } 
000046  bd70              POP      {r4-r6,pc} 
                  |L1.72| 
000048  a14f              ADR      r1,|L1.392| 
00004a  4620              MOV      r0,r4                 ;78 
00004c  f7fffffe          BL       strcmp 
000050  b910              CBNZ     r0,|L1.88| 
000052  f2480002          MOV      r0,#0x8002            ;79 
000056  e7f6              B        |L1.70| 
                  |L1.88| 
000058  a14d              ADR      r1,|L1.400| 
00005a  4620              MOV      r0,r4                 ;81 
00005c  f7fffffe          BL       strcmp 
000060  b910              CBNZ     r0,|L1.104| 
000062  f2480003          MOV      r0,#0x8003            ;82 
000066  e7ee              B        |L1.70| 
                  |L1.104| 
000068  4629              MOV      r1,r5                 ;84 
00006a  4620              MOV      r0,r4                 ;84 
00006c  f7fffffe          BL       __fopen 
000070  e7e9              B        |L1.70| 
;;;86      
                          ENDP 
 
                  _sys_close PROC 
;;;88      
;;;89     int _sys_close (FILEHANDLE fh) { 
000072  b510              PUSH     {r4,lr} 
000074  4604              MOV      r4,r0 
;;;90        if (fh > 0x8000) { 
000076  f5b44f00          CMP      r4,#0x8000 
00007a  dd01              BLE      |L1.128| 
;;;91           return (0); 
00007c  2000              MOVS     r0,#0 
                  |L1.126| 
;;;92        } 
;;;93        return (__fclose (fh)); 
;;;94     } 
00007e  bd10              POP      {r4,pc} 
                  |L1.128| 
000080  4620              MOV      r0,r4                 ;93 
000082  f7fffffe          BL       __fclose 
000086  e7fa              B        |L1.126| 
;;;95      
                          ENDP 
 
                  _sys_write PROC 
;;;97      
;;;98     int _sys_write (FILEHANDLE fh, const U8 *buf, U32 len, int mode) { 
000088  e92d41f0          PUSH     {r4-r8,lr} 
00008c  4604              MOV      r4,r0 
00008e  460d              MOV      r5,r1 
000090  4616              MOV      r6,r2 
000092  461f              MOV      r7,r3 
;;;99     #ifdef STDIO 
;;;100       if (fh == STDOUT) { 
000094  f5a44000          SUB      r0,r4,#0x8000 
000098  3802              SUBS     r0,#2 
00009a  d10a              BNE      |L1.178| 
;;;101          /* Standard Output device. */ 
;;;102          for (  ; len; len--) { 
00009c  e004              B        |L1.168| 
                  |L1.158| 
;;;103             sendchar (*buf++); 
00009e  f8150b01          LDRB     r0,[r5],#1 
0000a2  f7fffffe          BL       sendchar 
0000a6  1e76              SUBS     r6,r6,#1              ;102 
                  |L1.168| 
0000a8  2e00              CMP      r6,#0                 ;102 
0000aa  d1f8              BNE      |L1.158| 
;;;104          } 
;;;105          return (0); 
0000ac  2000              MOVS     r0,#0 
                  |L1.174| 
;;;106       } 
;;;107    #endif 
;;;108       if (fh > 0x8000) { 
;;;109          return (-1); 
;;;110       } 
;;;111       return (__write (fh, buf, len)); 
;;;112    } 
0000ae  e8bd81f0          POP      {r4-r8,pc} 
                  |L1.178| 
0000b2  f5b44f00          CMP      r4,#0x8000            ;108 
0000b6  dd02              BLE      |L1.190| 
0000b8  f04f30ff          MOV      r0,#0xffffffff        ;109 
0000bc  e7f7              B        |L1.174| 
                  |L1.190| 
0000be  4632              MOV      r2,r6                 ;111 
0000c0  4629              MOV      r1,r5                 ;111 
0000c2  4620              MOV      r0,r4                 ;111 
0000c4  f7fffffe          BL       __write 
0000c8  e7f1              B        |L1.174| 
;;;113     
                          ENDP 
 
                  _sys_read PROC 
;;;115     
;;;116    int _sys_read (FILEHANDLE fh, U8 *buf, U32 len, int mode) { 
0000ca  e92d41f0          PUSH     {r4-r8,lr} 
0000ce  4604              MOV      r4,r0 
0000d0  460d              MOV      r5,r1 
0000d2  4616              MOV      r6,r2 
0000d4  461f              MOV      r7,r3 
;;;117    #ifdef STDIO 
;;;118       if (fh == STDIN) { 
0000d6  f2480001          MOV      r0,#0x8001 
0000da  4284              CMP      r4,r0 
0000dc  d10a              BNE      |L1.244| 
;;;119          /* Standard Input device. */ 
;;;120          for (  ; len; len--) { 
0000de  e004              B        |L1.234| 
                  |L1.224| 
;;;121             *buf++ = getkey (); 
0000e0  f7fffffe          BL       getkey 
0000e4  f8050b01          STRB     r0,[r5],#1 
0000e8  1e76              SUBS     r6,r6,#1              ;120 
                  |L1.234| 
0000ea  2e00              CMP      r6,#0                 ;120 
0000ec  d1f8              BNE      |L1.224| 
;;;122          } 
;;;123          return (0); 
0000ee  2000              MOVS     r0,#0 
                  |L1.240| 
;;;124       } 
;;;125    #endif 
;;;126       if (fh > 0x8000) { 
;;;127          return (-1); 
;;;128       } 
;;;129       return (__read (fh, buf, len)); 
;;;130    } 
0000f0  e8bd81f0          POP      {r4-r8,pc} 
                  |L1.244| 
0000f4  f5b44f00          CMP      r4,#0x8000            ;126 
0000f8  dd02              BLE      |L1.256| 
0000fa  f04f30ff          MOV      r0,#0xffffffff        ;127 
0000fe  e7f7              B        |L1.240| 
                  |L1.256| 
000100  4632              MOV      r2,r6                 ;129 
000102  4629              MOV      r1,r5                 ;129 
000104  4620              MOV      r0,r4                 ;129 
000106  f7fffffe          BL       __read 
00010a  e7f1              B        |L1.240| 
;;;131     
                          ENDP 
 
                  _sys_istty PROC 
;;;133     
;;;134    int _sys_istty (FILEHANDLE fh) { 
00010c  4601              MOV      r1,r0 
;;;135       if (fh > 0x8000) { 
00010e  f5b14f00          CMP      r1,#0x8000 
000112  dd01              BLE      |L1.280| 
;;;136          return (1); 
000114  2001              MOVS     r0,#1 
                  |L1.278| 
;;;137       } 
;;;138       return (0); 
;;;139    } 
000116  4770              BX       lr 
                  |L1.280| 
000118  2000              MOVS     r0,#0                 ;138 
00011a  e7fc              B        |L1.278| 
;;;140     
                          ENDP 
 
                  _sys_seek PROC 
;;;142     
;;;143    int _sys_seek (FILEHANDLE fh, long pos) { 
00011c  b570              PUSH     {r4-r6,lr} 
00011e  4604              MOV      r4,r0 
000120  460d              MOV      r5,r1 
;;;144       if (fh > 0x8000) { 
000122  f5b44f00          CMP      r4,#0x8000 
000126  dd02              BLE      |L1.302| 
;;;145          return (-1); 
000128  f04f30ff          MOV      r0,#0xffffffff 
                  |L1.300| 
;;;146       } 
;;;147       return (__setfpos (fh, pos)); 
;;;148    } 
00012c  bd70              POP      {r4-r6,pc} 
                  |L1.302| 
00012e  4629              MOV      r1,r5                 ;147 
000130  4620              MOV      r0,r4                 ;147 
000132  f7fffffe          BL       __setfpos 
000136  e7f9              B        |L1.300| 
;;;149     
                          ENDP 
 
                  _sys_ensure PROC 
;;;151     
;;;152    int _sys_ensure (FILEHANDLE fh) { 
000138  b510              PUSH     {r4,lr} 
00013a  4604              MOV      r4,r0 
;;;153       if (fh > 0x8000) { 
00013c  f5b44f00          CMP      r4,#0x8000 
000140  dd02              BLE      |L1.328| 
;;;154          return (-1); 
000142  f04f30ff          MOV      r0,#0xffffffff 
                  |L1.326| 
;;;155       } 
;;;156       return (__flushbuf (fh)); 
;;;157    } 
000146  bd10              POP      {r4,pc} 
                  |L1.328| 
000148  4620              MOV      r0,r4                 ;156 
00014a  f7fffffe          BL       __flushbuf 
00014e  e7fa              B        |L1.326| 
;;;158     
                          ENDP 
 
                  _sys_flen PROC 
;;;160     
;;;161    long _sys_flen (FILEHANDLE fh) { 
000150  b510              PUSH     {r4,lr} 
000152  4604              MOV      r4,r0 
;;;162       if (fh > 0x8000) { 
000154  f5b44f00          CMP      r4,#0x8000 
000158  dd01              BLE      |L1.350| 
;;;163          return (0); 
00015a  2000              MOVS     r0,#0 
                  |L1.348| 
;;;164       } 
;;;165       return (__get_flen (fh)); 
;;;166    } 
00015c  bd10              POP      {r4,pc} 
                  |L1.350| 
00015e  eb040184          ADD      r1,r4,r4,LSL #2       ;165 
000162  eb0101c4          ADD      r1,r1,r4,LSL #3       ;165 
000166  4a0c              LDR      r2,|L1.408| 
000168  eb020081          ADD      r0,r2,r1,LSL #2       ;165 
00016c  2100              MOVS     r1,#0                 ;165 
00016e  f7fffffe          BL       __getfsize 
000172  e7f3              B        |L1.348| 
;;;167     
                          ENDP 
 
                  _sys_tmpnam PROC 
;;;169     
;;;170    int _sys_tmpnam (char *name, int sig, unsigned maxlen) { 
000174  4603              MOV      r3,r0 
;;;171       return (1); 
000176  2001              MOVS     r0,#1 
;;;172    } 
000178  4770              BX       lr 
;;;173     
                          ENDP 
 
                  _sys_command_string PROC 
;;;175     
;;;176    char *_sys_command_string (char *cmd, int len) { 
00017a  4770              BX       lr 
;;;177       return (cmd); 
;;;178    } 
;;;179     
                          ENDP 
 
                  _sys_exit PROC 
;;;181     
;;;182    void _sys_exit (int return_code) { 
00017c  bf00              NOP       
                  |L1.382| 
;;;183       /* Endless loop. */ 
;;;184       while (1); 
00017e  e7fe              B        |L1.382| 
;;;185    } 
;;;186     
                          ENDP 
 
                  |L1.384| 
000180  535444494e00        DCB      "STDIN",0 
000186  00                DCB      0 
000187  00                DCB      0 
                  |L1.392| 
000188  5354444f555400        DCB      "STDOUT",0 
00018f  00                DCB      0 
                  |L1.400| 
000190  53544445525200        DCB      "STDERR",0 
000197  00                DCB      0 
                  |L1.408| 
                          DCD      _iob 
 
                          AREA ||.constdata||, DATA, READONLY, ALIGN=0 
 
                  __stdin_name 
000000  53544449          DCB      0x53,0x54,0x44,0x49 
000004  4e00              DCB      0x4e,0x00 
                  __stdout_name 
000006  5354              DCB      0x53,0x54 
000008  444f5554          DCB      0x44,0x4f,0x55,0x54 
00000c  00                DCB      0x00 
                  __stderr_name 
00000d  535444            DCB      0x53,0x54,0x44 
000010  45525200          DCB      0x45,0x52,0x52,0x00