FaxRxBufRawdata2pc.lst
上传用户:xhjmsc
上传日期:2019-09-13
资源大小:389k
文件大小:13k
- ##############################################################################
- # #
- # IAR MSP430 C/EC++ Compiler V2.10A/W32 23/Apr/2007 18:04:10 #
- # 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 #
- # filesFaxRxBufRawdata2pc.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 #
- # filesFaxRxBufRawdata2pc.c #
- # List file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugListFaxRxBufRawdata2pc.lst #
- # Object file = E:projectFaxProgramVson_Bryan_Fax_Conexant_070423 #
- # DebugObjFaxRxBufRawdata2pc.r43 #
- # #
- # #
- ##############################################################################
- E:projectFaxProgramVson_Bryan_Fax_Conexant_070423filesFaxRxBufRawdata2pc.c
- 1 /************************************************
- 2 Description:
- 3 Send the received fax raw data to PC via MAX232
- 4 3G 1-dimensional Data Format Recommendation T.4
- 5 Input:
- 6 none
- 7 Output:
- 8 none
- 9 Update:
- 10 2006.11.02 Bryan function header create
- 11 ************************************************/
- 12
- 13 #include "includeH.h"
- In segment DATA16_AN, at 0x36
- unsigned char volatile __data P6DIR
- P6DIR:
- 000000 DS8 1
- 14
- In segment CODE, align 2, keep-with-next
- 15 void FaxRxBufRawdata2PCFromSoftUart(void) // send the received fax data to PC via MAX232
- FaxRxBufRawdata2PCFromSoftUart:
- 16 {
- 000000 0A12 PUSH.W R10
- 000002 0B12 PUSH.W R11
- 000004 0812 PUSH.W R8
- 17 unsigned char ucFlashColumnAddCnt=0;
- 000006 4843 MOV.B #0x0, R8
- 18 unsigned int wGeneralCnt=0,wPageAddress=0;
- 000008 0A43 MOV.W #0x0, R10
- 00000A 0B43 MOV.W #0x0, R11
- 19 //ucGeneralCnt=2;
- 20 SOFTUART_PORT_DIRECTION |= bitSOFTUARTTX;
- 00000C D2D33600 BIS.B #0x1, &0x36
- 21 //wPageAddress=gwPageAddress;
- 22 ZERO_ADDRESS();
- 000010 B012.... CALL #ZERO_ADDRESS
- 23 //for (gwPageAddress=1216;gwPageAddress<2559;gwPageAddress++) //Mar.2, 2007
- 24 for (wPageAddress=cstFaxRxBufStartPage;wPageAddress<=gwPageAddress;wPageAddress++)
- 000014 3B40C004 MOV.W #0x4c0, R11
- ??FaxRxBufRawdata2PCFromSoftUart_2:
- 000018 829B.... CMP.W R11, &gwPageAddress
- 00001C 5228 JNC ??FaxRxBufRawdata2PCFromSoftUart_3
- 25 {
- 26
- 27 ROW_ADDRESS_LOW = wPageAddress & 0xff;
- 00001E C24B.... MOV.B R11, &ROW_ADDRESS_LOW
- 28 ROW_ADDRESS_HIGH = (wPageAddress>>8) & 0xff;
- 000022 0E4B MOV.W R11, R14
- 000024 8E10 SWPB R14
- 000026 3EF0FF00 AND.W #0xff, R14
- 00002A C24E.... MOV.B R14, &ROW_ADDRESS_HIGH
- 29 for (ucFlashColumnAddCnt = 0;ucFlashColumnAddCnt < 8;ucFlashColumnAddCnt++)
- 00002E 4843 MOV.B #0x0, R8
- ??FaxRxBufRawdata2PCFromSoftUart_1:
- 000030 7892 CMP.B #0x8, R8
- 000032 342C JC ??FaxRxBufRawdata2PCFromSoftUart_4
- 30 {
- 31 //8 * 256 == 2048 Bytes 2^4*2^8 12bit column address HighColumnAddr:0~8
- 32 //total 8*256B+64B=2K+64B
- 33 COLUMN_ADDRESS_HIGH=ucFlashColumnAddCnt;
- 000034 C248.... MOV.B R8, &COLUMN_ADDRESS_HIGH
- 34 READ_256_BYTE();//read 256 Byte to aucUartRxBuf[256]
- 000038 B012.... CALL #READ_256_BYTE
- 35 for (wGeneralCnt=0;wGeneralCnt<256;wGeneralCnt++)//
- 00003C 0A43 MOV.W #0x0, R10
- ??FaxRxBufRawdata2PCFromSoftUart_0:
- 00003E 3A900001 CMP.W #0x100, R10
- 000042 192C JC ??FaxRxBufRawdata2PCFromSoftUart_5
- 36 //modify Dec.28,2006 4*64Bytes one time
- 37 {
- 38 SoftUartTxOneFrame(aucUartRxBuf[wGeneralCnt]);
- 000044 5C4A.... MOV.B aucUartRxBuf(R10), R12
- 000048 B012.... CALL #SoftUartTxOneFrame
- 39 if (aucUartRxBuf[wGeneralCnt] == 0xfb && aucUartRxBuf[wGeneralCnt-1] == 0x13 && aucUartRxBuf[wGeneralCnt-2] == 0xff)
- 00004C FA90FB00.... CMP.B #0xfb, aucUartRxBuf(R10)
- 000052 0F20 JNE ??FaxRxBufRawdata2PCFromSoftUart_6
- 000054 3E40.... MOV.W #aucUartRxBuf, R14
- 000058 0E5A ADD.W R10, R14
- 00005A FE901300FFFF CMP.B #0x13, 0xffff(R14)
- 000060 0820 JNE ??FaxRxBufRawdata2PCFromSoftUart_6
- 000062 3E40.... MOV.W #aucUartRxBuf, R14
- 000066 0E5A ADD.W R10, R14
- 000068 FE93FEFF CMP.B #0xff, 0xfffe(R14)
- 00006C 0220 JNE ??FaxRxBufRawdata2PCFromSoftUart_6
- 40 {_NOP();break;}
- 00006E 0343 NOP
- 000070 023C JMP ??FaxRxBufRawdata2PCFromSoftUart_5
- 41 }//third for
- ??FaxRxBufRawdata2PCFromSoftUart_6:
- 000072 1A53 ADD.W #0x1, R10
- 000074 E43F JMP ??FaxRxBufRawdata2PCFromSoftUart_0
- 42 if (aucUartRxBuf[wGeneralCnt] == 0xfb && aucUartRxBuf[wGeneralCnt-1] == 0x13 && aucUartRxBuf[wGeneralCnt-2] == 0xff)
- ??FaxRxBufRawdata2PCFromSoftUart_5:
- 000076 FA90FB00.... CMP.B #0xfb, aucUartRxBuf(R10)
- 00007C 0D20 JNE ??FaxRxBufRawdata2PCFromSoftUart_7
- 00007E 3E40.... MOV.W #aucUartRxBuf, R14
- 000082 0E5A ADD.W R10, R14
- 000084 FE901300FFFF CMP.B #0x13, 0xffff(R14)
- 00008A 0620 JNE ??FaxRxBufRawdata2PCFromSoftUart_7
- 00008C 3E40.... MOV.W #aucUartRxBuf, R14
- 000090 0E5A ADD.W R10, R14
- 000092 FE93FEFF CMP.B #0xff, 0xfffe(R14)
- 000096 0224 JEQ ??FaxRxBufRawdata2PCFromSoftUart_4
- 43 break;
- 44 }//second for next 256Byte
- ??FaxRxBufRawdata2PCFromSoftUart_7:
- 000098 5853 ADD.B #0x1, R8
- 00009A CA3F JMP ??FaxRxBufRawdata2PCFromSoftUart_1
- 45 if (aucUartRxBuf[wGeneralCnt] == 0xfb && aucUartRxBuf[wGeneralCnt-1] == 0x13 && aucUartRxBuf[wGeneralCnt-2] == 0xff)
- ??FaxRxBufRawdata2PCFromSoftUart_4:
- 00009C FA90FB00.... CMP.B #0xfb, aucUartRxBuf(R10)
- 0000A2 0D20 JNE ??FaxRxBufRawdata2PCFromSoftUart_8
- 0000A4 3E40.... MOV.W #aucUartRxBuf, R14
- 0000A8 0E5A ADD.W R10, R14
- 0000AA FE901300FFFF CMP.B #0x13, 0xffff(R14)
- 0000B0 0620 JNE ??FaxRxBufRawdata2PCFromSoftUart_8
- 0000B2 3E40.... MOV.W #aucUartRxBuf, R14
- 0000B6 0E5A ADD.W R10, R14
- 0000B8 FE93FEFF CMP.B #0xff, 0xfffe(R14)
- 0000BC 0224 JEQ ??FaxRxBufRawdata2PCFromSoftUart_3
- 46 break;
- 47 }//first for next page
- ??FaxRxBufRawdata2PCFromSoftUart_8:
- 0000BE 1B53 ADD.W #0x1, R11
- 0000C0 AB3F JMP ??FaxRxBufRawdata2PCFromSoftUart_2
- 48
- 49 ATcmdDelay(); // receive data delay(if not, can't receive 0x10 0x03)
- ??FaxRxBufRawdata2PCFromSoftUart_3:
- 0000C2 B012.... CALL #ATcmdDelay
- 50
- 51 SOFTUART_PORT_DIRECTION &= ~bitSOFTUARTTX;
- 0000C6 D2C33600 BIC.B #0x1, &0x36
- 52 }
- 0000CA 3841 POP.W R8
- 0000CC 3B41 POP.W R11
- 0000CE 3A41 POP.W R10
- 0000D0 3041 RET
- 53 /*
- 54 void FaxRxBufRawdata2PCFromUart(void) // send the received fax data to PC via MAX232
- 55 {
- 56 unsigned char ucFlashColumnAddCnt=0,ucGeneralCnt=0;
- 57 //ucGeneralCnt=2;
- 58 ZERO_ADDRESS();
- 59 for (gwPageAddress=cstFaxRxBufStartPage;gwPageAddress<2559;gwPageAddress++)
- 60 {
- 61
- 62 ROW_ADDRESS_LOW = gwPageAddress & 0xff;
- 63 ROW_ADDRESS_HIGH = (gwPageAddress>>8) & 0xff;
- 64 for (ucFlashColumnAddCnt = 0;ucFlashColumnAddCnt < 8;ucFlashColumnAddCnt++)
- 65 {
- 66 //8 * 256 == 2048 Bytes 2^4*2^8 12bit column address HighColumnAddr:0~8
- 67 //total 8*256B+64B=2K+64B
- 68 COLUMN_ADDRESS_HIGH=ucFlashColumnAddCnt;
- 69 READ_256_BYTE();//read 256 Byte to aucUartRxBuf[256]
- 70 for (ucGeneralCnt=0;ucGeneralCnt<4;ucGeneralCnt++)//16*16Bytes send 16Bytes one time
- 71 {
- 72 Send64BytePageImageData(64,ucGeneralCnt);
- 73 while(gucTxBufCnt!=0)//send over, ucTxBufCnt == 0
- 74 {
- 75 ;
- 76 }
- 77 //delay10ms();
- 78 if (gwTxNum != 64 && TXBUF0==0xfb)
- 79 break;
- 80 }//third for
- 81 if (gwTxNum != 64)
- 82 break;
- 83 }//second for
- 84
- 85 if (gwTxNum != 64)
- 86 break;
- 87 }//first for next page
- 88
- 89 ATcmdDelay(); // receive data delay(if not, can't receive 0x10 0x03)
- 90 }
- 91 */
- Maximum stack usage in bytes:
- Function CSTACK
- -------- ------
- FaxRxBufRawdata2PCFromSoftUart 8
- -> ZERO_ADDRESS 8
- -> READ_256_BYTE 8
- -> SoftUartTxOneFrame 8
- -> ATcmdDelay 8
- Segment part sizes:
- Function/Label Bytes
- -------------- -----
- P6DIR 1
- FaxRxBufRawdata2PCFromSoftUart 210
-
- 210 bytes in segment CODE
- 1 byte in segment DATA16_AN
-
- 210 bytes of CODE memory
- 0 bytes of DATA memory (+ 1 byte shared)
- Errors: none
- Warnings: none