FaxRxBuf2Flash.lst
上传用户:xhjmsc
上传日期:2019-09-13
资源大小:389k
文件大小:43k
- ##############################################################################
- # #
- # IAR MSP430 C/EC++ Compiler V2.10A/W32 23/Apr/2007 18:04:09 #
- # Copyright 1996-2003 IAR Systems. All rights reserved. #
- # #
- # __rt_version = 1 #
- # __double_size = 32 #
- # __reg_r4 = free #
- # __reg_r5 = free #
- # __pic = no #
- # Source file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # filesFaxRxBuf2Flash.c #
- # Command line = -I "C:Program FilesIAR SystemsEmbedded Workbench #
- # 3.2430INC" -I "C:Program FilesIAR #
- # SystemsEmbedded Workbench 3.2430INCCLIB" -lCN #
- # E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugList -lA E:projectFaxProgramVson_Bryan_Fax_ #
- # Conexant_070423DebugList -o #
- # E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugObj -z2 --no_cse --no_unroll --no_inline #
- # --no_code_motion --debug -e #
- # E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # filesFaxRxBuf2Flash.c #
- # List file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugListFaxRxBuf2Flash.lst #
- # Object file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugObjFaxRxBuf2Flash.r43 #
- # #
- # #
- ##############################################################################
- E:projectFaxProgramVson_Bryan_Fax_Conexant_070423filesFaxRxBuf2Flash.c
- 1
- 2 //**************************************************************************
- 3
- 4 #include "includeH.h"
- In segment DATA16_AN, at 0x28
- unsigned char const volatile __data P2IN
- P2IN:
- 000000 DS8 1
- In segment DATA16_AN, at 0x29
- unsigned char volatile __data P2OUT
- P2OUT:
- 000000 DS8 1
- 5
- In segment CODE, align 2, keep-with-next
- 6 void FaxRxBufRawdata2Flash(void)
- FaxRxBufRawdata2Flash:
- 7 {
- 000000 0A12 PUSH.W R10
- 000002 0B12 PUSH.W R11
- 000004 0812 PUSH.W R8
- 000006 0912 PUSH.W R9
- 000008 0612 PUSH.W R6
- 00000A 0712 PUSH.W R7
- 00000C 0412 PUSH.W R4
- 00000E 0512 PUSH.W R5
- 000010 2183 SUB.W #0x2, SP
- 8 unsigned char
- 9 ucRxIndex=0,ucGeneralCnt=0,ucFlashSttsOverflowCnt=0,
- 000012 4B43 MOV.B #0x0, R11
- 000014 4A43 MOV.B #0x0, R10
- 000016 4543 MOV.B #0x0, R5
- 10 ucBlockCnt=0;
- 000018 4943 MOV.B #0x0, R9
- 11 unsigned int wPageCount=0,wRxBufPageRearAddress=0,
- 00001A 0643 MOV.W #0x0, R6
- 00001C 81430000 MOV.W #0x0, 0x0(SP)
- 12 wNextPageAddress=0,wPageAddress=cstFaxRxBufStartPage,
- 000020 0443 MOV.W #0x0, R4
- 000022 3840C004 MOV.W #0x4c0, R8
- 13 wEveryFaxHead=0;//wFaxPropertyNo=0;
- 000026 0743 MOV.W #0x0, R7
- 14
- 15
- 16
- 17
- 18 wRxBufPageRearAddress=gwPageAddress;//1226;//gwPageAddress;
- 000028 9142....0000 MOV.W &gwPageAddress, 0x0(SP)
- 19 ViewCommunicationRX();//read fax time
- 00002E B012.... CALL #ViewCommunicationRX
- 20 for(ucGeneralCnt=0;ucGeneralCnt<255;ucGeneralCnt++)
- 000032 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_0:
- 000034 7A93 CMP.B #0xff, R10
- 000036 072C JC ??FaxRxBufRawdata2Flash_13
- 21 {
- 22 aucUartRxBuf[ucGeneralCnt]=0; //clear RX buffer
- 000038 4E4A MOV.B R10, R14
- 00003A 3EF0FF00 AND.W #0xff, R14
- 00003E CE43.... MOV.B #0x0, aucUartRxBuf(R14)
- 23 }
- 000042 5A53 ADD.B #0x1, R10
- 000044 F73F JMP ??FaxRxBufRawdata2Flash_0
- 24
- 25 gdwRxQueueFrontCnt += 2048;
- ??FaxRxBufRawdata2Flash_13:
- 000046 B2500008.... ADD.W #0x800, &gdwRxQueueFrontCnt
- 00004C 8263.... ADDC.W #0x0, &gdwRxQueueFrontCnt + 0x2
- 26 //Fax packet head ba 23 ba 23
- 27 ucRxIndex=0; //write Fax Property
- 000050 4B43 MOV.B #0x0, R11
- 28 aucUartRxBuf[ucRxIndex++] = 0xba;
- 000052 4E4B MOV.B R11, R14
- 000054 3EF0FF00 AND.W #0xff, R14
- 000058 FE40BA00.... MOV.B #0xba, aucUartRxBuf(R14)
- 00005E 5B53 ADD.B #0x1, R11
- 29 aucUartRxBuf[ucRxIndex++] = 0x23;
- 000060 4E4B MOV.B R11, R14
- 000062 3EF0FF00 AND.W #0xff, R14
- 000066 FE402300.... MOV.B #0x23, aucUartRxBuf(R14)
- 00006C 5B53 ADD.B #0x1, R11
- 30 aucUartRxBuf[ucRxIndex++] = 0xba;
- 00006E 4E4B MOV.B R11, R14
- 000070 3EF0FF00 AND.W #0xff, R14
- 000074 FE40BA00.... MOV.B #0xba, aucUartRxBuf(R14)
- 00007A 5B53 ADD.B #0x1, R11
- 31 aucUartRxBuf[ucRxIndex++] = 0x23;
- 00007C 4E4B MOV.B R11, R14
- 00007E 3EF0FF00 AND.W #0xff, R14
- 000082 FE402300.... MOV.B #0x23, aucUartRxBuf(R14)
- 000088 5B53 ADD.B #0x1, R11
- 32 for(ucGeneralCnt=0;ucGeneralCnt<8;ucGeneralCnt++)
- 00008A 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_1:
- 00008C 7A92 CMP.B #0x8, R10
- 00008E 092C JC ??FaxRxBufRawdata2Flash_14
- 33 {
- 34 aucUartRxBuf[ucRxIndex++] = 0x55;
- 000090 4E4B MOV.B R11, R14
- 000092 3EF0FF00 AND.W #0xff, R14
- 000096 FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 00009C 5B53 ADD.B #0x1, R11
- 35 }
- 00009E 5A53 ADD.B #0x1, R10
- 0000A0 F53F JMP ??FaxRxBufRawdata2Flash_1
- 36 //fax Length
- 37 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt & 0xff);
- ??FaxRxBufRawdata2Flash_14:
- 0000A2 4E4B MOV.B R11, R14
- 0000A4 3EF0FF00 AND.W #0xff, R14
- 0000A8 DE42........ MOV.B &gdwRxQueueFrontCnt, aucUartRxBuf(R14)
- 0000AE 5B53 ADD.B #0x1, R11
- 38 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt >> 8) & 0xff;
- 0000B0 4E4B MOV.B R11, R14
- 0000B2 3EF0FF00 AND.W #0xff, R14
- 0000B6 1F42.... MOV.W &gdwRxQueueFrontCnt, R15
- 0000BA 8F10 SWPB R15
- 0000BC 3FF0FF00 AND.W #0xff, R15
- 0000C0 CE4F.... MOV.B R15, aucUartRxBuf(R14)
- 0000C4 5B53 ADD.B #0x1, R11
- 39 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt>>16) & 0xff;
- 0000C6 4E4B MOV.B R11, R14
- 0000C8 3EF0FF00 AND.W #0xff, R14
- 0000CC DE42........ MOV.B &gdwRxQueueFrontCnt + 0x2, aucUartRxBuf(R14)
- 0000D2 5B53 ADD.B #0x1, R11
- 40 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt>>24) & 0xff;
- 0000D4 4C4B MOV.B R11, R12
- 0000D6 3CF0FF00 AND.W #0xff, R12
- 0000DA 1E42.... MOV.W &gdwRxQueueFrontCnt, R14
- 0000DE 1F42.... MOV.W &gdwRxQueueFrontCnt + 0x2, R15
- 0000E2 8F10 SWPB R15
- 0000E4 4E4F MOV.B R15, R14
- 0000E6 0F43 MOV.W #0x0, R15
- 0000E8 CC4E.... MOV.B R14, aucUartRxBuf(R12)
- 0000EC 5B53 ADD.B #0x1, R11
- 41 for(ucGeneralCnt=0;ucGeneralCnt<8;ucGeneralCnt++)
- 0000EE 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_2:
- 0000F0 7A92 CMP.B #0x8, R10
- 0000F2 092C JC ??FaxRxBufRawdata2Flash_15
- 42 {
- 43 aucUartRxBuf[ucRxIndex++] = 0x55;
- 0000F4 4E4B MOV.B R11, R14
- 0000F6 3EF0FF00 AND.W #0xff, R14
- 0000FA FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 000100 5B53 ADD.B #0x1, R11
- 44 }
- 000102 5A53 ADD.B #0x1, R10
- 000104 F53F JMP ??FaxRxBufRawdata2Flash_2
- 45 //fax time
- 46 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewSecondIndex];// //second
- ??FaxRxBufRawdata2Flash_15:
- 000106 4E4B MOV.B R11, R14
- 000108 3EF0FF00 AND.W #0xff, R14
- 00010C DE42........ MOV.B &aucViewData + 0x2, aucUartRxBuf(R14)
- 000112 5B53 ADD.B #0x1, R11
- 47 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewMinuteIndex];// //minute
- 000114 4E4B MOV.B R11, R14
- 000116 3EF0FF00 AND.W #0xff, R14
- 00011A DE42........ MOV.B &aucViewData + 0x1, aucUartRxBuf(R14)
- 000120 5B53 ADD.B #0x1, R11
- 48 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewHourIndex];//hour
- 000122 4E4B MOV.B R11, R14
- 000124 3EF0FF00 AND.W #0xff, R14
- 000128 DE42........ MOV.B &aucViewData, aucUartRxBuf(R14)
- 00012E 5B53 ADD.B #0x1, R11
- 49 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewDateIndex];//date
- 000130 4E4B MOV.B R11, R14
- 000132 3EF0FF00 AND.W #0xff, R14
- 000136 DE42........ MOV.B &aucViewData + 0x4, aucUartRxBuf(R14)
- 00013C 5B53 ADD.B #0x1, R11
- 50 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewMonthIndex];//month
- 00013E 4E4B MOV.B R11, R14
- 000140 3EF0FF00 AND.W #0xff, R14
- 000144 DE42........ MOV.B &aucViewData + 0x3, aucUartRxBuf(R14)
- 00014A 5B53 ADD.B #0x1, R11
- 51 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewYearIndex];//Year
- 00014C 4E4B MOV.B R11, R14
- 00014E 3EF0FF00 AND.W #0xff, R14
- 000152 DE42........ MOV.B &aucViewData + 0x5, aucUartRxBuf(R14)
- 000158 5B53 ADD.B #0x1, R11
- 52 //fax Head and Rear Address
- 53 //aucUartRxBuf[ucRxIndex++] = wEveryFaxHead & 0xff;
- 54 //aucUartRxBuf[ucRxIndex++] = (wEveryFaxHead>>8) & 0xff;
- 55 //aucUartRxBuf[ucRxIndex++] = gwPageAddress & 0xff;
- 56 //aucUartRxBuf[ucRxIndex++] = (gwPageAddress>>8) & 0xff;
- 57 for(ucGeneralCnt=0;ucGeneralCnt<8;ucGeneralCnt++)
- 00015A 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_3:
- 00015C 7A92 CMP.B #0x8, R10
- 00015E 092C JC ??FaxRxBufRawdata2Flash_16
- 58 {
- 59 aucUartRxBuf[ucRxIndex++] = 0x55;
- 000160 4E4B MOV.B R11, R14
- 000162 3EF0FF00 AND.W #0xff, R14
- 000166 FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 00016C 5B53 ADD.B #0x1, R11
- 60 }
- 00016E 5A53 ADD.B #0x1, R10
- 000170 F53F JMP ??FaxRxBufRawdata2Flash_3
- 61
- 62 //fax Telephone Number
- 63 for (ucGeneralCnt=0; ucGeneralCnt<25; ucGeneralCnt++)
- ??FaxRxBufRawdata2Flash_16:
- 000172 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_4:
- 000174 7A901900 CMP.B #0x19, R10
- 000178 0C2C JC ??FaxRxBufRawdata2Flash_17
- 64 {
- 65 aucUartRxBuf[ucRxIndex++] = FRHTSI[ucGeneralCnt];
- 00017A 4F4B MOV.B R11, R15
- 00017C 3FF0FF00 AND.W #0xff, R15
- 000180 4E4A MOV.B R10, R14
- 000182 3EF0FF00 AND.W #0xff, R14
- 000186 DF4E........ MOV.B FRHTSI(R14), aucUartRxBuf(R15)
- 00018C 5B53 ADD.B #0x1, R11
- 66 }
- 00018E 5A53 ADD.B #0x1, R10
- 000190 F13F JMP ??FaxRxBufRawdata2Flash_4
- 67 for(ucGeneralCnt=0;ucGeneralCnt<8;ucGeneralCnt++)
- ??FaxRxBufRawdata2Flash_17:
- 000192 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_5:
- 000194 7A92 CMP.B #0x8, R10
- 000196 092C JC ??FaxRxBufRawdata2Flash_18
- 68 {
- 69 aucUartRxBuf[ucRxIndex++] = 0x55;
- 000198 4E4B MOV.B R11, R14
- 00019A 3EF0FF00 AND.W #0xff, R14
- 00019E FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 0001A4 5B53 ADD.B #0x1, R11
- 70 }
- 0001A6 5A53 ADD.B #0x1, R10
- 0001A8 F53F JMP ??FaxRxBufRawdata2Flash_5
- 71
- 72 //wPageAddress = cstFaxRxBufFirstPage;
- 73 ZERO_ADDRESS();
- ??FaxRxBufRawdata2Flash_18:
- 0001AA B012.... CALL #ZERO_ADDRESS
- 74 ROW_ADDRESS_LOW = wPageAddress & 0XFF;
- 0001AE C248.... MOV.B R8, &ROW_ADDRESS_LOW
- 75 ROW_ADDRESS_HIGH = (wPageAddress>>8) & 0XFF;
- 0001B2 0E48 MOV.W R8, R14
- 0001B4 8E10 SWPB R14
- 0001B6 3EF0FF00 AND.W #0xff, R14
- 0001BA C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 76 PROGRAM_256_BYTE();
- 0001BE B012.... CALL #PROGRAM_256_BYTE
- 77 //find the rear pointer in the Fax Rear Area
- 78 //wRxBufPageRearAddress=gwPageAddress;//1226;//gwPageAddress;
- 79 ReadLastFaxRearPointer();//return gwPageAddress
- 0001C2 7E401200 MOV.B #0x12, R14
- 0001C6 7C400F00 MOV.B #0xf, R12
- 0001CA B012.... CALL #ReadLast16BytesFromFlashMemoryArea
- 80 //ReadLast16BytesFromFlashMemoryArea(cstFaxRearPointerTableStartBlockNum, cstFaxRearPointerTableOverBlockNum);//return gwPageAddress
- 81 gwPageAddress++;
- 0001CE 9253.... ADD.W #0x1, &gwPageAddress
- 82 //check the gwPageAddress whether it is a page in bad block
- 83 do{
- 84 wNextPageAddress=gwPageAddress+64;
- ??FaxRxBufRawdata2Flash_6:
- 0001D2 3E404000 MOV.W #0x40, R14
- 0001D6 1E52.... ADD.W &gwPageAddress, R14
- 0001DA 044E MOV.W R14, R4
- 85 gwPageAddress=CalNextPageAddress(gwPageAddress);
- 0001DC 1C42.... MOV.W &gwPageAddress, R12
- 0001E0 B012.... CALL #CalNextPageAddress
- 0001E4 824C.... MOV.W R12, &gwPageAddress
- 86 }while(wNextPageAddress==gwPageAddress);
- 0001E8 1492.... CMP.W &gwPageAddress, R4
- 0001EC F227 JEQ ??FaxRxBufRawdata2Flash_6
- 87 //erase next block
- 88 if (gwPageAddress%64==0)
- 0001EE 1C42.... MOV.W &gwPageAddress, R12
- 0001F2 3E404000 MOV.W #0x40, R14
- 0001F6 B012.... CALL #?DivMod16u
- 0001FA 0E93 CMP.W #0x0, R14
- 0001FC 0C20 JNE ??FaxRxBufRawdata2Flash_19
- 89 {
- 90 ROW_ADDRESS_LOW=gwPageAddress & 0XFF;
- 0001FE D242........ MOV.B &gwPageAddress, &ROW_ADDRESS_LOW
- 91 ROW_ADDRESS_HIGH=(gwPageAddress>>8) & 0XFF;
- 000204 1E42.... MOV.W &gwPageAddress, R14
- 000208 8E10 SWPB R14
- 00020A 3EF0FF00 AND.W #0xff, R14
- 00020E C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 92 ERASE_ONE_BLOCK();
- 000212 B012.... CALL #ERASE_ONE_BLOCK
- 93 }
- 94 wEveryFaxHead=gwPageAddress;//Record the Every Fax head for the Every fax table
- ??FaxRxBufRawdata2Flash_19:
- 000216 1742.... MOV.W &gwPageAddress, R7
- 95
- 96 for (wPageCount=cstFaxRxBufStartPage;wPageCount<=wRxBufPageRearAddress;wPageCount++)//Block 19-39
- 00021A 3640C004 MOV.W #0x4c0, R6
- ??FaxRxBufRawdata2Flash_9:
- 00021E 81960000 CMP.W R6, 0x0(SP)
- 000222 7828 JNC ??FaxRxBufRawdata2Flash_20
- 97 {
- 98 COMMAND_VAL=0x00; //#0X00 //00H READ1 0-2112BYTE
- 000224 C243.... MOV.B #0x0, &COMMAND_VAL
- 99 COMMAND_LATCH_INTO();
- 000228 B012.... CALL #COMMAND_LATCH_INTO
- 100 //ADDRESS
- 101 ADDRESS_VALUE=0;//COLUMN_ADDRESS_LOW; //#0X00
- 00022C C243.... MOV.B #0x0, &ADDRESS_VALUE
- 102 ADDRESS_LATCH_INTO();
- 000230 B012.... CALL #ADDRESS_LATCH_INTO
- 103
- 104 ADDRESS_VALUE=0;//COLUMN_ADDRESS_HIGH; //#0X00
- 000234 C243.... MOV.B #0x0, &ADDRESS_VALUE
- 105 ADDRESS_LATCH_INTO();
- 000238 B012.... CALL #ADDRESS_LATCH_INTO
- 106
- 107 ADDRESS_VALUE= wPageCount & 0xff ; //#0X00
- 00023C C246.... MOV.B R6, &ADDRESS_VALUE
- 108 ADDRESS_LATCH_INTO();
- 000240 B012.... CALL #ADDRESS_LATCH_INTO
- 109
- 110 ADDRESS_VALUE= (wPageCount>>8) & 0xff; //#0X00
- 000244 0E46 MOV.W R6, R14
- 000246 8E10 SWPB R14
- 000248 3EF0FF00 AND.W #0xff, R14
- 00024C C24E.... MOV.B R14, &ADDRESS_VALUE
- 111 ADDRESS_LATCH_INTO();
- 000250 B012.... CALL #ADDRESS_LATCH_INTO
- 112 FLASH_CON_PORT_OUT &=~ ALE;
- 000254 E2C32900 BIC.B #0x2, &0x29
- 113
- 114 COMMAND_VAL=0X35;
- 000258 F2403500.... MOV.B #0x35, &COMMAND_VAL
- 115 COMMAND_LATCH_INTO();
- 00025E B012.... CALL #COMMAND_LATCH_INTO
- 116 //ATcmdDelay();
- 117 while((FLASH_CON_PORT_IN & RB)==0);
- ??FaxRxBufRawdata2Flash_7:
- 000262 F2B020002800 BIT.B #0x20, &0x28
- 000268 FC2B JNC ??FaxRxBufRawdata2Flash_7
- 118
- 119 COMMAND_VAL=0x85;
- 00026A F2408500.... MOV.B #0x85, &COMMAND_VAL
- 120 COMMAND_LATCH_INTO();
- 000270 B012.... CALL #COMMAND_LATCH_INTO
- 121
- 122 //ADDRESS
- 123 ADDRESS_VALUE=0;//COLUMN_ADDRESS_LOW; //#0X00
- 000274 C243.... MOV.B #0x0, &ADDRESS_VALUE
- 124 ADDRESS_LATCH_INTO();
- 000278 B012.... CALL #ADDRESS_LATCH_INTO
- 125
- 126 ADDRESS_VALUE=0;//COLUMN_ADDRESS_HIGH; //#0X00
- 00027C C243.... MOV.B #0x0, &ADDRESS_VALUE
- 127 ADDRESS_LATCH_INTO();
- 000280 B012.... CALL #ADDRESS_LATCH_INTO
- 128
- 129 ADDRESS_VALUE= gwPageAddress & 0xff; //#0X00
- 000284 D242........ MOV.B &gwPageAddress, &ADDRESS_VALUE
- 130 ADDRESS_LATCH_INTO();
- 00028A B012.... CALL #ADDRESS_LATCH_INTO
- 131
- 132 ADDRESS_VALUE=(gwPageAddress>>8) & 0xff; //#0X00
- 00028E 1E42.... MOV.W &gwPageAddress, R14
- 000292 8E10 SWPB R14
- 000294 3EF0FF00 AND.W #0xff, R14
- 000298 C24E.... MOV.B R14, &ADDRESS_VALUE
- 133 ADDRESS_LATCH_INTO();
- 00029C B012.... CALL #ADDRESS_LATCH_INTO
- 134
- 135 FLASH_CON_PORT_OUT &=~ ALE;
- 0002A0 E2C32900 BIC.B #0x2, &0x29
- 136
- 137 COMMAND_VAL=cFlashWriteInitiateCmd; //10H INITIATES PROGRAM
- 0002A4 F2401000.... MOV.B #0x10, &COMMAND_VAL
- 138 COMMAND_LATCH_INTO();
- 0002AA B012.... CALL #COMMAND_LATCH_INTO
- 139
- 140 READ_STATUS();
- 0002AE B012.... CALL #READ_STATUS
- 141 ucFlashSttsOverflowCnt=0;
- 0002B2 4543 MOV.B #0x0, R5
- 142 if(FLASH_STATUS==1&&(ucFlashSttsOverflowCnt++)<2)
- 0002B4 D293.... CMP.B #0x1, &FLASH_STATUS
- 0002B8 0120 JNE ??FaxRxBufRawdata2Flash_21
- 0002BA 5553 ADD.B #0x1, R5
- 143 {
- 144 ;
- 145 }
- 146 gwPageAddress++;
- ??FaxRxBufRawdata2Flash_21:
- 0002BC 9253.... ADD.W #0x1, &gwPageAddress
- 147 if (gwPageAddress==0) gwPageAddress+=cstFaxContentStartPage;
- 0002C0 8293.... CMP.W #0x0, &gwPageAddress
- 0002C4 0320 JNE ??FaxRxBufRawdata2Flash_8
- 0002C6 B2500014.... ADD.W #0x1400, &gwPageAddress
- 148 do{
- 149 wNextPageAddress=gwPageAddress+64;
- ??FaxRxBufRawdata2Flash_8:
- 0002CC 3E404000 MOV.W #0x40, R14
- 0002D0 1E52.... ADD.W &gwPageAddress, R14
- 0002D4 044E MOV.W R14, R4
- 150 gwPageAddress=CalNextPageAddress(gwPageAddress);
- 0002D6 1C42.... MOV.W &gwPageAddress, R12
- 0002DA B012.... CALL #CalNextPageAddress
- 0002DE 824C.... MOV.W R12, &gwPageAddress
- 151 }while(wNextPageAddress==gwPageAddress);
- 0002E2 1492.... CMP.W &gwPageAddress, R4
- 0002E6 F227 JEQ ??FaxRxBufRawdata2Flash_8
- 152 if (gwPageAddress%64==0)
- 0002E8 1C42.... MOV.W &gwPageAddress, R12
- 0002EC 3E404000 MOV.W #0x40, R14
- 0002F0 B012.... CALL #?DivMod16u
- 0002F4 0E93 CMP.W #0x0, R14
- 0002F6 0C20 JNE ??FaxRxBufRawdata2Flash_22
- 153 {
- 154 ROW_ADDRESS_LOW=gwPageAddress & 0XFF;
- 0002F8 D242........ MOV.B &gwPageAddress, &ROW_ADDRESS_LOW
- 155 ROW_ADDRESS_HIGH=(gwPageAddress>>8) & 0XFF;
- 0002FE 1E42.... MOV.W &gwPageAddress, R14
- 000302 8E10 SWPB R14
- 000304 3EF0FF00 AND.W #0xff, R14
- 000308 C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 156 ERASE_ONE_BLOCK();
- 00030C B012.... CALL #ERASE_ONE_BLOCK
- 157 }
- 158 //if ((aucUartRxBuf[ucRxIndex] == 0xfb && aucUartRxBuf[ucRxIndex-1] == 0x13
- 159 //&& aucUartRxBuf[ucRxIndex-2] == 0xff))// || (wRxQueueFrontCnt>gwRxQueueFrontCnt))
- 160 //break;
- 161 }//write 1344 pages over
- ??FaxRxBufRawdata2Flash_22:
- 000310 1653 ADD.W #0x1, R6
- 000312 853F JMP ??FaxRxBufRawdata2Flash_9
- 162
- 163 /*******************************************
- 164 Write New Fax Rear Pointer
- 165 if (FaxRearPointerTableFull)
- 166 {erase next block in fax rear pointer table}
- 167 else
- 168 write one Fax content
- 169 *******************************************/
- 170 if ((gwGeneralPageAddress>>6) > cstFaxRearPointerTableOverBlockNum)
- ??FaxRxBufRawdata2Flash_20:
- 000314 1C42.... MOV.W &gwGeneralPageAddress, R12
- 000318 B012.... CALL #?ShiftRight16u_6
- 00031C 3C901300 CMP.W #0x13, R12
- 000320 1C28 JNC ??FaxRxBufRawdata2Flash_23
- 171 {
- 172 for (ucBlockCnt=0;ucBlockCnt<4;ucBlockCnt++)
- 000322 4943 MOV.B #0x0, R9
- ??FaxRxBufRawdata2Flash_10:
- 000324 6992 CMP.B #0x4, R9
- 000326 142C JC ??FaxRxBufRawdata2Flash_24
- 173 {
- 174 wPageAddress=(cstFaxRearPointerTableStartBlockNum+ucBlockCnt)<<6;
- 000328 4C49 MOV.B R9, R12
- 00032A 3CF0FF00 AND.W #0xff, R12
- 00032E 3C500F00 ADD.W #0xf, R12
- 000332 B012.... CALL #?ShiftLeft16_6
- 000336 084C MOV.W R12, R8
- 175 ROW_ADDRESS_LOW=wPageAddress & 0XFF;
- 000338 C248.... MOV.B R8, &ROW_ADDRESS_LOW
- 176 ROW_ADDRESS_HIGH=(wPageAddress>>8) & 0XFF;
- 00033C 0E48 MOV.W R8, R14
- 00033E 8E10 SWPB R14
- 000340 3EF0FF00 AND.W #0xff, R14
- 000344 C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 177 ERASE_ONE_BLOCK();
- 000348 B012.... CALL #ERASE_ONE_BLOCK
- 178 }
- 00034C 5953 ADD.B #0x1, R9
- 00034E EA3F JMP ??FaxRxBufRawdata2Flash_10
- 179 gwGeneralPageAddress=cstFaxRearPointerTableStartPage;
- ??FaxRxBufRawdata2Flash_24:
- 000350 B240C003.... MOV.W #0x3c0, &gwGeneralPageAddress
- 180 gwColumnAddress=0;
- 000356 8243.... MOV.W #0x0, &gwColumnAddress
- 181
- 182 }
- 183 ucRxIndex=0; //write Fax Rear Pointer
- ??FaxRxBufRawdata2Flash_23:
- 00035A 4B43 MOV.B #0x0, R11
- 184 gwPageAddress--; // get Rear Pointer
- 00035C B253.... ADD.W #0xffff, &gwPageAddress
- 185 aucUartRxBuf[ucRxIndex++]=gwPageAddress & 0xff;
- 000360 4E4B MOV.B R11, R14
- 000362 3EF0FF00 AND.W #0xff, R14
- 000366 DE42........ MOV.B &gwPageAddress, aucUartRxBuf(R14)
- 00036C 5B53 ADD.B #0x1, R11
- 186 aucUartRxBuf[ucRxIndex++]=(gwPageAddress>>8) & 0xff;
- 00036E 4E4B MOV.B R11, R14
- 000370 3EF0FF00 AND.W #0xff, R14
- 000374 1F42.... MOV.W &gwPageAddress, R15
- 000378 8F10 SWPB R15
- 00037A 3FF0FF00 AND.W #0xff, R15
- 00037E CE4F.... MOV.B R15, aucUartRxBuf(R14)
- 000382 5B53 ADD.B #0x1, R11
- 187 for(ucGeneralCnt=0;ucGeneralCnt<14;ucGeneralCnt++)
- 000384 4A43 MOV.B #0x0, R10
- ??FaxRxBufRawdata2Flash_11:
- 000386 7A900E00 CMP.B #0xe, R10
- 00038A 092C JC ??FaxRxBufRawdata2Flash_25
- 188 {
- 189 aucUartRxBuf[ucRxIndex++] = 0x55;
- 00038C 4E4B MOV.B R11, R14
- 00038E 3EF0FF00 AND.W #0xff, R14
- 000392 FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 000398 5B53 ADD.B #0x1, R11
- 190 }
- 00039A 5A53 ADD.B #0x1, R10
- 00039C F43F JMP ??FaxRxBufRawdata2Flash_11
- 191
- 192 //WriteFaxRearPointerTable();
- 193 Write16Bytes2FlashMemoryArea();
- ??FaxRxBufRawdata2Flash_25:
- 00039E B012.... CALL #Write16Bytes2FlashMemoryArea
- 194 /*******************************************
- 195 Write Fax Property Table
- 196 if (Fax Property Table Full)
- 197 {erase next block in Fax Property Table}
- 198 else
- 199 write one Fax Property
- 200 *******************************************/
- 201 ReadLastFaxProperty();
- 0003A2 7E400A00 MOV.B #0xa, R14
- 0003A6 5C43 MOV.B #0x1, R12
- 0003A8 B012.... CALL #ReadLast16BytesFromFlashMemoryArea
- 202 //ReadLast16BytesFromFlashMemoryArea(cstFaxPropertyTableStartBlockNum, cstFaxPropertyTableOverBlockNum);
- 203 if ((gwGeneralPageAddress>>6) > cstFaxPropertyTableOverBlockNum)//>=cstFaxPropertyTableOverBlockNum)
- 0003AC 1C42.... MOV.W &gwGeneralPageAddress, R12
- 0003B0 B012.... CALL #?ShiftRight16u_6
- 0003B4 3C900B00 CMP.W #0xb, R12
- 0003B8 1C28 JNC ??FaxRxBufRawdata2Flash_26
- 204 {
- 205 for (ucBlockCnt=0;ucBlockCnt<10;ucBlockCnt++)
- 0003BA 4943 MOV.B #0x0, R9
- ??FaxRxBufRawdata2Flash_12:
- 0003BC 79900A00 CMP.B #0xa, R9
- 0003C0 132C JC ??FaxRxBufRawdata2Flash_27
- 206 {
- 207 wPageAddress=(cstFaxPropertyTableStartBlockNum+ucBlockCnt)<<6;
- 0003C2 4C49 MOV.B R9, R12
- 0003C4 3CF0FF00 AND.W #0xff, R12
- 0003C8 1C53 ADD.W #0x1, R12
- 0003CA B012.... CALL #?ShiftLeft16_6
- 0003CE 084C MOV.W R12, R8
- 208 ROW_ADDRESS_LOW=wPageAddress & 0XFF;
- 0003D0 C248.... MOV.B R8, &ROW_ADDRESS_LOW
- 209 ROW_ADDRESS_HIGH=(wPageAddress>>8) & 0XFF;
- 0003D4 0E48 MOV.W R8, R14
- 0003D6 8E10 SWPB R14
- 0003D8 3EF0FF00 AND.W #0xff, R14
- 0003DC C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 210 ERASE_ONE_BLOCK();
- 0003E0 B012.... CALL #ERASE_ONE_BLOCK
- 211 }
- 0003E4 5953 ADD.B #0x1, R9
- 0003E6 EA3F JMP ??FaxRxBufRawdata2Flash_12
- 212 gwGeneralPageAddress=cstFaxPropertyTableStartPage;
- ??FaxRxBufRawdata2Flash_27:
- 0003E8 B2404000.... MOV.W #0x40, &gwGeneralPageAddress
- 213 gwColumnAddress=0;
- 0003EE 8243.... MOV.W #0x0, &gwColumnAddress
- 214 }
- 215
- 216 ucRxIndex=0; //write Fax Property
- ??FaxRxBufRawdata2Flash_26:
- 0003F2 4B43 MOV.B #0x0, R11
- 217 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewSecondIndex];// //second
- 0003F4 4E4B MOV.B R11, R14
- 0003F6 3EF0FF00 AND.W #0xff, R14
- 0003FA DE42........ MOV.B &aucViewData + 0x2, aucUartRxBuf(R14)
- 000400 5B53 ADD.B #0x1, R11
- 218 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewMinuteIndex];// //minute
- 000402 4E4B MOV.B R11, R14
- 000404 3EF0FF00 AND.W #0xff, R14
- 000408 DE42........ MOV.B &aucViewData + 0x1, aucUartRxBuf(R14)
- 00040E 5B53 ADD.B #0x1, R11
- 219 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewHourIndex];//hour
- 000410 4E4B MOV.B R11, R14
- 000412 3EF0FF00 AND.W #0xff, R14
- 000416 DE42........ MOV.B &aucViewData, aucUartRxBuf(R14)
- 00041C 5B53 ADD.B #0x1, R11
- 220 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewDateIndex];//date
- 00041E 4E4B MOV.B R11, R14
- 000420 3EF0FF00 AND.W #0xff, R14
- 000424 DE42........ MOV.B &aucViewData + 0x4, aucUartRxBuf(R14)
- 00042A 5B53 ADD.B #0x1, R11
- 221 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewMonthIndex];//month
- 00042C 4E4B MOV.B R11, R14
- 00042E 3EF0FF00 AND.W #0xff, R14
- 000432 DE42........ MOV.B &aucViewData + 0x3, aucUartRxBuf(R14)
- 000438 5B53 ADD.B #0x1, R11
- 222 aucUartRxBuf[ucRxIndex++] = aucViewData[cstViewYearIndex];//Year
- 00043A 4E4B MOV.B R11, R14
- 00043C 3EF0FF00 AND.W #0xff, R14
- 000440 DE42........ MOV.B &aucViewData + 0x5, aucUartRxBuf(R14)
- 000446 5B53 ADD.B #0x1, R11
- 223 aucUartRxBuf[ucRxIndex++] = wEveryFaxHead & 0xff;
- 000448 4E4B MOV.B R11, R14
- 00044A 3EF0FF00 AND.W #0xff, R14
- 00044E CE47.... MOV.B R7, aucUartRxBuf(R14)
- 000452 5B53 ADD.B #0x1, R11
- 224 aucUartRxBuf[ucRxIndex++] = (wEveryFaxHead>>8) & 0xff;
- 000454 4F4B MOV.B R11, R15
- 000456 3FF0FF00 AND.W #0xff, R15
- 00045A 0E47 MOV.W R7, R14
- 00045C 8E10 SWPB R14
- 00045E 3EF0FF00 AND.W #0xff, R14
- 000462 CF4E.... MOV.B R14, aucUartRxBuf(R15)
- 000466 5B53 ADD.B #0x1, R11
- 225 aucUartRxBuf[ucRxIndex++] = gwPageAddress & 0xff;
- 000468 4E4B MOV.B R11, R14
- 00046A 3EF0FF00 AND.W #0xff, R14
- 00046E DE42........ MOV.B &gwPageAddress, aucUartRxBuf(R14)
- 000474 5B53 ADD.B #0x1, R11
- 226 aucUartRxBuf[ucRxIndex++] = (gwPageAddress>>8) & 0xff;
- 000476 4E4B MOV.B R11, R14
- 000478 3EF0FF00 AND.W #0xff, R14
- 00047C 1F42.... MOV.W &gwPageAddress, R15
- 000480 8F10 SWPB R15
- 000482 3FF0FF00 AND.W #0xff, R15
- 000486 CE4F.... MOV.B R15, aucUartRxBuf(R14)
- 00048A 5B53 ADD.B #0x1, R11
- 227 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt & 0xff);
- 00048C 4E4B MOV.B R11, R14
- 00048E 3EF0FF00 AND.W #0xff, R14
- 000492 DE42........ MOV.B &gdwRxQueueFrontCnt, aucUartRxBuf(R14)
- 000498 5B53 ADD.B #0x1, R11
- 228 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt >> 8) & 0xff;
- 00049A 4E4B MOV.B R11, R14
- 00049C 3EF0FF00 AND.W #0xff, R14
- 0004A0 1F42.... MOV.W &gdwRxQueueFrontCnt, R15
- 0004A4 8F10 SWPB R15
- 0004A6 3FF0FF00 AND.W #0xff, R15
- 0004AA CE4F.... MOV.B R15, aucUartRxBuf(R14)
- 0004AE 5B53 ADD.B #0x1, R11
- 229 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt>>16) & 0xff;
- 0004B0 4E4B MOV.B R11, R14
- 0004B2 3EF0FF00 AND.W #0xff, R14
- 0004B6 DE42........ MOV.B &gdwRxQueueFrontCnt + 0x2, aucUartRxBuf(R14)
- 0004BC 5B53 ADD.B #0x1, R11
- 230 aucUartRxBuf[ucRxIndex++] = (gdwRxQueueFrontCnt>>24) & 0xff;
- 0004BE 4C4B MOV.B R11, R12
- 0004C0 3CF0FF00 AND.W #0xff, R12
- 0004C4 1E42.... MOV.W &gdwRxQueueFrontCnt, R14
- 0004C8 1F42.... MOV.W &gdwRxQueueFrontCnt + 0x2, R15
- 0004CC 8F10 SWPB R15
- 0004CE 4E4F MOV.B R15, R14
- 0004D0 0F43 MOV.W #0x0, R15
- 0004D2 CC4E.... MOV.B R14, aucUartRxBuf(R12)
- 0004D6 5B53 ADD.B #0x1, R11
- 231
- 232 aucUartRxBuf[ucRxIndex++]=0x55;
- 0004D8 4E4B MOV.B R11, R14
- 0004DA 3EF0FF00 AND.W #0xff, R14
- 0004DE FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 0004E4 5B53 ADD.B #0x1, R11
- 233 aucUartRxBuf[ucRxIndex++]=0x55; //15
- 0004E6 4E4B MOV.B R11, R14
- 0004E8 3EF0FF00 AND.W #0xff, R14
- 0004EC FE405500.... MOV.B #0x55, aucUartRxBuf(R14)
- 0004F2 5B53 ADD.B #0x1, R11
- 234 //WriteFaxPropertyTable();
- 235 Write16Bytes2FlashMemoryArea();
- 0004F4 B012.... CALL #Write16Bytes2FlashMemoryArea
- 236 }//FaxRXProcess
- 0004F8 2153 ADD.W #0x2, SP
- 0004FA 3040.... BR #?Epilogue8
- 237
- Maximum stack usage in bytes:
- Function CSTACK
- -------- ------
- FaxRxBufRawdata2Flash 20
- -> ViewCommunicationRX 20
- -> ZERO_ADDRESS 20
- -> PROGRAM_256_BYTE 20
- -> ReadLast16BytesFromFlashMemoryArea
- 20
- -> CalNextPageAddress 20
- -> ERASE_ONE_BLOCK 20
- -> COMMAND_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> COMMAND_LATCH_INTO 20
- -> COMMAND_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> ADDRESS_LATCH_INTO 20
- -> COMMAND_LATCH_INTO 20
- -> READ_STATUS 20
- -> CalNextPageAddress 20
- -> ERASE_ONE_BLOCK 20
- -> ERASE_ONE_BLOCK 20
- -> Write16Bytes2FlashMemoryArea
- 20
- -> ReadLast16BytesFromFlashMemoryArea
- 20
- -> ERASE_ONE_BLOCK 20
- -> Write16Bytes2FlashMemoryArea
- 20
- Segment part sizes:
- Function/Label Bytes
- -------------- -----
- P2IN 1
- P2OUT 1
- FaxRxBufRawdata2Flash 1278
-
- 1 278 bytes in segment CODE
- 2 bytes in segment DATA16_AN
-
- 1 278 bytes of CODE memory
- 0 bytes of DATA memory (+ 2 bytes shared)
- Errors: none
- Warnings: none