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

传真(Fax)编程

开发平台:

C/C++

  1.     395          //FRH DNC (disconnect)   //Modity at Dec. 28,2006. DNC is the over flag
  2.     396                SendATcmdFRH();           
  3.       00091E   B012....             CALL    #SendATcmdFRH
  4.     397                
  5.     398                while (1)    
  6.     399                {
  7.     400                 ucRxIndex1=gucUartRxCnt-3;
  8.                         ??FaxRXProcess_22:
  9.       000922   7E40FD00             MOV.B   #0xfd, R14
  10.       000926   5E52....             ADD.B   &gucUartRxCnt, R14
  11.       00092A   4B4E                 MOV.B   R14, R11
  12.     401                  ucRxIndex0=gucUartRxCnt-2;
  13.       00092C   7E40FE00             MOV.B   #0xfe, R14
  14.       000930   5E52....             ADD.B   &gucUartRxCnt, R14
  15.       000934   484E                 MOV.B   R14, R8
  16.     402                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x54==aucUartRxBuf[ucRxIndex1]))
  17.       000936   38F0FF00             AND.W   #0xff, R8
  18.       00093A   F8900D00....         CMP.B   #0xd, aucUartRxBuf(R8)
  19.       000940   0620                 JNE     ??FaxRXProcess_92
  20.       000942   3BF0FF00             AND.W   #0xff, R11
  21.       000946   FB905400....         CMP.B   #0x54, aucUartRxBuf(R11)
  22.       00094C   1724                 JEQ     ??FaxRXProcess_93
  23.     403                    break;
  24.     404                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  25.     405                  RxFaxTimeOverflowErrorQuit();
  26.                         ??FaxRXProcess_92:
  27.       00094E   1E42....             MOV.W   &gwTimeOverflowCount, R14
  28.       000952   1F43                 MOV.W   #0x1, R15
  29.       000954   0F5E                 ADD.W   R14, R15
  30.       000956   824F....             MOV.W   R15, &gwTimeOverflowCount
  31.       00095A   3E93                 CMP.W   #0xffff, R14
  32.       00095C   0420                 JNE     ??FaxRXProcess_94
  33.       00095E   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  34.       000962   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  35.                         ??FaxRXProcess_94:
  36.       000966   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  37.       00096C   DA23                 JNE     ??FaxRXProcess_22
  38.       00096E   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  39.       000974   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  40.       000978   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  41.     406                }
  42.     407                
  43.     408                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  44.                         ??FaxRXProcess_93:
  45.       00097C   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  46.       000982   B725                 JEQ     ??FaxRXProcess_63
  47.     409                
  48.     410                while (1)    
  49.     411                {
  50.     412                 ucRxIndex1=gucUartRxCnt-3;
  51.                         ??FaxRXProcess_23:
  52.       000984   7E40FD00             MOV.B   #0xfd, R14
  53.       000988   5E52....             ADD.B   &gucUartRxCnt, R14
  54.       00098C   4B4E                 MOV.B   R14, R11
  55.     413                  ucRxIndex0=gucUartRxCnt-2;
  56.       00098E   7E40FE00             MOV.B   #0xfe, R14
  57.       000992   5E52....             ADD.B   &gucUartRxCnt, R14
  58.       000996   484E                 MOV.B   R14, R8
  59.     414                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1]))
  60.       000998   38F0FF00             AND.W   #0xff, R8
  61.       00099C   F8900D00....         CMP.B   #0xd, aucUartRxBuf(R8)
  62.       0009A2   0620                 JNE     ??FaxRXProcess_95
  63.       0009A4   3BF0FF00             AND.W   #0xff, R11
  64.       0009A8   FB904B00....         CMP.B   #0x4b, aucUartRxBuf(R11)
  65.       0009AE   1724                 JEQ     ??FaxRXProcess_96
  66.     415                    break;
  67.     416                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  68.     417                  RxFaxTimeOverflowErrorQuit();
  69.                         ??FaxRXProcess_95:
  70.       0009B0   1E42....             MOV.W   &gwTimeOverflowCount, R14
  71.       0009B4   1F43                 MOV.W   #0x1, R15
  72.       0009B6   0F5E                 ADD.W   R14, R15
  73.       0009B8   824F....             MOV.W   R15, &gwTimeOverflowCount
  74.       0009BC   3E93                 CMP.W   #0xffff, R14
  75.       0009BE   0420                 JNE     ??FaxRXProcess_97
  76.       0009C0   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  77.       0009C4   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  78.                         ??FaxRXProcess_97:
  79.       0009C8   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  80.       0009CE   DA23                 JNE     ??FaxRXProcess_23
  81.       0009D0   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  82.       0009D6   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  83.       0009DA   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  84.     418                } 
  85.     419                
  86.     420                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  87.                         ??FaxRXProcess_96:
  88.       0009DE   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  89.       0009E4   8625                 JEQ     ??FaxRXProcess_63
  90.     421                
  91.     422          //FaxRearDataProcess      
  92.     423                  while (gdwRxQueueRearCnt-gdwRxQueueFrontCnt>=32)
  93.                         ??FaxRXProcess_24:
  94.       0009E6   1E42....             MOV.W   &gdwRxQueueRearCnt, R14
  95.       0009EA   1F42....             MOV.W   &gdwRxQueueRearCnt + 0x2, R15
  96.       0009EE   1E82....             SUB.W   &gdwRxQueueFrontCnt, R14
  97.       0009F2   1F72....             SUBC.W  &gdwRxQueueFrontCnt + 0x2, R15
  98.       0009F6   0F93                 CMP.W   #0x0, R15
  99.       0009F8   7F28                 JNC     ??FaxRXProcess_98
  100.       0009FA   0320                 JNE     ??FaxRXProcess_99
  101.       0009FC   3E902000             CMP.W   #0x20, R14
  102.       000A00   7B28                 JNC     ??FaxRXProcess_98
  103.     424                    {
  104.     425                        if (gdwRxQueueRearCnt-gdwRxQueueFrontCnt>254)   // if data num is more than the buffer space, error happan.
  105.                         ??FaxRXProcess_99:
  106.       000A02   1E42....             MOV.W   &gdwRxQueueRearCnt, R14
  107.       000A06   1F42....             MOV.W   &gdwRxQueueRearCnt + 0x2, R15
  108.       000A0A   1E82....             SUB.W   &gdwRxQueueFrontCnt, R14
  109.       000A0E   1F72....             SUBC.W  &gdwRxQueueFrontCnt + 0x2, R15
  110.       000A12   0F93                 CMP.W   #0x0, R15
  111.       000A14   0628                 JNC     ??FaxRXProcess_100
  112.       000A16   0320                 JNE     ??FaxRXProcess_101
  113.       000A18   3E90FF00             CMP.W   #0xff, R14
  114.       000A1C   0228                 JNC     ??FaxRXProcess_100
  115.     426                          {
  116.     427                            gucGeneralStatus |= FAXRXERROR;
  117.                         ??FaxRXProcess_101:
  118.       000A1E   D2D3....             BIS.B   #0x1, &gucGeneralStatus
  119.     428                          }
  120.     429                        if (wGeneralCount++<64) // 32*64=2048
  121.                         ??FaxRXProcess_100:
  122.       000A22   0E47                 MOV.W   R7, R14
  123.       000A24   1743                 MOV.W   #0x1, R7
  124.       000A26   075E                 ADD.W   R14, R7
  125.       000A28   3E904000             CMP.W   #0x40, R14
  126.       000A2C   172C                 JC      ??FaxRXProcess_102
  127.     430                        {
  128.     431                          for (ucGeneralCnt=0;ucGeneralCnt<32;ucGeneralCnt++)
  129.       000A2E   4A43                 MOV.B   #0x0, R10
  130.                         ??FaxRXProcess_25:
  131.       000A30   7A902000             CMP.B   #0x20, R10
  132.       000A34   D82F                 JC      ??FaxRXProcess_24
  133.     432                          {
  134.     433                           FLASH_CON_PORT_OUT&=~WE;
  135.       000A36   D2C32900             BIC.B   #0x1, &0x29
  136.     434                          DATA_PORT_OUT=aucUartRxBuf[gpucQueueFront++];
  137.       000A3A   5E42....             MOV.B   &gpucQueueFront, R14
  138.       000A3E   3EF0FF00             AND.W   #0xff, R14
  139.       000A42   D24E....3100         MOV.B   aucUartRxBuf(R14), &0x31
  140.       000A48   D253....             ADD.B   #0x1, &gpucQueueFront
  141.     435                          gdwRxQueueFrontCnt++;               //The total num that is writed to flash
  142.       000A4C   9253....             ADD.W   #0x1, &gdwRxQueueFrontCnt
  143.       000A50   8263....             ADDC.W  #0x0, &gdwRxQueueFrontCnt + 0x2
  144.     436                          FLASH_CON_PORT_OUT |= WE;
  145.       000A54   D2D32900             BIS.B   #0x1, &0x29
  146.     437                         }
  147.       000A58   5A53                 ADD.B   #0x1, R10
  148.       000A5A   EA3F                 JMP     ??FaxRXProcess_25
  149.     438                        }
  150.     439                        else
  151.     440                        { 
  152.     441                          wGeneralCount=0;
  153.                         ??FaxRXProcess_102:
  154.       000A5C   0743                 MOV.W   #0x0, R7
  155.     442                          
  156.     443                          COMMAND_VAL=0X10; //10H INITIATES PROGRAM
  157.       000A5E   F2401000....         MOV.B   #0x10, &COMMAND_VAL
  158.     444                       COMMAND_LATCH_INTO();
  159.       000A64   B012....             CALL    #COMMAND_LATCH_INTO
  160.     445          
  161.     446                       READ_STATUS();
  162.       000A68   B012....             CALL    #READ_STATUS
  163.     447                          ucFlashSttsOverflowCnt=0;
  164.       000A6C   4643                 MOV.B   #0x0, R6
  165.     448                       while (FLASH_STATUS==1&&(ucFlashSttsOverflowCnt++)<2)
  166.                         ??FaxRXProcess_26:
  167.       000A6E   D293....             CMP.B   #0x1, &FLASH_STATUS
  168.       000A72   0520                 JNE     ??FaxRXProcess_103
  169.       000A74   4E46                 MOV.B   R6, R14
  170.       000A76   5643                 MOV.B   #0x1, R6
  171.       000A78   465E                 ADD.B   R14, R6
  172.       000A7A   6E93                 CMP.B   #0x2, R14
  173.       000A7C   F82B                 JNC     ??FaxRXProcess_26
  174.     449                     {
  175.     450                      ;//ERASE_ONE_BLOCK();
  176.     451                      //PROGRAM_ONE_PAGE();
  177.     452                     }
  178.     453                          if (wPageAddress<2559) wPageAddress++;//add at Jan. 18, 2007
  179.                         ??FaxRXProcess_103:
  180.       000A7E   3990FF09             CMP.W   #0x9ff, R9
  181.       000A82   012C                 JC      ??FaxRXProcess_27
  182.       000A84   1953                 ADD.W   #0x1, R9
  183.     454                       do{
  184.     455                        wNextPageAddress=wPageAddress+64;
  185.                         ??FaxRXProcess_27:
  186.       000A86   3E404000             MOV.W   #0x40, R14
  187.       000A8A   0E59                 ADD.W   R9, R14
  188.       000A8C   054E                 MOV.W   R14, R5
  189.     456                        wPageAddress=CalNextPageAddress(wPageAddress);
  190.       000A8E   0C49                 MOV.W   R9, R12
  191.       000A90   B012....             CALL    #CalNextPageAddress
  192.       000A94   094C                 MOV.W   R12, R9
  193.     457                        }while(wNextPageAddress==wPageAddress);
  194.       000A96   0599                 CMP.W   R9, R5
  195.       000A98   F627                 JEQ     ??FaxRXProcess_27
  196.     458                      if (wPageAddress%64==0)
  197.       000A9A   0C49                 MOV.W   R9, R12
  198.       000A9C   3E404000             MOV.W   #0x40, R14
  199.       000AA0   B012....             CALL    #?DivMod16u
  200.       000AA4   0E93                 CMP.W   #0x0, R14
  201.       000AA6   0A20                 JNE     ??FaxRXProcess_104
  202.     459                         {
  203.     460                            ROW_ADDRESS_LOW=wPageAddress & 0XFF;
  204.       000AA8   C249....             MOV.B   R9, &ROW_ADDRESS_LOW
  205.     461                            ROW_ADDRESS_HIGH=(wPageAddress>>8) & 0XFF; 
  206.       000AAC   0E49                 MOV.W   R9, R14
  207.       000AAE   8E10                 SWPB    R14
  208.       000AB0   3EF0FF00             AND.W   #0xff, R14
  209.       000AB4   C24E....             MOV.B   R14, &ROW_ADDRESS_HIGH
  210.     462                            ERASE_ONE_BLOCK();
  211.       000AB8   B012....             CALL    #ERASE_ONE_BLOCK
  212.     463                         }
  213.     464                        COMMAND_VAL=0X80;
  214.                         ??FaxRXProcess_104:
  215.       000ABC   F2408000....         MOV.B   #0x80, &COMMAND_VAL
  216.     465                     COMMAND_LATCH_INTO();
  217.       000AC2   B012....             CALL    #COMMAND_LATCH_INTO
  218.     466          
  219.     467          //ADDRESS
  220.     468                     ADDRESS_VALUE=0;//COLUMN_ADDRESS_LOW; //#0X00
  221.       000AC6   C243....             MOV.B   #0x0, &ADDRESS_VALUE
  222.     469                     ADDRESS_LATCH_INTO();
  223.       000ACA   B012....             CALL    #ADDRESS_LATCH_INTO
  224.     470          
  225.     471                     ADDRESS_VALUE=0;//COLUMN_ADDRESS_LOW; //#0X00
  226.       000ACE   C243....             MOV.B   #0x0, &ADDRESS_VALUE
  227.     472                     ADDRESS_LATCH_INTO();
  228.       000AD2   B012....             CALL    #ADDRESS_LATCH_INTO
  229.     473          
  230.     474                     ADDRESS_VALUE=wPageAddress & 0xff; //#0X00
  231.       000AD6   C249....             MOV.B   R9, &ADDRESS_VALUE
  232.     475                     ADDRESS_LATCH_INTO();
  233.       000ADA   B012....             CALL    #ADDRESS_LATCH_INTO
  234.     476          
  235.     477                     ADDRESS_VALUE=(wPageAddress>>8) & 0xff; //#0X00
  236.       000ADE   0E49                 MOV.W   R9, R14
  237.       000AE0   8E10                 SWPB    R14
  238.       000AE2   3EF0FF00             AND.W   #0xff, R14
  239.       000AE6   C24E....             MOV.B   R14, &ADDRESS_VALUE
  240.     478                     ADDRESS_LATCH_INTO();
  241.       000AEA   B012....             CALL    #ADDRESS_LATCH_INTO
  242.     479          
  243.     480                     FLASH_CON_PORT_OUT &=~ ALE;
  244.       000AEE   E2C32900             BIC.B   #0x2, &0x29
  245.     481                     //CALL DELAY_100US
  246.     482                     //for(i=0;i<0xff;i++);
  247.     483                     DATA_PORT_OUT_INITIAL; //MCU OUTPUT,MCU WRITE A DATA TO FLASH
  248.       000AF2   F2433200             MOV.B   #0xff, &0x32
  249.       000AF6   773F                 JMP     ??FaxRXProcess_24
  250.     484                      
  251.     485                        }//else
  252.     486                    }//while
  253.     487           //***************************************     
  254.     488                wDataRearCount=gdwRxQueueRearCnt-gdwRxQueueFrontCnt;      
  255.                         ??FaxRXProcess_98:
  256.       000AF8   1E42....             MOV.W   &gdwRxQueueRearCnt, R14
  257.       000AFC   1E82....             SUB.W   &gdwRxQueueFrontCnt, R14
  258.       000B00   814E0200             MOV.W   R14, 0x2(SP)
  259.     489                if (wDataRearCount)//wDataRearCount<2048-wGeneralCount*ucGeneralCnt)
  260.       000B04   81930200             CMP.W   #0x0, 0x2(SP)
  261.       000B08   2724                 JEQ     ??FaxRXProcess_105
  262.     490                {
  263.     491                   //for (ucGeneralCnt=0;ucGeneralCnt<wGeneralCount;ucGeneralCnt++)
  264.     492                   for (ucGeneralCnt=0;ucGeneralCnt<wDataRearCount;ucGeneralCnt++)
  265.       000B0A   4A43                 MOV.B   #0x0, R10
  266.                         ??FaxRXProcess_28:
  267.       000B0C   4E4A                 MOV.B   R10, R14
  268.       000B0E   3EF0FF00             AND.W   #0xff, R14
  269.       000B12   1E910200             CMP.W   0x2(SP), R14
  270.       000B16   132C                 JC      ??FaxRXProcess_106
  271.     493                    {
  272.     494                      FLASH_CON_PORT_OUT&=~WE;
  273.       000B18   D2C32900             BIC.B   #0x1, &0x29
  274.     495                    DATA_PORT_OUT=aucUartRxBuf[gpucQueueFront++];
  275.       000B1C   5E42....             MOV.B   &gpucQueueFront, R14
  276.       000B20   3EF0FF00             AND.W   #0xff, R14
  277.       000B24   D24E....3100         MOV.B   aucUartRxBuf(R14), &0x31
  278.       000B2A   D253....             ADD.B   #0x1, &gpucQueueFront
  279.     496                    gdwRxQueueFrontCnt++;
  280.       000B2E   9253....             ADD.W   #0x1, &gdwRxQueueFrontCnt
  281.       000B32   8263....             ADDC.W  #0x0, &gdwRxQueueFrontCnt + 0x2
  282.     497                    FLASH_CON_PORT_OUT |= WE;
  283.       000B36   D2D32900             BIS.B   #0x1, &0x29
  284.     498                   }
  285.       000B3A   5A53                 ADD.B   #0x1, R10
  286.       000B3C   E73F                 JMP     ??FaxRXProcess_28
  287.     499                   
  288.     500                  wGeneralCount=0;
  289.                         ??FaxRXProcess_106:
  290.       000B3E   0743                 MOV.W   #0x0, R7
  291.     501                  COMMAND_VAL=0X10; //10H INITIATES PROGRAM
  292.       000B40   F2401000....         MOV.B   #0x10, &COMMAND_VAL
  293.     502                 COMMAND_LATCH_INTO();
  294.       000B46   B012....             CALL    #COMMAND_LATCH_INTO
  295.     503          
  296.     504                 READ_STATUS();
  297.       000B4A   B012....             CALL    #READ_STATUS
  298.     505                  ucFlashSttsOverflowCnt=0;
  299.       000B4E   4643                 MOV.B   #0x0, R6
  300.     506                 if(FLASH_STATUS==1&&(ucFlashSttsOverflowCnt++)<2)
  301.       000B50   D293....             CMP.B   #0x1, &FLASH_STATUS
  302.       000B54   0120                 JNE     ??FaxRXProcess_105
  303.       000B56   5653                 ADD.B   #0x1, R6
  304.     507               {
  305.     508                ;//ERASE_ONE_BLOCK();
  306.     509                //PROGRAM_ONE_PAGE();
  307.     510               }
  308.     511                }//if  
  309.     512                
  310.     513          
  311.     514                
  312.     515                
  313.     516                
  314.     517                SendATcmdH0();
  315.                         ??FaxRXProcess_105:
  316.       000B58   B012....             CALL    #SendATcmdH0
  317.     518               
  318.     519                while (1)    
  319.     520                {
  320.     521                 ucRxIndex1=gucUartRxCnt-3;
  321.                         ??FaxRXProcess_29:
  322.       000B5C   7E40FD00             MOV.B   #0xfd, R14
  323.       000B60   5E52....             ADD.B   &gucUartRxCnt, R14
  324.       000B64   4B4E                 MOV.B   R14, R11
  325.     522                  ucRxIndex0=gucUartRxCnt-2;
  326.       000B66   7E40FE00             MOV.B   #0xfe, R14
  327.       000B6A   5E52....             ADD.B   &gucUartRxCnt, R14
  328.       000B6E   484E                 MOV.B   R14, R8
  329.     523                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1]))
  330.       000B70   38F0FF00             AND.W   #0xff, R8
  331.       000B74   F8900D00....         CMP.B   #0xd, aucUartRxBuf(R8)
  332.       000B7A   0620                 JNE     ??FaxRXProcess_107
  333.       000B7C   3BF0FF00             AND.W   #0xff, R11
  334.       000B80   FB904B00....         CMP.B   #0x4b, aucUartRxBuf(R11)
  335.       000B86   1724                 JEQ     ??FaxRXProcess_108
  336.     524                    break;
  337.     525                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  338.     526                  RxFaxTimeOverflowErrorQuit();
  339.                         ??FaxRXProcess_107:
  340.       000B88   1E42....             MOV.W   &gwTimeOverflowCount, R14
  341.       000B8C   1F43                 MOV.W   #0x1, R15
  342.       000B8E   0F5E                 ADD.W   R14, R15
  343.       000B90   824F....             MOV.W   R15, &gwTimeOverflowCount
  344.       000B94   3E93                 CMP.W   #0xffff, R14
  345.       000B96   0420                 JNE     ??FaxRXProcess_109
  346.       000B98   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  347.       000B9C   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  348.                         ??FaxRXProcess_109:
  349.       000BA0   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  350.       000BA6   DA23                 JNE     ??FaxRXProcess_29
  351.       000BA8   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  352.       000BAE   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  353.       000BB2   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  354.     527                }
  355.     528                
  356.     529                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.   
  357.                         ??FaxRXProcess_108:
  358.       000BB6   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  359.       000BBC   9A24                 JEQ     ??FaxRXProcess_63
  360.     530                ATcmdDelay();
  361.       000BBE   B012....             CALL    #ATcmdDelay
  362.     531                ATcmdDelay();
  363.       000BC2   B012....             CALL    #ATcmdDelay
  364.     532                ATcmdDelay();
  365.       000BC6   B012....             CALL    #ATcmdDelay
  366.     533                ATcmdDelay();
  367.       000BCA   B012....             CALL    #ATcmdDelay
  368.     534                
  369.     535                SendATcmdH0();
  370.       000BCE   B012....             CALL    #SendATcmdH0
  371.     536                
  372.     537                while (1)    
  373.     538                {
  374.     539                 ucRxIndex1=gucUartRxCnt-3;
  375.                         ??FaxRXProcess_30:
  376.       000BD2   7E40FD00             MOV.B   #0xfd, R14
  377.       000BD6   5E52....             ADD.B   &gucUartRxCnt, R14
  378.       000BDA   4B4E                 MOV.B   R14, R11
  379.     540                  ucRxIndex0=gucUartRxCnt-2;
  380.       000BDC   7E40FE00             MOV.B   #0xfe, R14
  381.       000BE0   5E52....             ADD.B   &gucUartRxCnt, R14
  382.       000BE4   484E                 MOV.B   R14, R8
  383.     541                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1]))
  384.       000BE6   38F0FF00             AND.W   #0xff, R8
  385.       000BEA   F8900D00....         CMP.B   #0xd, aucUartRxBuf(R8)
  386.       000BF0   0620                 JNE     ??FaxRXProcess_110
  387.       000BF2   3BF0FF00             AND.W   #0xff, R11
  388.       000BF6   FB904B00....         CMP.B   #0x4b, aucUartRxBuf(R11)
  389.       000BFC   1724                 JEQ     ??FaxRXProcess_111
  390.     542                    break;
  391.     543                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  392.     544                  RxFaxTimeOverflowErrorQuit();
  393.                         ??FaxRXProcess_110:
  394.       000BFE   1E42....             MOV.W   &gwTimeOverflowCount, R14
  395.       000C02   1F43                 MOV.W   #0x1, R15
  396.       000C04   0F5E                 ADD.W   R14, R15
  397.       000C06   824F....             MOV.W   R15, &gwTimeOverflowCount
  398.       000C0A   3E93                 CMP.W   #0xffff, R14
  399.       000C0C   0420                 JNE     ??FaxRXProcess_112
  400.       000C0E   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  401.       000C12   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  402.                         ??FaxRXProcess_112:
  403.       000C16   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  404.       000C1C   DA23                 JNE     ??FaxRXProcess_30
  405.       000C1E   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  406.       000C24   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  407.       000C28   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  408.     545                }
  409.     546                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.   
  410.                         ??FaxRXProcess_111:
  411.       000C2C   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  412.       000C32   5F24                 JEQ     ??FaxRXProcess_63
  413.     547                ATcmdDelay();
  414.       000C34   B012....             CALL    #ATcmdDelay
  415.     548                ATcmdDelay();
  416.       000C38   B012....             CALL    #ATcmdDelay
  417.     549                ATcmdDelay();
  418.       000C3C   B012....             CALL    #ATcmdDelay
  419.     550                ATcmdDelay();
  420.       000C40   B012....             CALL    #ATcmdDelay
  421.     551                ATcmdDelay();
  422.       000C44   B012....             CALL    #ATcmdDelay
  423.     552                ATcmdDelay();
  424.       000C48   B012....             CALL    #ATcmdDelay
  425.     553                ATcmdDelay();
  426.       000C4C   B012....             CALL    #ATcmdDelay
  427.     554                ATcmdDelay();
  428.       000C50   B012....             CALL    #ATcmdDelay
  429.     555          //AT Fclass0
  430.     556               
  431.     557                SendATcmdFCLASS0();
  432.       000C54   B012....             CALL    #SendATcmdFCLASS0
  433.     558                ATcmdDelay();
  434.       000C58   B012....             CALL    #ATcmdDelay
  435.     559                ATcmdDelay();
  436.       000C5C   B012....             CALL    #ATcmdDelay
  437.     560                ATcmdDelay();
  438.       000C60   B012....             CALL    #ATcmdDelay
  439.     561                ATcmdDelay();
  440.       000C64   B012....             CALL    #ATcmdDelay
  441.     562          //AT      
  442.     563                SendATcmdPrefix();
  443.       000C68   B012....             CALL    #SendATcmdPrefix
  444.     564                ATcmdDelay();
  445.       000C6C   B012....             CALL    #ATcmdDelay
  446.     565                SendATcmdSuffix();
  447.       000C70   B012....             CALL    #SendATcmdSuffix
  448.     566                ATcmdDelay();
  449.       000C74   B012....             CALL    #ATcmdDelay
  450.     567                ATcmdDelay();
  451.       000C78   B012....             CALL    #ATcmdDelay
  452.     568                ATcmdDelay();
  453.       000C7C   B012....             CALL    #ATcmdDelay
  454.     569          //AT     
  455.     570                SendATcmdPrefix();
  456.       000C80   B012....             CALL    #SendATcmdPrefix
  457.     571                ATcmdDelay();
  458.       000C84   B012....             CALL    #ATcmdDelay
  459.     572                SendATcmdSuffix();
  460.       000C88   B012....             CALL    #SendATcmdSuffix
  461.     573                ATcmdDelay();
  462.       000C8C   B012....             CALL    #ATcmdDelay
  463.     574                ATcmdDelay();
  464.       000C90   B012....             CALL    #ATcmdDelay
  465.     575                ATcmdDelay();
  466.       000C94   B012....             CALL    #ATcmdDelay
  467.     576          //AT    
  468.     577                SendATcmdPrefix();
  469.       000C98   B012....             CALL    #SendATcmdPrefix
  470.     578                ATcmdDelay();
  471.       000C9C   B012....             CALL    #ATcmdDelay
  472.     579                SendATcmdSuffix();
  473.       000CA0   B012....             CALL    #SendATcmdSuffix
  474.     580                ATcmdDelay();
  475.       000CA4   B012....             CALL    #ATcmdDelay
  476.     581                ATcmdDelay();
  477.       000CA8   B012....             CALL    #ATcmdDelay
  478.     582                ATcmdDelay();
  479.       000CAC   B012....             CALL    #ATcmdDelay
  480.     583                
  481.     584                SendATconfigFE0EndofRX();
  482.       000CB0   B012....             CALL    #SendATconfigFE0EndofRX
  483.     585                ATcmdDelay();
  484.       000CB4   B012....             CALL    #ATcmdDelay
  485.     586                ATcmdDelay();
  486.       000CB8   B012....             CALL    #ATcmdDelay
  487.     587                ATcmdDelay();
  488.       000CBC   B012....             CALL    #ATcmdDelay
  489.     588                ATcmdDelay();
  490.       000CC0   B012....             CALL    #ATcmdDelay
  491.     589                
  492.     590          
  493.     591                SendATconfigS7RX();
  494.       000CC4   B012....             CALL    #SendATconfigS7RX
  495.     592                ATcmdDelay();
  496.       000CC8   B012....             CALL    #ATcmdDelay
  497.     593                ATcmdDelay();
  498.       000CCC   B012....             CALL    #ATcmdDelay
  499.     594                ATcmdDelay();
  500.       000CD0   B012....             CALL    #ATcmdDelay
  501.     595                ATcmdDelay();
  502.       000CD4   B012....             CALL    #ATcmdDelay
  503.     596                
  504.     597                SendATconfigS0RX();
  505.       000CD8   B012....             CALL    #SendATconfigS0RX
  506.     598                ATcmdDelay();
  507.       000CDC   B012....             CALL    #ATcmdDelay
  508.     599                ATcmdDelay();
  509.       000CE0   B012....             CALL    #ATcmdDelay
  510.     600                ATcmdDelay();
  511.       000CE4   B012....             CALL    #ATcmdDelay
  512.     601                ATcmdDelay();
  513.       000CE8   B012....             CALL    #ATcmdDelay
  514.     602          
  515.     603          
  516.     604          
  517.     605          
  518.     606          
  519.     607                      
  520.     608                
  521.     609           
  522.     610          //***************************************/     
  523.     611                //gucRxTxFlag = DTERX;// set Rx Tx flag
  524.     612                _NOP();
  525.       000CEC   0343                 NOP
  526.     613                gwPageAddress = wPageAddress;
  527.       000CEE   8249....             MOV.W   R9, &gwPageAddress
  528.     614          /*      
  529.     615                while (1)
  530.     616               {
  531.     617                  SendATcmdModemSoftReset();
  532.     618                  ATcmdDelay();
  533.     619                  ATcmdDelay();
  534.     620                
  535.     621                ucRxIndex1=gucUartRxCnt-3;
  536.     622                ucRxIndex0=gucUartRxCnt-2;
  537.     623                if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1]))
  538.     624                  {break;}
  539.     625               }//while
  540.     626          */
  541.     627                    
  542.     628          }//FaxRXProcess
  543.                         ??FaxRXProcess_63:
  544.       000CF2   2152                 ADD.W   #0x4, SP
  545.       000CF4   3040....             BR      #?Epilogue8
  546.     629          
  547.                                     In segment CODE, align 2, align-sorted
  548.     630          void FaxRxInit(void)
  549.                         FaxRxInit:
  550.     631          {
  551.     632          
  552.     633                SendATconfigFS0();
  553.       000000   B012....             CALL    #SendATconfigFS0
  554.     634                ATcmdDelay();
  555.       000004   B012....             CALL    #ATcmdDelay
  556.     635                ATcmdDelay();
  557.       000008   B012....             CALL    #ATcmdDelay
  558.     636                ATcmdDelay();
  559.       00000C   B012....             CALL    #ATcmdDelay
  560.     637          //AT      
  561.     638                SendATcmdPrefix();
  562.       000010   B012....             CALL    #SendATcmdPrefix
  563.     639                ATcmdDelay();
  564.       000014   B012....             CALL    #ATcmdDelay
  565.     640                SendATcmdSuffix();
  566.       000018   B012....             CALL    #SendATcmdSuffix
  567.     641                ATcmdDelay();
  568.       00001C   B012....             CALL    #ATcmdDelay
  569.     642                ATcmdDelay();
  570.       000020   B012....             CALL    #ATcmdDelay
  571.     643                ATcmdDelay();
  572.       000024   B012....             CALL    #ATcmdDelay
  573.     644                
  574.     645                SendATconfigS7();
  575.       000028   B012....             CALL    #SendATconfigS7
  576.     646                ATcmdDelay();
  577.       00002C   B012....             CALL    #ATcmdDelay
  578.     647                ATcmdDelay();
  579.       000030   B012....             CALL    #ATcmdDelay
  580.     648                ATcmdDelay();
  581.       000034   B012....             CALL    #ATcmdDelay
  582.     649                
  583.     650                SendATconfigX4M1();
  584.       000038   B012....             CALL    #SendATconfigX4M1
  585.     651                ATcmdDelay();
  586.       00003C   B012....             CALL    #ATcmdDelay
  587.     652                ATcmdDelay();
  588.       000040   B012....             CALL    #ATcmdDelay
  589.     653                ATcmdDelay();
  590.       000044   B012....             CALL    #ATcmdDelay
  591.     654                
  592.     655                SendATcmdFCLASS();
  593.       000048   B012....             CALL    #SendATcmdFCLASS
  594.     656                ATcmdDelay();
  595.       00004C   B012....             CALL    #ATcmdDelay
  596.     657                ATcmdDelay();
  597.       000050   B012....             CALL    #ATcmdDelay
  598.     658                ATcmdDelay();
  599.       000054   B012....             CALL    #ATcmdDelay
  600.     659          //AT
  601.     660                SendATcmdPrefix();
  602.       000058   B012....             CALL    #SendATcmdPrefix
  603.     661                ATcmdDelay();
  604.       00005C   B012....             CALL    #ATcmdDelay
  605.     662                SendATcmdSuffix();
  606.       000060   B012....             CALL    #SendATcmdSuffix
  607.     663                ATcmdDelay();
  608.       000064   B012....             CALL    #ATcmdDelay
  609.     664                ATcmdDelay();
  610.       000068   B012....             CALL    #ATcmdDelay
  611.     665                ATcmdDelay();
  612.       00006C   B012....             CALL    #ATcmdDelay
  613.     666                
  614.     667                SendATcmdFCLASS();
  615.       000070   B012....             CALL    #SendATcmdFCLASS
  616.     668                ATcmdDelay();
  617.       000074   B012....             CALL    #ATcmdDelay
  618.     669                ATcmdDelay();
  619.       000078   B012....             CALL    #ATcmdDelay
  620.     670                ATcmdDelay();
  621.       00007C   B012....             CALL    #ATcmdDelay
  622.     671          //AT
  623.     672                SendATcmdPrefix();
  624.       000080   B012....             CALL    #SendATcmdPrefix
  625.     673                ATcmdDelay();
  626.       000084   B012....             CALL    #ATcmdDelay
  627.     674                SendATcmdSuffix();
  628.       000088   B012....             CALL    #SendATcmdSuffix
  629.     675                ATcmdDelay();
  630.       00008C   B012....             CALL    #ATcmdDelay
  631.     676                ATcmdDelay();
  632.       000090   B012....             CALL    #ATcmdDelay
  633.     677                ATcmdDelay();
  634.       000094   3040....             BR      #ATcmdDelay
  635.     678          } 
  636.     679          
  637.                                     In segment CODE, align 2, keep-with-next
  638.     680          void PageImageEndProcess(void)
  639.                         PageImageEndProcess:
  640.     681          {   
  641.       000000   0A12                 PUSH.W  R10
  642.       000002   0B12                 PUSH.W  R11
  643.     682                unsigned char ucRxIndex1=0,ucRxIndex0=0;
  644.       000004   4B43                 MOV.B   #0x0, R11
  645.       000006   4A43                 MOV.B   #0x0, R10
  646.     683          //FRHEOP (end of procedure)
  647.     684                SendATcmdFRH();
  648.       000008   B012....             CALL    #SendATcmdFRH
  649.     685                //ATcmdDelay();
  650.     686                
  651.     687                while (1)    
  652.     688                {
  653.     689                 ucRxIndex1=gucUartRxCnt-3;
  654.                         ??PageImageEndProcess_0:
  655.       00000C   7E40FD00             MOV.B   #0xfd, R14
  656.       000010   5E52....             ADD.B   &gucUartRxCnt, R14
  657.       000014   4B4E                 MOV.B   R14, R11
  658.     690                  ucRxIndex0=gucUartRxCnt-2;
  659.       000016   7E40FE00             MOV.B   #0xfe, R14
  660.       00001A   5E52....             ADD.B   &gucUartRxCnt, R14
  661.       00001E   4A4E                 MOV.B   R14, R10
  662.     691                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x54==aucUartRxBuf[ucRxIndex1]))
  663.       000020   3AF0FF00             AND.W   #0xff, R10
  664.       000024   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  665.       00002A   0620                 JNE     ??PageImageEndProcess_4
  666.       00002C   3BF0FF00             AND.W   #0xff, R11
  667.       000030   FB905400....         CMP.B   #0x54, aucUartRxBuf(R11)
  668.       000036   1724                 JEQ     ??PageImageEndProcess_5
  669.     692                    break;
  670.     693                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  671.     694                  RxFaxTimeOverflowErrorQuit();
  672.                         ??PageImageEndProcess_4:
  673.       000038   1E42....             MOV.W   &gwTimeOverflowCount, R14
  674.       00003C   1F43                 MOV.W   #0x1, R15
  675.       00003E   0F5E                 ADD.W   R14, R15
  676.       000040   824F....             MOV.W   R15, &gwTimeOverflowCount
  677.       000044   3E93                 CMP.W   #0xffff, R14
  678.       000046   0420                 JNE     ??PageImageEndProcess_6
  679.       000048   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  680.       00004C   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  681.                         ??PageImageEndProcess_6:
  682.       000050   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  683.       000056   DA23                 JNE     ??PageImageEndProcess_0
  684.       000058   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  685.       00005E   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  686.       000062   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  687.     695                }//while
  688.     696                
  689.     697                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  690.                         ??PageImageEndProcess_5:
  691.       000066   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  692.       00006C   9524                 JEQ     ??PageImageEndProcess_7
  693.     698                
  694.     699                while (1)    
  695.     700                {
  696.     701                 ucRxIndex1=gucUartRxCnt-3;
  697.                         ??PageImageEndProcess_1:
  698.       00006E   7E40FD00             MOV.B   #0xfd, R14
  699.       000072   5E52....             ADD.B   &gucUartRxCnt, R14
  700.       000076   4B4E                 MOV.B   R14, R11
  701.     702                  ucRxIndex0=gucUartRxCnt-2;
  702.       000078   7E40FE00             MOV.B   #0xfe, R14
  703.       00007C   5E52....             ADD.B   &gucUartRxCnt, R14
  704.       000080   4A4E                 MOV.B   R14, R10
  705.     703                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1]))
  706.       000082   3AF0FF00             AND.W   #0xff, R10
  707.       000086   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  708.       00008C   0620                 JNE     ??PageImageEndProcess_8
  709.       00008E   3BF0FF00             AND.W   #0xff, R11
  710.       000092   FB904B00....         CMP.B   #0x4b, aucUartRxBuf(R11)
  711.       000098   1724                 JEQ     ??PageImageEndProcess_9
  712.     704                    break;
  713.     705                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  714.     706                  RxFaxTimeOverflowErrorQuit();
  715.                         ??PageImageEndProcess_8:
  716.       00009A   1E42....             MOV.W   &gwTimeOverflowCount, R14
  717.       00009E   1F43                 MOV.W   #0x1, R15
  718.       0000A0   0F5E                 ADD.W   R14, R15
  719.       0000A2   824F....             MOV.W   R15, &gwTimeOverflowCount
  720.       0000A6   3E93                 CMP.W   #0xffff, R14
  721.       0000A8   0420                 JNE     ??PageImageEndProcess_10
  722.       0000AA   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  723.       0000AE   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  724.                         ??PageImageEndProcess_10:
  725.       0000B2   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  726.       0000B8   DA23                 JNE     ??PageImageEndProcess_1
  727.       0000BA   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  728.       0000C0   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  729.       0000C4   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  730.     707                }
  731.     708                
  732.     709                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007. 
  733.                         ??PageImageEndProcess_9:
  734.       0000C8   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  735.       0000CE   6424                 JEQ     ??PageImageEndProcess_7
  736.     710                         
  737.     711          //FTHMCF  (message confirmation)
  738.     712                SendATcmdFTH();
  739.       0000D0   B012....             CALL    #SendATcmdFTH
  740.     713                while (1)    
  741.     714                {
  742.     715                 ucRxIndex1=gucUartRxCnt-3;
  743.                         ??PageImageEndProcess_2:
  744.       0000D4   7E40FD00             MOV.B   #0xfd, R14
  745.       0000D8   5E52....             ADD.B   &gucUartRxCnt, R14
  746.       0000DC   4B4E                 MOV.B   R14, R11
  747.     716                  ucRxIndex0=gucUartRxCnt-2;
  748.       0000DE   7E40FE00             MOV.B   #0xfe, R14
  749.       0000E2   5E52....             ADD.B   &gucUartRxCnt, R14
  750.       0000E6   4A4E                 MOV.B   R14, R10
  751.     717                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x54==aucUartRxBuf[ucRxIndex1]))
  752.       0000E8   3AF0FF00             AND.W   #0xff, R10
  753.       0000EC   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  754.       0000F2   0620                 JNE     ??PageImageEndProcess_11
  755.       0000F4   3BF0FF00             AND.W   #0xff, R11
  756.       0000F8   FB905400....         CMP.B   #0x54, aucUartRxBuf(R11)
  757.       0000FE   1724                 JEQ     ??PageImageEndProcess_12
  758.     718                    break;
  759.     719                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  760.     720                  RxFaxTimeOverflowErrorQuit();
  761.                         ??PageImageEndProcess_11:
  762.       000100   1E42....             MOV.W   &gwTimeOverflowCount, R14
  763.       000104   1F43                 MOV.W   #0x1, R15
  764.       000106   0F5E                 ADD.W   R14, R15
  765.       000108   824F....             MOV.W   R15, &gwTimeOverflowCount
  766.       00010C   3E93                 CMP.W   #0xffff, R14
  767.       00010E   0420                 JNE     ??PageImageEndProcess_13
  768.       000110   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  769.       000114   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  770.                         ??PageImageEndProcess_13:
  771.       000118   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  772.       00011E   DA23                 JNE     ??PageImageEndProcess_2
  773.       000120   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  774.       000126   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  775.       00012A   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  776.     721                }
  777.     722                
  778.     723                if (gucFrhErrorStatus == 0x03) return; //add at Mar. 16, 2007.
  779.                         ??PageImageEndProcess_12:
  780.       00012E   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  781.       000134   3124                 JEQ     ??PageImageEndProcess_7
  782.     724                
  783.     725                Delay1500ms();  // delay 1.5S minimun 1 second
  784.       000136   B012....             CALL    #Delay1500ms
  785.     726                SendATdataFTHMCF();
  786.       00013A   B012....             CALL    #SendATdataFTHMCF
  787.     727                while (1)    
  788.     728                {
  789.     729                 ucRxIndex1=gucUartRxCnt-3;
  790.                         ??PageImageEndProcess_3:
  791.       00013E   7E40FD00             MOV.B   #0xfd, R14
  792.       000142   5E52....             ADD.B   &gucUartRxCnt, R14
  793.       000146   4B4E                 MOV.B   R14, R11
  794.     730                  ucRxIndex0=gucUartRxCnt-2;
  795.       000148   7E40FE00             MOV.B   #0xfe, R14
  796.       00014C   5E52....             ADD.B   &gucUartRxCnt, R14
  797.       000150   4A4E                 MOV.B   R14, R10
  798.     731                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1]))
  799.       000152   3AF0FF00             AND.W   #0xff, R10
  800.       000156   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  801.       00015C   0620                 JNE     ??PageImageEndProcess_14
  802.       00015E   3BF0FF00             AND.W   #0xff, R11
  803.       000162   FB904B00....         CMP.B   #0x4b, aucUartRxBuf(R11)
  804.       000168   1724                 JEQ     ??PageImageEndProcess_7
  805.     732                    break;
  806.     733                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  807.     734                  RxFaxTimeOverflowErrorQuit();
  808.                         ??PageImageEndProcess_14:
  809.       00016A   1E42....             MOV.W   &gwTimeOverflowCount, R14
  810.       00016E   1F43                 MOV.W   #0x1, R15
  811.       000170   0F5E                 ADD.W   R14, R15
  812.       000172   824F....             MOV.W   R15, &gwTimeOverflowCount
  813.       000176   3E93                 CMP.W   #0xffff, R14
  814.       000178   0420                 JNE     ??PageImageEndProcess_15
  815.       00017A   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  816.       00017E   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  817.                         ??PageImageEndProcess_15:
  818.       000182   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  819.       000188   DA23                 JNE     ??PageImageEndProcess_3
  820.       00018A   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  821.       000190   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  822.       000194   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  823.                         ??PageImageEndProcess_7:
  824.       000198   3B41                 POP.W   R11
  825.       00019A   3A41                 POP.W   R10
  826.       00019C   3041                 RET
  827.     735                } 
  828.     736                
  829.     737                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  830.     738          }
  831.     739          
  832.     740          
  833.                                     In segment CODE, align 2, align-sorted
  834.     741          void FRHDncProcess(void)
  835.                         FRHDncProcess:
  836.     742          {
  837.     743           ;
  838.     744          }
  839.       000000   3041                 RET
  840.     745          
  841.                                     In segment CODE, align 2, keep-with-next
  842.     746          void FthCsiDis(void)
  843.                         FthCsiDis:
  844.     747          {
  845.       000000   0A12                 PUSH.W  R10
  846.       000002   0B12                 PUSH.W  R11
  847.       000004   0812                 PUSH.W  R8
  848.     748                unsigned char ucRxIndex1=0,ucRxIndex0=0,
  849.       000006   4B43                 MOV.B   #0x0, R11
  850.       000008   4A43                 MOV.B   #0x0, R10
  851.     749                              ucGeneralCount=0;
  852.       00000A   4843                 MOV.B   #0x0, R8
  853.     750          //FTH
  854.     751                SendATcmdFTH();
  855.       00000C   B012....             CALL    #SendATcmdFTH
  856.     752                while (1)  //CONNECT(54) 0D 0A
  857.     753                {
  858.     754                 ucRxIndex1=gucUartRxCnt-3;
  859.                         ??FthCsiDis_0:
  860.       000010   7E40FD00             MOV.B   #0xfd, R14
  861.       000014   5E52....             ADD.B   &gucUartRxCnt, R14
  862.       000018   4B4E                 MOV.B   R14, R11
  863.     755                  ucRxIndex0=gucUartRxCnt-2;
  864.       00001A   7E40FE00             MOV.B   #0xfe, R14
  865.       00001E   5E52....             ADD.B   &gucUartRxCnt, R14
  866.       000022   4A4E                 MOV.B   R14, R10
  867.     756                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x54==aucUartRxBuf[ucRxIndex1]))
  868.       000024   3AF0FF00             AND.W   #0xff, R10
  869.       000028   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  870.       00002E   0620                 JNE     ??FthCsiDis_4
  871.       000030   3BF0FF00             AND.W   #0xff, R11
  872.       000034   FB905400....         CMP.B   #0x54, aucUartRxBuf(R11)
  873.       00003A   1724                 JEQ     ??FthCsiDis_5
  874.     757                    break;
  875.     758                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  876.     759                  RxFaxTimeOverflowErrorQuit();
  877.                         ??FthCsiDis_4:
  878.       00003C   1E42....             MOV.W   &gwTimeOverflowCount, R14
  879.       000040   1F43                 MOV.W   #0x1, R15
  880.       000042   0F5E                 ADD.W   R14, R15
  881.       000044   824F....             MOV.W   R15, &gwTimeOverflowCount
  882.       000048   3E93                 CMP.W   #0xffff, R14
  883.       00004A   0420                 JNE     ??FthCsiDis_6
  884.       00004C   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  885.       000050   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  886.                         ??FthCsiDis_6:
  887.       000054   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  888.       00005A   DA23                 JNE     ??FthCsiDis_0
  889.       00005C   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  890.       000062   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  891.       000066   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  892.     760          
  893.     761                }
  894.     762                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  895.                         ??FthCsiDis_5:
  896.       00006A   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  897.       000070   6C24                 JEQ     ??FthCsiDis_7
  898.     763                
  899.     764                Delay1500ms();  // delay 1.5S minimun 1 second
  900.       000072   B012....             CALL    #Delay1500ms
  901.     765                
  902.     766                SendATdataFTHCSI();    //The final bit is 0. The modem will generates CONNECT message.
  903.       000076   B012....             CALL    #SendATdataFTHCSI
  904.     767                while (1)  //CONNECT(54) 0D 0A
  905.     768                {
  906.     769                  ucRxIndex1=gucUartRxCnt-3;
  907.                         ??FthCsiDis_1:
  908.       00007A   7E40FD00             MOV.B   #0xfd, R14
  909.       00007E   5E52....             ADD.B   &gucUartRxCnt, R14
  910.       000082   4B4E                 MOV.B   R14, R11
  911.     770                  ucRxIndex0=gucUartRxCnt-2;
  912.       000084   7E40FE00             MOV.B   #0xfe, R14
  913.       000088   5E52....             ADD.B   &gucUartRxCnt, R14
  914.       00008C   4A4E                 MOV.B   R14, R10
  915.     771                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x54==aucUartRxBuf[ucRxIndex1]))
  916.       00008E   3AF0FF00             AND.W   #0xff, R10
  917.       000092   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  918.       000098   0620                 JNE     ??FthCsiDis_8
  919.       00009A   3BF0FF00             AND.W   #0xff, R11
  920.       00009E   FB905400....         CMP.B   #0x54, aucUartRxBuf(R11)
  921.       0000A4   1724                 JEQ     ??FthCsiDis_9
  922.     772                    break;
  923.     773                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  924.     774                  RxFaxTimeOverflowErrorQuit();
  925.                         ??FthCsiDis_8:
  926.       0000A6   1E42....             MOV.W   &gwTimeOverflowCount, R14
  927.       0000AA   1F43                 MOV.W   #0x1, R15
  928.       0000AC   0F5E                 ADD.W   R14, R15
  929.       0000AE   824F....             MOV.W   R15, &gwTimeOverflowCount
  930.       0000B2   3E93                 CMP.W   #0xffff, R14
  931.       0000B4   0420                 JNE     ??FthCsiDis_10
  932.       0000B6   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  933.       0000BA   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  934.                         ??FthCsiDis_10:
  935.       0000BE   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  936.       0000C4   DA23                 JNE     ??FthCsiDis_1
  937.       0000C6   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  938.       0000CC   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  939.       0000D0   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  940.     775                }
  941.     776                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  942.                         ??FthCsiDis_9:
  943.       0000D4   F2900300....         CMP.B   #0x3, &gucFrhErrorStatus
  944.       0000DA   3724                 JEQ     ??FthCsiDis_7
  945.     777                
  946.     778                for (ucGeneralCount=0; ucGeneralCount<50; ucGeneralCount++)// delay 1.5S minimun 1 second
  947.       0000DC   4843                 MOV.B   #0x0, R8
  948.                         ??FthCsiDis_2:
  949.       0000DE   78903200             CMP.B   #0x32, R8
  950.       0000E2   042C                 JC      ??FthCsiDis_11
  951.     779                {
  952.     780                   ATcmdDelay();  //50ms
  953.       0000E4   B012....             CALL    #ATcmdDelay
  954.     781                }
  955.       0000E8   5853                 ADD.B   #0x1, R8
  956.       0000EA   F93F                 JMP     ??FthCsiDis_2
  957.     782          
  958.     783                SendATdataFTHDIS();//SendATdataFTHTSI(sizeof (FTHDIS)); a bug of Sep.18
  959.                         ??FthCsiDis_11:
  960.       0000EC   B012....             CALL    #SendATdataFTHDIS
  961.     784                
  962.     785                while (1)    //O K 0D 0A
  963.     786                {
  964.     787                  ucRxIndex1=gucUartRxCnt-3;
  965.                         ??FthCsiDis_3:
  966.       0000F0   7E40FD00             MOV.B   #0xfd, R14
  967.       0000F4   5E52....             ADD.B   &gucUartRxCnt, R14
  968.       0000F8   4B4E                 MOV.B   R14, R11
  969.     788                  ucRxIndex0=gucUartRxCnt-2;
  970.       0000FA   7E40FE00             MOV.B   #0xfe, R14
  971.       0000FE   5E52....             ADD.B   &gucUartRxCnt, R14
  972.       000102   4A4E                 MOV.B   R14, R10
  973.     789                  if ((0x0d==aucUartRxBuf[ucRxIndex0])&&(0x4B==aucUartRxBuf[ucRxIndex1])) //K ==0x4b
  974.       000104   3AF0FF00             AND.W   #0xff, R10
  975.       000108   FA900D00....         CMP.B   #0xd, aucUartRxBuf(R10)
  976.       00010E   0620                 JNE     ??FthCsiDis_12
  977.       000110   3BF0FF00             AND.W   #0xff, R11
  978.       000114   FB904B00....         CMP.B   #0x4b, aucUartRxBuf(R11)
  979.       00011A   1724                 JEQ     ??FthCsiDis_7
  980.     790                    break;
  981.     791                  //if check time>min. 5S, Receive Fax error, progra should be quit  
  982.     792                  RxFaxTimeOverflowErrorQuit();
  983.                         ??FthCsiDis_12:
  984.       00011C   1E42....             MOV.W   &gwTimeOverflowCount, R14
  985.       000120   1F43                 MOV.W   #0x1, R15
  986.       000122   0F5E                 ADD.W   R14, R15
  987.       000124   824F....             MOV.W   R15, &gwTimeOverflowCount
  988.       000128   3E93                 CMP.W   #0xffff, R14
  989.       00012A   0420                 JNE     ??FthCsiDis_13
  990.       00012C   D253....             ADD.B   #0x1, &gucTimeOverflowCount
  991.       000130   C243....             MOV.B   #0x0, &gucFrhErrorStatus
  992.                         ??FthCsiDis_13:
  993.       000134   F2901400....         CMP.B   #0x14, &gucTimeOverflowCount
  994.       00013A   DA23                 JNE     ??FthCsiDis_3
  995.       00013C   F2400300....         MOV.B   #0x3, &gucFrhErrorStatus
  996.       000142   C243....             MOV.B   #0x0, &gucTimeOverflowCount
  997.       000146   8243....             MOV.W   #0x0, &gwTimeOverflowCount
  998.                         ??FthCsiDis_7:
  999.       00014A   3841                 POP.W   R8
  1000.       00014C   3B41                 POP.W   R11
  1001.       00014E   3A41                 POP.W   R10
  1002.       000150   3041                 RET
  1003.     793                }
  1004.     794                
  1005.     795                if (gucFrhErrorStatus==0x03) return; //add at Mar. 16, 2007.
  1006.     796          } 
  1007.    Maximum stack usage in bytes:
  1008.      Function                    CSTACK
  1009.      --------                    ------
  1010.      FRHDncProcess                   2
  1011.      FaxRXProcess                   22
  1012.        -> FaxRxInit                 22
  1013.        -> SendATcmdATA              22
  1014.        -> Delay1500ms               22
  1015.        -> SendATdataFTHCSI          22
  1016.        -> ATcmdDelay                22
  1017.        -> SendATdataFTHDIS          22
  1018.        -> SendATcmdFRH              22
  1019.        -> SendATcmdSuffix           22
  1020.        -> ATcmdDelay                22
  1021.        -> ATcmdDelay                22
  1022.        -> ATcmdDelay                22
  1023.        -> SendATcmdPrefix           22
  1024.        -> ATcmdDelay                22
  1025.        -> SendATcmdSuffix           22
  1026.        -> ATcmdDelay                22
  1027.        -> ATcmdDelay                22
  1028.        -> ATcmdDelay                22
  1029.        -> Delay2000ms               22
  1030.        -> FthCsiDis                 22
  1031.        -> SendATcmdFRH              22
  1032.        -> SendATcmdFRH              22
  1033.        -> SendATcmdFRM              22
  1034.        -> SendATcmdFTH              22
  1035.        -> ATcmdDelay                22
  1036.        -> SendATdataFTHCFR          22
  1037.        -> SendATcmdFRM              22
  1038.        -> CalNextPageAddress        22
  1039.        -> ERASE_ONE_BLOCK           22
  1040.        -> COMMAND_LATCH_INTO        22
  1041.        -> ADDRESS_LATCH_INTO        22
  1042.        -> ADDRESS_LATCH_INTO        22
  1043.        -> ADDRESS_LATCH_INTO        22
  1044.        -> ADDRESS_LATCH_INTO        22
  1045.        -> PageImageEndProcess       22
  1046.        -> SendATcmdFRM              22
  1047.        -> COMMAND_LATCH_INTO        22
  1048.        -> READ_STATUS               22
  1049.        -> CalNextPageAddress        22
  1050.        -> ERASE_ONE_BLOCK           22
  1051.        -> COMMAND_LATCH_INTO        22
  1052.        -> ADDRESS_LATCH_INTO        22
  1053.        -> ADDRESS_LATCH_INTO        22
  1054.        -> ADDRESS_LATCH_INTO        22
  1055.        -> ADDRESS_LATCH_INTO        22
  1056.        -> SendATcmdFRH              22
  1057.        -> COMMAND_LATCH_INTO        22
  1058.        -> READ_STATUS               22
  1059.        -> CalNextPageAddress        22
  1060.        -> ERASE_ONE_BLOCK           22
  1061.        -> COMMAND_LATCH_INTO        22
  1062.        -> ADDRESS_LATCH_INTO        22
  1063.        -> ADDRESS_LATCH_INTO        22
  1064.        -> ADDRESS_LATCH_INTO        22
  1065.        -> ADDRESS_LATCH_INTO        22
  1066.        -> COMMAND_LATCH_INTO        22
  1067.        -> READ_STATUS               22
  1068.        -> SendATcmdH0               22
  1069.        -> ATcmdDelay                22
  1070.        -> ATcmdDelay                22
  1071.        -> ATcmdDelay                22
  1072.        -> ATcmdDelay                22
  1073.        -> SendATcmdH0               22
  1074.        -> ATcmdDelay                22
  1075.        -> ATcmdDelay                22
  1076.        -> ATcmdDelay                22
  1077.        -> ATcmdDelay                22
  1078.        -> ATcmdDelay                22
  1079.        -> ATcmdDelay                22
  1080.        -> ATcmdDelay                22
  1081.        -> ATcmdDelay                22
  1082.        -> SendATcmdFCLASS0          22
  1083.        -> ATcmdDelay                22
  1084.        -> ATcmdDelay                22
  1085.        -> ATcmdDelay                22
  1086.        -> ATcmdDelay                22
  1087.        -> SendATcmdPrefix           22
  1088.        -> ATcmdDelay                22
  1089.        -> SendATcmdSuffix           22
  1090.        -> ATcmdDelay                22
  1091.        -> ATcmdDelay                22
  1092.        -> ATcmdDelay                22
  1093.        -> SendATcmdPrefix           22
  1094.        -> ATcmdDelay                22
  1095.        -> SendATcmdSuffix           22
  1096.        -> ATcmdDelay                22
  1097.        -> ATcmdDelay                22
  1098.        -> ATcmdDelay                22
  1099.        -> SendATcmdPrefix           22
  1100.        -> ATcmdDelay                22
  1101.        -> SendATcmdSuffix           22
  1102.        -> ATcmdDelay                22
  1103.        -> ATcmdDelay                22
  1104.        -> ATcmdDelay                22
  1105.        -> SendATconfigFE0EndofRX    22
  1106.        -> ATcmdDelay                22
  1107.        -> ATcmdDelay                22
  1108.        -> ATcmdDelay                22
  1109.        -> ATcmdDelay                22
  1110.        -> SendATconfigS7RX          22
  1111.        -> ATcmdDelay                22
  1112.        -> ATcmdDelay                22
  1113.        -> ATcmdDelay                22
  1114.        -> ATcmdDelay                22
  1115.        -> SendATconfigS0RX          22
  1116.        -> ATcmdDelay                22
  1117.        -> ATcmdDelay                22
  1118.        -> ATcmdDelay                22
  1119.        -> ATcmdDelay                22
  1120.      FaxRxInit                       2
  1121.        -> SendATconfigFS0            2
  1122.        -> ATcmdDelay                 2
  1123.        -> ATcmdDelay                 2
  1124.        -> ATcmdDelay                 2
  1125.        -> SendATcmdPrefix            2
  1126.        -> ATcmdDelay                 2
  1127.        -> SendATcmdSuffix            2
  1128.        -> ATcmdDelay                 2
  1129.        -> ATcmdDelay                 2
  1130.        -> ATcmdDelay                 2
  1131.        -> SendATconfigS7             2
  1132.        -> ATcmdDelay                 2
  1133.        -> ATcmdDelay                 2
  1134.        -> ATcmdDelay                 2
  1135.        -> SendATconfigX4M1           2
  1136.        -> ATcmdDelay                 2
  1137.        -> ATcmdDelay                 2
  1138.        -> ATcmdDelay                 2
  1139.        -> SendATcmdFCLASS            2
  1140.        -> ATcmdDelay                 2
  1141.        -> ATcmdDelay                 2
  1142.        -> ATcmdDelay                 2
  1143.        -> SendATcmdPrefix            2
  1144.        -> ATcmdDelay                 2
  1145.        -> SendATcmdSuffix            2
  1146.        -> ATcmdDelay                 2
  1147.        -> ATcmdDelay                 2
  1148.        -> ATcmdDelay                 2
  1149.        -> SendATcmdFCLASS            2
  1150.        -> ATcmdDelay                 2
  1151.        -> ATcmdDelay                 2
  1152.        -> ATcmdDelay                 2
  1153.        -> SendATcmdPrefix            2
  1154.        -> ATcmdDelay                 2
  1155.        -> SendATcmdSuffix            2
  1156.        -> ATcmdDelay                 2
  1157.        -> ATcmdDelay                 2
  1158.        -> ATcmdDelay                 2
  1159.      FthCsiDis                       8
  1160.        -> SendATcmdFTH               8
  1161.        -> Delay1500ms                8
  1162.        -> SendATdataFTHCSI           8
  1163.        -> ATcmdDelay                 8
  1164.        -> SendATdataFTHDIS           8
  1165.      PageImageEndProcess             6
  1166.        -> SendATcmdFRH               6
  1167.        -> SendATcmdFTH               6
  1168.        -> Delay1500ms                6
  1169.        -> SendATdataFTHMCF           6
  1170.    Segment part sizes:
  1171.      Function/Label      Bytes
  1172.      --------------      -----
  1173.      P2OUT                  1
  1174.      P5OUT                  1
  1175.      P5DIR                  1
  1176.      FaxRXProcess        3320
  1177.      FaxRxInit            152
  1178.      PageImageEndProcess  414
  1179.      FRHDncProcess          2
  1180.      FthCsiDis            338
  1181.  
  1182.  4 226 bytes in segment CODE
  1183.      3 bytes in segment DATA16_AN
  1184.  
  1185.  4 226 bytes of CODE memory
  1186.      0 bytes of DATA memory (+ 3 bytes shared)
  1187. Errors: none
  1188. Warnings: none