FaxRxBufRawdata2pc.lst
上传用户:xhjmsc
上传日期:2019-09-13
资源大小:389k
文件大小:13k
源码类别:

传真(Fax)编程

开发平台:

C/C++

  1. ##############################################################################
  2. #                                                                            #
  3. # IAR MSP430 C/EC++ Compiler V2.10A/W32                23/Apr/2007  18:04:10 #
  4. # Copyright 1996-2003 IAR Systems. All rights reserved.                      #
  5. #                                                                            #
  6. #    __rt_version  =  1                                                      #
  7. #    __double_size =  32                                                     #
  8. #    __reg_r4      =  free                                                   #
  9. #    __reg_r5      =  free                                                   #
  10. #    __pic         =  no                                                     #
  11. #    Source file   =  E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  12. #                     filesFaxRxBufRawdata2pc.c                             #
  13. #    Command line  =  -I "C:Program FilesIAR SystemsEmbedded Workbench    #
  14. #                     3.2430INC" -I "C:Program FilesIAR                 #
  15. #                     SystemsEmbedded Workbench 3.2430INCCLIB" -lCN     #
  16. #                     E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  17. #                     DebugList -lA E:projectFaxProgramVson_Bryan_Fax_ #
  18. #                     Conexant_070423DebugList -o                         #
  19. #                     E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  20. #                     DebugObj -z2 --no_cse --no_unroll --no_inline        #
  21. #                     --no_code_motion --debug -e                            #
  22. #                     E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  23. #                     filesFaxRxBufRawdata2pc.c                             #
  24. #    List file     =  E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  25. #                     DebugListFaxRxBufRawdata2pc.lst                      #
  26. #    Object file   =  E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
  27. #                     DebugObjFaxRxBufRawdata2pc.r43                       #
  28. #                                                                            #
  29. #                                                                            #
  30. ##############################################################################
  31. E:projectFaxProgramVson_Bryan_Fax_Conexant_070423filesFaxRxBufRawdata2pc.c
  32.       1          /************************************************
  33.       2          Description: 
  34.       3                Send the received fax raw data to PC via MAX232
  35.       4                3G 1-dimensional Data Format Recommendation T.4
  36.       5          Input:
  37.       6                none
  38.       7          Output:
  39.       8                none
  40.       9          Update:
  41.      10                2006.11.02  Bryan      function header     create
  42.      11          ************************************************/
  43.      12          
  44.      13          #include "includeH.h"
  45.                                     In segment DATA16_AN, at 0x36
  46.       unsigned char volatile __data P6DIR
  47.                         P6DIR:
  48.       000000                        DS8 1
  49.      14          
  50.                                     In segment CODE, align 2, keep-with-next
  51.      15          void  FaxRxBufRawdata2PCFromSoftUart(void) // send the received fax data to PC via MAX232
  52.                         FaxRxBufRawdata2PCFromSoftUart:
  53.      16          {     
  54.       000000   0A12                 PUSH.W  R10
  55.       000002   0B12                 PUSH.W  R11
  56.       000004   0812                 PUSH.W  R8
  57.      17                unsigned char ucFlashColumnAddCnt=0;
  58.       000006   4843                 MOV.B   #0x0, R8
  59.      18                unsigned int wGeneralCnt=0,wPageAddress=0;
  60.       000008   0A43                 MOV.W   #0x0, R10
  61.       00000A   0B43                 MOV.W   #0x0, R11
  62.      19                //ucGeneralCnt=2;
  63.      20                SOFTUART_PORT_DIRECTION |= bitSOFTUARTTX;
  64.       00000C   D2D33600             BIS.B   #0x1, &0x36
  65.      21                //wPageAddress=gwPageAddress;
  66.      22                ZERO_ADDRESS();
  67.       000010   B012....             CALL    #ZERO_ADDRESS
  68.      23                //for (gwPageAddress=1216;gwPageAddress<2559;gwPageAddress++) //Mar.2, 2007
  69.      24                for (wPageAddress=cstFaxRxBufStartPage;wPageAddress<=gwPageAddress;wPageAddress++)
  70.       000014   3B40C004             MOV.W   #0x4c0, R11
  71.                         ??FaxRxBufRawdata2PCFromSoftUart_2:
  72.       000018   829B....             CMP.W   R11, &gwPageAddress
  73.       00001C   5228                 JNC     ??FaxRxBufRawdata2PCFromSoftUart_3
  74.      25                {
  75.      26                  
  76.      27                  ROW_ADDRESS_LOW = wPageAddress & 0xff;
  77.       00001E   C24B....             MOV.B   R11, &ROW_ADDRESS_LOW
  78.      28                  ROW_ADDRESS_HIGH = (wPageAddress>>8) & 0xff;
  79.       000022   0E4B                 MOV.W   R11, R14
  80.       000024   8E10                 SWPB    R14
  81.       000026   3EF0FF00             AND.W   #0xff, R14
  82.       00002A   C24E....             MOV.B   R14, &ROW_ADDRESS_HIGH
  83.      29                  for (ucFlashColumnAddCnt = 0;ucFlashColumnAddCnt < 8;ucFlashColumnAddCnt++)
  84.       00002E   4843                 MOV.B   #0x0, R8
  85.                         ??FaxRxBufRawdata2PCFromSoftUart_1:
  86.       000030   7892                 CMP.B   #0x8, R8
  87.       000032   342C                 JC      ??FaxRxBufRawdata2PCFromSoftUart_4
  88.      30                  {
  89.      31                      //8 * 256 == 2048 Bytes 2^4*2^8 12bit column address HighColumnAddr:0~8
  90.      32                      //total 8*256B+64B=2K+64B
  91.      33               COLUMN_ADDRESS_HIGH=ucFlashColumnAddCnt;
  92.       000034   C248....             MOV.B   R8, &COLUMN_ADDRESS_HIGH
  93.      34               READ_256_BYTE();//read 256 Byte to aucUartRxBuf[256]
  94.       000038   B012....             CALL    #READ_256_BYTE
  95.      35               for (wGeneralCnt=0;wGeneralCnt<256;wGeneralCnt++)//
  96.       00003C   0A43                 MOV.W   #0x0, R10
  97.                         ??FaxRxBufRawdata2PCFromSoftUart_0:
  98.       00003E   3A900001             CMP.W   #0x100, R10
  99.       000042   192C                 JC      ??FaxRxBufRawdata2PCFromSoftUart_5
  100.      36                                                                     //modify Dec.28,2006 4*64Bytes one time
  101.      37               {
  102.      38           SoftUartTxOneFrame(aucUartRxBuf[wGeneralCnt]);
  103.       000044   5C4A....             MOV.B   aucUartRxBuf(R10), R12
  104.       000048   B012....             CALL    #SoftUartTxOneFrame
  105.      39           if (aucUartRxBuf[wGeneralCnt] == 0xfb && aucUartRxBuf[wGeneralCnt-1] == 0x13 && aucUartRxBuf[wGeneralCnt-2] == 0xff)
  106.       00004C   FA90FB00....         CMP.B   #0xfb, aucUartRxBuf(R10)
  107.       000052   0F20                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_6
  108.       000054   3E40....             MOV.W   #aucUartRxBuf, R14
  109.       000058   0E5A                 ADD.W   R10, R14
  110.       00005A   FE901300FFFF         CMP.B   #0x13, 0xffff(R14)
  111.       000060   0820                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_6
  112.       000062   3E40....             MOV.W   #aucUartRxBuf, R14
  113.       000066   0E5A                 ADD.W   R10, R14
  114.       000068   FE93FEFF             CMP.B   #0xff, 0xfffe(R14)
  115.       00006C   0220                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_6
  116.      40             {_NOP();break;}             
  117.       00006E   0343                 NOP
  118.       000070   023C                 JMP     ??FaxRxBufRawdata2PCFromSoftUart_5
  119.      41               }//third for
  120.                         ??FaxRxBufRawdata2PCFromSoftUart_6:
  121.       000072   1A53                 ADD.W   #0x1, R10
  122.       000074   E43F                 JMP     ??FaxRxBufRawdata2PCFromSoftUart_0
  123.      42               if (aucUartRxBuf[wGeneralCnt] == 0xfb && aucUartRxBuf[wGeneralCnt-1] == 0x13 && aucUartRxBuf[wGeneralCnt-2] == 0xff)
  124.                         ??FaxRxBufRawdata2PCFromSoftUart_5:
  125.       000076   FA90FB00....         CMP.B   #0xfb, aucUartRxBuf(R10)
  126.       00007C   0D20                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_7
  127.       00007E   3E40....             MOV.W   #aucUartRxBuf, R14
  128.       000082   0E5A                 ADD.W   R10, R14
  129.       000084   FE901300FFFF         CMP.B   #0x13, 0xffff(R14)
  130.       00008A   0620                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_7
  131.       00008C   3E40....             MOV.W   #aucUartRxBuf, R14
  132.       000090   0E5A                 ADD.W   R10, R14
  133.       000092   FE93FEFF             CMP.B   #0xff, 0xfffe(R14)
  134.       000096   0224                 JEQ     ??FaxRxBufRawdata2PCFromSoftUart_4
  135.      43             break;        
  136.      44                  }//second for  next 256Byte
  137.                         ??FaxRxBufRawdata2PCFromSoftUart_7:
  138.       000098   5853                 ADD.B   #0x1, R8
  139.       00009A   CA3F                 JMP     ??FaxRxBufRawdata2PCFromSoftUart_1
  140.      45                 if (aucUartRxBuf[wGeneralCnt] == 0xfb && aucUartRxBuf[wGeneralCnt-1] == 0x13 && aucUartRxBuf[wGeneralCnt-2] == 0xff)
  141.                         ??FaxRxBufRawdata2PCFromSoftUart_4:
  142.       00009C   FA90FB00....         CMP.B   #0xfb, aucUartRxBuf(R10)
  143.       0000A2   0D20                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_8
  144.       0000A4   3E40....             MOV.W   #aucUartRxBuf, R14
  145.       0000A8   0E5A                 ADD.W   R10, R14
  146.       0000AA   FE901300FFFF         CMP.B   #0x13, 0xffff(R14)
  147.       0000B0   0620                 JNE     ??FaxRxBufRawdata2PCFromSoftUart_8
  148.       0000B2   3E40....             MOV.W   #aucUartRxBuf, R14
  149.       0000B6   0E5A                 ADD.W   R10, R14
  150.       0000B8   FE93FEFF             CMP.B   #0xff, 0xfffe(R14)
  151.       0000BC   0224                 JEQ     ??FaxRxBufRawdata2PCFromSoftUart_3
  152.      46             break; 
  153.      47                 }//first for next page
  154.                         ??FaxRxBufRawdata2PCFromSoftUart_8:
  155.       0000BE   1B53                 ADD.W   #0x1, R11
  156.       0000C0   AB3F                 JMP     ??FaxRxBufRawdata2PCFromSoftUart_2
  157.      48                 
  158.      49                 ATcmdDelay();     // receive data delay(if not, can't receive 0x10 0x03)
  159.                         ??FaxRxBufRawdata2PCFromSoftUart_3:
  160.       0000C2   B012....             CALL    #ATcmdDelay
  161.      50          
  162.      51                 SOFTUART_PORT_DIRECTION &= ~bitSOFTUARTTX;
  163.       0000C6   D2C33600             BIC.B   #0x1, &0x36
  164.      52          }   
  165.       0000CA   3841                 POP.W   R8
  166.       0000CC   3B41                 POP.W   R11
  167.       0000CE   3A41                 POP.W   R10
  168.       0000D0   3041                 RET
  169.      53          /*
  170.      54          void  FaxRxBufRawdata2PCFromUart(void) // send the received fax data to PC via MAX232
  171.      55          {     
  172.      56                unsigned char ucFlashColumnAddCnt=0,ucGeneralCnt=0;
  173.      57                //ucGeneralCnt=2;
  174.      58                ZERO_ADDRESS();
  175.      59                for (gwPageAddress=cstFaxRxBufStartPage;gwPageAddress<2559;gwPageAddress++)
  176.      60                {
  177.      61                  
  178.      62                  ROW_ADDRESS_LOW = gwPageAddress & 0xff;
  179.      63                  ROW_ADDRESS_HIGH = (gwPageAddress>>8) & 0xff;
  180.      64                  for (ucFlashColumnAddCnt = 0;ucFlashColumnAddCnt < 8;ucFlashColumnAddCnt++)
  181.      65                  {
  182.      66                   //8 * 256 == 2048 Bytes 2^4*2^8 12bit column address HighColumnAddr:0~8
  183.      67                      //total 8*256B+64B=2K+64B
  184.      68                   COLUMN_ADDRESS_HIGH=ucFlashColumnAddCnt;
  185.      69                   READ_256_BYTE();//read 256 Byte to aucUartRxBuf[256]
  186.      70                   for (ucGeneralCnt=0;ucGeneralCnt<4;ucGeneralCnt++)//16*16Bytes send 16Bytes one time
  187.      71                   {
  188.      72                       Send64BytePageImageData(64,ucGeneralCnt);
  189.      73                       while(gucTxBufCnt!=0)//send over, ucTxBufCnt == 0
  190.      74                       { 
  191.      75                         ;
  192.      76                       }
  193.      77                       //delay10ms();
  194.      78                       if (gwTxNum != 64 && TXBUF0==0xfb)
  195.      79                           break;
  196.      80                   }//third for
  197.      81                   if (gwTxNum != 64)
  198.      82                       break;
  199.      83                  }//second for
  200.      84                  
  201.      85                  if (gwTxNum != 64)
  202.      86                  break;      
  203.      87                 }//first for next page
  204.      88                 
  205.      89                 ATcmdDelay();     // receive data delay(if not, can't receive 0x10 0x03)
  206.      90          }   
  207.      91          */ 
  208.    Maximum stack usage in bytes:
  209.      Function                       CSTACK
  210.      --------                       ------
  211.      FaxRxBufRawdata2PCFromSoftUart     8
  212.        -> ZERO_ADDRESS                  8
  213.        -> READ_256_BYTE                 8
  214.        -> SoftUartTxOneFrame            8
  215.        -> ATcmdDelay                    8
  216.    Segment part sizes:
  217.      Function/Label                 Bytes
  218.      --------------                 -----
  219.      P6DIR                             1
  220.      FaxRxBufRawdata2PCFromSoftUart  210
  221.  
  222.  210 bytes in segment CODE
  223.    1 byte  in segment DATA16_AN
  224.  
  225.  210 bytes of CODE memory
  226.    0 bytes of DATA memory (+ 1 byte shared)
  227. Errors: none
  228. Warnings: none