FlashMemoryAreaRW.s43
上传用户:xhjmsc
上传日期:2019-09-13
资源大小:389k
文件大小:18k
- NAME FlashMemoryAreaRW
- RTMODEL "__double_size", "32"
- RTMODEL "__pic", "no"
- RTMODEL "__reg_r4", "free"
- RTMODEL "__reg_r5", "free"
- RTMODEL "__rt_version", "1"
- RSEG CSTACK:DATA:SORT:NOROOT(1)
- EXTERN COMMAND_VAL
- EXTERN COMMAND_LATCH_INTO
- FUNCTION COMMAND_LATCH_INTO,0202H
- EXTERN gwColumnAddress
- EXTERN ADDRESS_VALUE
- EXTERN ADDRESS_LATCH_INTO
- FUNCTION ADDRESS_LATCH_INTO,0202H
- EXTERN gwGeneralPageAddress
- EXTERN aucUartRxBuf
- EXTERN READ_STATUS
- FUNCTION READ_STATUS,0202H
- EXTERN FLASH_STATUS
- EXTERN ?Epilogue8
- EXTERN ?ShiftLeft16_6
- EXTERN CalNextPageAddress
- FUNCTION CalNextPageAddress,0202H
- EXTERN ROW_ADDRESS_LOW
- EXTERN ROW_ADDRESS_HIGH
- EXTERN gucUartRxCnt
- EXTERN gwPageAddress
- EXTERN gucGeneralStatus
- EXTERN ?longjmp_r4
- EXTERN ?longjmp_r5
- EXTERN ?setjmp_r4
- EXTERN ?setjmp_r5
- PUBWEAK ?setjmp_save_r4
- PUBWEAK ?setjmp_save_r5
- PUBWEAK P2IN
- PUBWEAK P2OUT
- PUBWEAK P5DIR
- PUBWEAK P5IN
- PUBWEAK P5OUT
- PUBLIC ReadLast16BytesFromFlashMemoryArea
- FUNCTION ReadLast16BytesFromFlashMemoryArea,021203H
- LOCFRAME CSTACK, 26, STACK
- PUBLIC Write16Bytes2FlashMemoryArea
- FUNCTION Write16Bytes2FlashMemoryArea,021203H
- LOCFRAME CSTACK, 8, STACK
-
- CFI Names cfiNames0
- CFI StackFrame CFA SP DATA
- CFI Resource PC:16, SP:16, SR:16, R4:16, R5:16, R6:16, R7:16, R8:16
- CFI Resource R9:16, R10:16, R11:16, R12:16, R13:16, R14:16, R15:16
- CFI EndNames cfiNames0
-
- CFI Common cfiCommon0 Using cfiNames0
- CFI CodeAlign 2
- CFI DataAlign 2
- CFI ReturnAddress PC CODE
- CFI CFA SP+2
- CFI PC Frame(CFA, -2)
- CFI SR Undefined
- CFI R4 SameValue
- CFI R5 SameValue
- CFI R6 SameValue
- CFI R7 SameValue
- CFI R8 SameValue
- CFI R9 SameValue
- CFI R10 SameValue
- CFI R11 SameValue
- CFI R12 Undefined
- CFI R13 Undefined
- CFI R14 Undefined
- CFI R15 Undefined
- CFI EndCommon cfiCommon0
-
- // E:projectFaxProgramVson_Bryan_Fax_Conexant_070423filesFlashMemoryAreaRW.c
- // 1 /***************************************
- // 2 Program: FlashManage
- // 3 Author: Bryan Cai
- // 4 Date: 2006.12.07
- // 5 ***************************************/
- // 6
- // 7 #include "includeH.h"
- ASEGN DATA16_AN:DATA:NOROOT,028H
- // unsigned char const volatile __data P2IN
- P2IN:
- DS8 1
- ASEGN DATA16_AN:DATA:NOROOT,029H
- // unsigned char volatile __data P2OUT
- P2OUT:
- DS8 1
- ASEGN DATA16_AN:DATA:NOROOT,030H
- // unsigned char const volatile __data P5IN
- P5IN:
- DS8 1
- ASEGN DATA16_AN:DATA:NOROOT,031H
- // unsigned char volatile __data P5OUT
- P5OUT:
- DS8 1
- ASEGN DATA16_AN:DATA:NOROOT,032H
- // unsigned char volatile __data P5DIR
- P5DIR:
- DS8 1
- // 8
- // 9 //unsigned int gwGeneralPageAddress=0;//=960;
- // 10
- RSEG CODE:CODE:NOROOT(1)
- // 11 void Write16Bytes2FlashMemoryArea(void)
- Write16Bytes2FlashMemoryArea:
- CFI Block cfiBlock0 Using cfiCommon0
- CFI Function Write16Bytes2FlashMemoryArea
- // 12 {
- FUNCALL Write16Bytes2FlashMemoryArea, COMMAND_LATCH_INTO
- LOCFRAME CSTACK, 8, STACK
- FUNCALL Write16Bytes2FlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 8, STACK
- FUNCALL Write16Bytes2FlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 8, STACK
- FUNCALL Write16Bytes2FlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 8, STACK
- FUNCALL Write16Bytes2FlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 8, STACK
- FUNCALL Write16Bytes2FlashMemoryArea, COMMAND_LATCH_INTO
- LOCFRAME CSTACK, 8, STACK
- FUNCALL Write16Bytes2FlashMemoryArea, READ_STATUS
- LOCFRAME CSTACK, 8, STACK
- PUSH.W R10
- CFI R10 Frame(CFA, -4)
- CFI CFA SP+4
- PUSH.W R11
- CFI R11 Frame(CFA, -6)
- CFI CFA SP+6
- PUSH.W R8
- CFI R8 Frame(CFA, -8)
- CFI CFA SP+8
- // 13
- // 14 unsigned char ucFlashSttsOverflowCnt=0,ucFaxGeneralLenCnt=0,
- MOV.B #0x0, R8
- MOV.B #0x0, R10
- // 15 ucRxIndex=0;
- MOV.B #0x0, R11
- // 16
- // 17
- // 18 COMMAND_VAL=cFlashWriteCmd;
- MOV.B #0x80, &COMMAND_VAL
- // 19 COMMAND_LATCH_INTO();
- CALL #COMMAND_LATCH_INTO
- // 20 //ADDRESS
- // 21
- // 22 ADDRESS_VALUE=gwColumnAddress & 0xff;//COLUMN_ADDRESS_LOW;
- MOV.B &gwColumnAddress, &ADDRESS_VALUE
- // 23 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 24
- // 25 ADDRESS_VALUE=(gwColumnAddress>>8) & 0XFF;//COLUMN_ADDRESS_HIGH;
- MOV.W &gwColumnAddress, R14
- SWPB R14
- AND.W #0xff, R14
- MOV.B R14, &ADDRESS_VALUE
- // 26 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 27
- // 28 ADDRESS_VALUE=gwGeneralPageAddress & 0xff;
- MOV.B &gwGeneralPageAddress, &ADDRESS_VALUE
- // 29 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 30
- // 31 ADDRESS_VALUE=(gwGeneralPageAddress>>8) & 0XFF;
- MOV.W &gwGeneralPageAddress, R14
- SWPB R14
- AND.W #0xff, R14
- MOV.B R14, &ADDRESS_VALUE
- // 32 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 33 FLASH_CON_PORT_OUT &=~ ALE;
- BIC.B #0x2, &0x29
- // 34
- // 35 DATA_PORT_OUT_INITIAL;
- MOV.B #0xff, &0x32
- // 36 for (ucFaxGeneralLenCnt=0;ucFaxGeneralLenCnt<16;ucFaxGeneralLenCnt++)
- MOV.B #0x0, R10
- ??Write16Bytes2FlashMemoryArea_0:
- CMP.B #0x10, R10
- JC ??Write16Bytes2FlashMemoryArea_1
- // 37 {
- // 38 FLASH_CON_PORT_OUT&=~WE;
- BIC.B #0x1, &0x29
- // 39 DATA_PORT_OUT=aucUartRxBuf[ucRxIndex++];
- MOV.B R11, R14
- AND.W #0xff, R14
- MOV.B aucUartRxBuf(R14), &0x31
- ADD.B #0x1, R11
- // 40 FLASH_CON_PORT_OUT |= WE;
- BIS.B #0x1, &0x29
- // 41 }
- ADD.B #0x1, R10
- JMP ??Write16Bytes2FlashMemoryArea_0
- // 42
- // 43 COMMAND_VAL=cFlashWriteInitiateCmd; //10H INITIATES PROGRAM
- ??Write16Bytes2FlashMemoryArea_1:
- MOV.B #0x10, &COMMAND_VAL
- // 44 COMMAND_LATCH_INTO();
- CALL #COMMAND_LATCH_INTO
- // 45
- // 46 READ_STATUS();
- CALL #READ_STATUS
- // 47 ucFlashSttsOverflowCnt=0;
- MOV.B #0x0, R8
- // 48 if(FLASH_STATUS==1&&(ucFlashSttsOverflowCnt++)<2)
- CMP.B #0x1, &FLASH_STATUS
- JNE ??Write16Bytes2FlashMemoryArea_2
- ADD.B #0x1, R8
- // 49 {;}
- // 50 }
- ??Write16Bytes2FlashMemoryArea_2:
- POP.W R8
- CFI R8 SameValue
- CFI CFA SP+6
- POP.W R11
- CFI R11 SameValue
- CFI CFA SP+4
- POP.W R10
- CFI R10 SameValue
- CFI CFA SP+2
- RET
- CFI EndBlock cfiBlock0
- RSEG CODE:CODE:NOROOT(1)
- // 51 void ReadLast16BytesFromFlashMemoryArea(unsigned char ucAreaStartBlockAddress, unsigned char ucAreaOverBlockAddress)//read last fax General pointer
- ReadLast16BytesFromFlashMemoryArea:
- CFI Block cfiBlock1 Using cfiCommon0
- CFI Function ReadLast16BytesFromFlashMemoryArea
- // 52 {
- FUNCALL ReadLast16BytesFromFlashMemoryArea, CalNextPageAddress
- LOCFRAME CSTACK, 26, STACK
- FUNCALL ReadLast16BytesFromFlashMemoryArea, COMMAND_LATCH_INTO
- LOCFRAME CSTACK, 26, STACK
- FUNCALL ReadLast16BytesFromFlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 26, STACK
- FUNCALL ReadLast16BytesFromFlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 26, STACK
- FUNCALL ReadLast16BytesFromFlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 26, STACK
- FUNCALL ReadLast16BytesFromFlashMemoryArea, ADDRESS_LATCH_INTO
- LOCFRAME CSTACK, 26, STACK
- FUNCALL ReadLast16BytesFromFlashMemoryArea, COMMAND_LATCH_INTO
- LOCFRAME CSTACK, 26, STACK
- PUSH.W R10
- CFI R10 Frame(CFA, -4)
- CFI CFA SP+4
- PUSH.W R11
- CFI R11 Frame(CFA, -6)
- CFI CFA SP+6
- PUSH.W R8
- CFI R8 Frame(CFA, -8)
- CFI CFA SP+8
- PUSH.W R9
- CFI R9 Frame(CFA, -10)
- CFI CFA SP+10
- PUSH.W R6
- CFI R6 Frame(CFA, -12)
- CFI CFA SP+12
- PUSH.W R7
- CFI R7 Frame(CFA, -14)
- CFI CFA SP+14
- PUSH.W R4
- CFI R4 Frame(CFA, -16)
- CFI CFA SP+16
- PUSH.W R5
- CFI R5 Frame(CFA, -18)
- CFI CFA SP+18
- SUB.W #0x8, SP
- CFI CFA SP+26
- MOV.B R12, 0x3(SP)
- MOV.B R14, 0x2(SP)
- // 53 unsigned int wPageAddress=0, wBlockAddress=0,
- MOV.W #0x0, R4
- MOV.W #0x0, R5
- // 54 wColumnAddress=0,wNextPageAddress=0,
- MOV.W #0x0, R10
- MOV.W #0x0, 0x4(SP)
- // 55 wGeneralPntCnt=0;
- MOV.W #0x0, 0x6(SP)
- // 56 unsigned char ucRxIndex=0,
- MOV.B #0x0, R11
- // 57 ucRxIndex3=0,ucRxIndex2=0,
- MOV.B #0x0, R7
- MOV.B #0x0, R8
- // 58 ucRxIndex0=0,ucRxIndex1=0,
- MOV.B #0x0, R9
- MOV.B #0x0, R6
- // 59 ucGeneralCnt=0,ucFaxGeneralLenCnt;
- MOV.B #0x0, 0x0(SP)
- // 60
- // 61
- // 62 //for (wBlockAddress=cFaxRearPointerTableStartBlockNum;
- // 63 //wBlockAddress<=cFaxRearPointerTableOverBlockNum;wBlockAddress++)
- // 64 for (wBlockAddress=ucAreaStartBlockAddress;
- MOV.B 0x3(SP), R14
- AND.W #0xff, R14
- MOV.W R14, R5
- // 65 wBlockAddress<=ucAreaOverBlockAddress;wBlockAddress++)
- ??ReadLast16BytesFromFlashMemoryArea_5:
- MOV.B 0x2(SP), R14
- AND.W #0xff, R14
- CMP.W R5, R14
- JNC ??ReadLast16BytesFromFlashMemoryArea_6
- // 66 {
- // 67
- // 68 for (wPageAddress=(wBlockAddress<<6);wPageAddress<((wBlockAddress<<6)+64);wPageAddress++)//one block
- MOV.W R5, R12
- CALL #?ShiftLeft16_6
- MOV.W R12, R4
- ??ReadLast16BytesFromFlashMemoryArea_4:
- MOV.W R5, R12
- CALL #?ShiftLeft16_6
- ADD.W #0x40, R12
- CMP.W R12, R4
- JC ??ReadLast16BytesFromFlashMemoryArea_7
- // 69 {
- // 70 do{
- // 71 wNextPageAddress=wPageAddress+64;
- ??ReadLast16BytesFromFlashMemoryArea_0:
- MOV.W #0x40, R14
- ADD.W R4, R14
- MOV.W R14, 0x4(SP)
- // 72 wPageAddress=CalNextPageAddress(wPageAddress);
- MOV.W R4, R12
- CALL #CalNextPageAddress
- MOV.W R12, R4
- // 73 }while(wNextPageAddress==wPageAddress);
- CMP.W R4, 0x4(SP)
- JEQ ??ReadLast16BytesFromFlashMemoryArea_0
- // 74
- // 75 wColumnAddress=0;
- MOV.W #0x0, R10
- // 76 ROW_ADDRESS_LOW=wPageAddress & 0XFF;
- MOV.B R4, &ROW_ADDRESS_LOW
- // 77 ROW_ADDRESS_HIGH=(wPageAddress>>8) & 0XFF;
- MOV.W R4, R14
- SWPB R14
- AND.W #0xff, R14
- MOV.B R14, &ROW_ADDRESS_HIGH
- // 78
- // 79 for (ucGeneralCnt=0;ucGeneralCnt<8;ucGeneralCnt++)
- MOV.B #0x0, 0x0(SP)
- ??ReadLast16BytesFromFlashMemoryArea_3:
- CMP.B #0x8, 0x0(SP)
- JC ??ReadLast16BytesFromFlashMemoryArea_8
- // 80 {
- // 81 //COMMAND
- // 82 COMMAND_VAL=0x00; //#0X00 //00H READ1 0-2111BYTE
- MOV.B #0x0, &COMMAND_VAL
- // 83 COMMAND_LATCH_INTO();
- CALL #COMMAND_LATCH_INTO
- // 84 //ADDRESS
- // 85
- // 86 ADDRESS_VALUE=wColumnAddress & 0xff;//COLUMN_ADDRESS_LOW;
- MOV.B R10, &ADDRESS_VALUE
- // 87 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 88
- // 89 ADDRESS_VALUE=(wColumnAddress>>8) & 0XFF;//COLUMN_ADDRESS_HIGH;
- MOV.W R10, R14
- SWPB R14
- AND.W #0xff, R14
- MOV.B R14, &ADDRESS_VALUE
- // 90 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 91
- // 92 ADDRESS_VALUE=ROW_ADDRESS_LOW;
- MOV.B &ROW_ADDRESS_LOW, &ADDRESS_VALUE
- // 93 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 94
- // 95 ADDRESS_VALUE=ROW_ADDRESS_HIGH;
- MOV.B &ROW_ADDRESS_HIGH, &ADDRESS_VALUE
- // 96 ADDRESS_LATCH_INTO();
- CALL #ADDRESS_LATCH_INTO
- // 97 FLASH_CON_PORT_OUT &=~ ALE;
- BIC.B #0x2, &0x29
- // 98
- // 99 COMMAND_VAL=0X30;
- MOV.B #0x30, &COMMAND_VAL
- // 100 COMMAND_LATCH_INTO();
- CALL #COMMAND_LATCH_INTO
- // 101 //ATcmdDelay();
- // 102 while((FLASH_CON_PORT_IN & RB)==0);
- ??ReadLast16BytesFromFlashMemoryArea_1:
- BIT.B #0x20, &0x28
- JNC ??ReadLast16BytesFromFlashMemoryArea_1
- // 103 DATA_PORT_IN_INITIAL;
- MOV.B #0x0, &0x32
- // 104 for (ucFaxGeneralLenCnt=0;ucFaxGeneralLenCnt<16;ucFaxGeneralLenCnt++)
- MOV.B #0x0, 0x1(SP)
- ??ReadLast16BytesFromFlashMemoryArea_2:
- CMP.B #0x10, 0x1(SP)
- JC ??ReadLast16BytesFromFlashMemoryArea_9
- // 105 {
- // 106 FLASH_CON_PORT_OUT &=~ RE; //RE IS LOW,ENABLE READ DATA
- BIC.B #0x10, &0x29
- // 107 aucUartRxBuf[ucRxIndex++]=DATA_PORT_IN;
- MOV.B R11, R14
- AND.W #0xff, R14
- MOV.B &0x30, aucUartRxBuf(R14)
- ADD.B #0x1, R11
- // 108 FLASH_CON_PORT_OUT |= RE;
- BIS.B #0x10, &0x29
- // 109 }
- ADD.B #0x1, 0x1(SP)
- JMP ??ReadLast16BytesFromFlashMemoryArea_2
- // 110 wGeneralPntCnt++;
- ??ReadLast16BytesFromFlashMemoryArea_9:
- ADD.W #0x1, 0x6(SP)
- // 111
- // 112 ucRxIndex3=ucRxIndex-4;
- MOV.B #0xfc, R14
- ADD.B R11, R14
- MOV.B R14, R7
- // 113 ucRxIndex2=ucRxIndex-3;
- MOV.B #0xfd, R14
- ADD.B R11, R14
- MOV.B R14, R8
- // 114 ucRxIndex1=ucRxIndex-2;
- MOV.B #0xfe, R14
- ADD.B R11, R14
- MOV.B R14, R6
- // 115 ucRxIndex0=ucRxIndex-1;
- MOV.B #0xff, R14
- ADD.B R11, R14
- MOV.B R14, R9
- // 116 if (0xff == aucUartRxBuf[ucRxIndex0] && 0xff == aucUartRxBuf[ucRxIndex1] &&
- // 117 0xff == aucUartRxBuf[ucRxIndex2] && 0xff == aucUartRxBuf[ucRxIndex3])
- MOV.B R9, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_10
- MOV.B R6, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_10
- MOV.B R8, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_10
- MOV.B R7, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_10
- // 118 {
- // 119 gucUartRxCnt = ucRxIndex-32;
- MOV.B #0xe0, R14
- ADD.B R11, R14
- MOV.B R14, &gucUartRxCnt
- // 120 break; //next General
- JMP ??ReadLast16BytesFromFlashMemoryArea_8
- // 121 }//if
- // 122 if (ucGeneralCnt<4)
- ??ReadLast16BytesFromFlashMemoryArea_10:
- CMP.B #0x4, 0x0(SP)
- JC ??ReadLast16BytesFromFlashMemoryArea_11
- // 123 wColumnAddress+=512;
- ADD.W #0x200, R10
- JMP ??ReadLast16BytesFromFlashMemoryArea_12
- // 124 else
- // 125 wColumnAddress+=16;
- ??ReadLast16BytesFromFlashMemoryArea_11:
- ADD.W #0x10, R10
- // 126 }//for read next General pointer
- ??ReadLast16BytesFromFlashMemoryArea_12:
- ADD.B #0x1, 0x0(SP)
- JMP ??ReadLast16BytesFromFlashMemoryArea_3
- // 127
- // 128
- // 129 if (0xff == aucUartRxBuf[ucRxIndex0] && 0xff == aucUartRxBuf[ucRxIndex1] &&
- // 130 0xff == aucUartRxBuf[ucRxIndex2] && 0xff == aucUartRxBuf[ucRxIndex3])
- ??ReadLast16BytesFromFlashMemoryArea_8:
- MOV.B R9, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_13
- MOV.B R6, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_13
- MOV.B R8, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_13
- MOV.B R7, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JEQ ??ReadLast16BytesFromFlashMemoryArea_7
- // 131 {break;}
- // 132 }//for next page
- ??ReadLast16BytesFromFlashMemoryArea_13:
- ADD.W #0x1, R4
- JMP ??ReadLast16BytesFromFlashMemoryArea_4
- // 133
- // 134
- // 135 if (0xff == aucUartRxBuf[ucRxIndex0] && 0xff == aucUartRxBuf[ucRxIndex1] &&
- // 136 0xff == aucUartRxBuf[ucRxIndex2] && 0xff == aucUartRxBuf[ucRxIndex3])
- ??ReadLast16BytesFromFlashMemoryArea_7:
- MOV.B R9, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_14
- MOV.B R6, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_14
- MOV.B R8, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JNE ??ReadLast16BytesFromFlashMemoryArea_14
- MOV.B R7, R14
- AND.W #0xff, R14
- CMP.B #0xff, aucUartRxBuf(R14)
- JEQ ??ReadLast16BytesFromFlashMemoryArea_6
- // 137 {break;}
- // 138 }//for next block
- ??ReadLast16BytesFromFlashMemoryArea_14:
- ADD.W #0x1, R5
- JMP ??ReadLast16BytesFromFlashMemoryArea_5
- // 139 gwGeneralPageAddress=wPageAddress; //for write Fax General pointer
- ??ReadLast16BytesFromFlashMemoryArea_6:
- MOV.W R4, &gwGeneralPageAddress
- // 140 gwColumnAddress=wColumnAddress; //for find blank page
- MOV.W R10, &gwColumnAddress
- // 141 if (ucAreaOverBlockAddress>10)
- CMP.B #0xb, 0x2(SP)
- JNC ??ReadLast16BytesFromFlashMemoryArea_15
- // 142 {
- // 143 if (wGeneralPntCnt>1)
- CMP.W #0x2, 0x6(SP)
- JNC ??ReadLast16BytesFromFlashMemoryArea_16
- // 144 {
- // 145 ucRxIndex1=ucRxIndex-32;
- MOV.B #0xe0, R14
- ADD.B R11, R14
- MOV.B R14, R6
- // 146 ucRxIndex0=ucRxIndex-31;
- MOV.B #0xe1, R14
- ADD.B R11, R14
- MOV.B R14, R9
- // 147 wPageAddress=aucUartRxBuf[ucRxIndex0];
- MOV.B R9, R14
- AND.W #0xff, R14
- MOV.B aucUartRxBuf(R14), R14
- AND.W #0xff, R14
- MOV.W R14, R4
- // 148 gwPageAddress=(wPageAddress<<8) | aucUartRxBuf[ucRxIndex1];
- MOV.W R4, R15
- AND.W #0xff, R15
- SWPB R15
- MOV.B R6, R14
- AND.W #0xff, R14
- MOV.B aucUartRxBuf(R14), R14
- AND.W #0xff, R14
- BIS.W R14, R15
- MOV.W R15, &gwPageAddress
- // 149 gucGeneralStatus |= bitReadFlashMemoryOK;
- BIS.B #0x20, &gucGeneralStatus
- JMP ??ReadLast16BytesFromFlashMemoryArea_15
- // 150 }
- // 151 else
- // 152 {
- // 153 gwPageAddress=cstFaxContentStartPage-1;//2559;//1279;//write the data start address
- ??ReadLast16BytesFromFlashMemoryArea_16:
- MOV.W #0x13ff, &gwPageAddress
- // 154 gucGeneralStatus &= ~bitReadFlashMemoryOK;
- BIC.B #0x20, &gucGeneralStatus
- // 155 }
- // 156 }
- // 157 }
- ??ReadLast16BytesFromFlashMemoryArea_15:
- ADD.W #0x8, SP
- CFI CFA SP+18
- BR #?Epilogue8
- CFI EndBlock cfiBlock1
- RSEG CODE:CODE:NOROOT(1)
- ?setjmp_save_r4:
- REQUIRE ?setjmp_r4
- REQUIRE ?longjmp_r4
- RSEG CODE:CODE:NOROOT(1)
- ?setjmp_save_r5:
- REQUIRE ?setjmp_r5
- REQUIRE ?longjmp_r5
- END
- //
- // 752 bytes in segment CODE
- // 5 bytes in segment DATA16_AN
- //
- // 752 bytes of CODE memory
- // 0 bytes of DATA memory (+ 5 bytes shared)
- //
- //Errors: none
- //Warnings: none