;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.0.0 #6037 (Oct 31 2010) (Linux) ; This file was generated Fri Mar 2 02:38:16 2012 ;-------------------------------------------------------- .module test_spi_can .optsdcc -mmcs51 --model-medium ;-------------------------------------------------------- ; Public variables in this module ;-------------------------------------------------------- .globl _param_report_period_ms .globl _param_bar_graph .globl _param_input_mode .globl _main .globl _sendReportIfNeeded .globl _updateLeds .globl _read_can_reg .globl _read_rxbuf0 .globl _load_can_txbuf2 .globl _load_can_txbuf1 .globl _load_can_txbuf0 .globl _txdata .globl _rxdata .globl _txdata2 .globl _report .globl _write_can_reg_PARM_2 .globl _msg2 .globl _reportBytesSent .globl _reportLength .globl _Can_init .globl _Can_setnormalmode .globl _Can_setconfigmode .globl _Can_reset .globl _read_can_reg .globl _write_can_reg .globl _buf0ovfbuf1 .globl _setmask0 .globl _setrxfil0 .globl _setrxfil1 .globl _set_Can_baudrate .globl _send_Canmsg_wait .globl _get_Canmsg .globl _rxbuf0_full .globl _testfun .globl _putchar ;-------------------------------------------------------- ; special function registers ;-------------------------------------------------------- .area RSEG (ABS,DATA) .org 0x0000 Ftest_spi_can$P0$0$0 == 0x0080 _P0 = 0x0080 Ftest_spi_can$SP$0$0 == 0x0081 _SP = 0x0081 Ftest_spi_can$DPL0$0$0 == 0x0082 _DPL0 = 0x0082 Ftest_spi_can$DPH0$0$0 == 0x0083 _DPH0 = 0x0083 Ftest_spi_can$DPL1$0$0 == 0x0084 _DPL1 = 0x0084 Ftest_spi_can$DPH1$0$0 == 0x0085 _DPH1 = 0x0085 Ftest_spi_can$U0CSR$0$0 == 0x0086 _U0CSR = 0x0086 Ftest_spi_can$PCON$0$0 == 0x0087 _PCON = 0x0087 Ftest_spi_can$TCON$0$0 == 0x0088 _TCON = 0x0088 Ftest_spi_can$P0IFG$0$0 == 0x0089 _P0IFG = 0x0089 Ftest_spi_can$P1IFG$0$0 == 0x008a _P1IFG = 0x008a Ftest_spi_can$P2IFG$0$0 == 0x008b _P2IFG = 0x008b Ftest_spi_can$PICTL$0$0 == 0x008c _PICTL = 0x008c Ftest_spi_can$P1IEN$0$0 == 0x008d _P1IEN = 0x008d Ftest_spi_can$P0INP$0$0 == 0x008f _P0INP = 0x008f Ftest_spi_can$P1$0$0 == 0x0090 _P1 = 0x0090 Ftest_spi_can$RFIM$0$0 == 0x0091 _RFIM = 0x0091 Ftest_spi_can$DPS$0$0 == 0x0092 _DPS = 0x0092 Ftest_spi_can$MPAGE$0$0 == 0x0093 _MPAGE = 0x0093 Ftest_spi_can$ENDIAN$0$0 == 0x0095 _ENDIAN = 0x0095 Ftest_spi_can$S0CON$0$0 == 0x0098 _S0CON = 0x0098 Ftest_spi_can$IEN2$0$0 == 0x009a _IEN2 = 0x009a Ftest_spi_can$S1CON$0$0 == 0x009b _S1CON = 0x009b Ftest_spi_can$T2CT$0$0 == 0x009c _T2CT = 0x009c Ftest_spi_can$T2PR$0$0 == 0x009d _T2PR = 0x009d Ftest_spi_can$T2CTL$0$0 == 0x009e _T2CTL = 0x009e Ftest_spi_can$P2$0$0 == 0x00a0 _P2 = 0x00a0 Ftest_spi_can$WORIRQ$0$0 == 0x00a1 _WORIRQ = 0x00a1 Ftest_spi_can$WORCTRL$0$0 == 0x00a2 _WORCTRL = 0x00a2 Ftest_spi_can$WOREVT0$0$0 == 0x00a3 _WOREVT0 = 0x00a3 Ftest_spi_can$WOREVT1$0$0 == 0x00a4 _WOREVT1 = 0x00a4 Ftest_spi_can$WORTIME0$0$0 == 0x00a5 _WORTIME0 = 0x00a5 Ftest_spi_can$WORTIME1$0$0 == 0x00a6 _WORTIME1 = 0x00a6 Ftest_spi_can$IEN0$0$0 == 0x00a8 _IEN0 = 0x00a8 Ftest_spi_can$IP0$0$0 == 0x00a9 _IP0 = 0x00a9 Ftest_spi_can$FWT$0$0 == 0x00ab _FWT = 0x00ab Ftest_spi_can$FADDRL$0$0 == 0x00ac _FADDRL = 0x00ac Ftest_spi_can$FADDRH$0$0 == 0x00ad _FADDRH = 0x00ad Ftest_spi_can$FCTL$0$0 == 0x00ae _FCTL = 0x00ae Ftest_spi_can$FWDATA$0$0 == 0x00af _FWDATA = 0x00af Ftest_spi_can$ENCDI$0$0 == 0x00b1 _ENCDI = 0x00b1 Ftest_spi_can$ENCDO$0$0 == 0x00b2 _ENCDO = 0x00b2 Ftest_spi_can$ENCCS$0$0 == 0x00b3 _ENCCS = 0x00b3 Ftest_spi_can$ADCCON1$0$0 == 0x00b4 _ADCCON1 = 0x00b4 Ftest_spi_can$ADCCON2$0$0 == 0x00b5 _ADCCON2 = 0x00b5 Ftest_spi_can$ADCCON3$0$0 == 0x00b6 _ADCCON3 = 0x00b6 Ftest_spi_can$IEN1$0$0 == 0x00b8 _IEN1 = 0x00b8 Ftest_spi_can$IP1$0$0 == 0x00b9 _IP1 = 0x00b9 Ftest_spi_can$ADCL$0$0 == 0x00ba _ADCL = 0x00ba Ftest_spi_can$ADCH$0$0 == 0x00bb _ADCH = 0x00bb Ftest_spi_can$RNDL$0$0 == 0x00bc _RNDL = 0x00bc Ftest_spi_can$RNDH$0$0 == 0x00bd _RNDH = 0x00bd Ftest_spi_can$SLEEP$0$0 == 0x00be _SLEEP = 0x00be Ftest_spi_can$IRCON$0$0 == 0x00c0 _IRCON = 0x00c0 Ftest_spi_can$U0DBUF$0$0 == 0x00c1 _U0DBUF = 0x00c1 Ftest_spi_can$U0BAUD$0$0 == 0x00c2 _U0BAUD = 0x00c2 Ftest_spi_can$U0UCR$0$0 == 0x00c4 _U0UCR = 0x00c4 Ftest_spi_can$U0GCR$0$0 == 0x00c5 _U0GCR = 0x00c5 Ftest_spi_can$CLKCON$0$0 == 0x00c6 _CLKCON = 0x00c6 Ftest_spi_can$MEMCTR$0$0 == 0x00c7 _MEMCTR = 0x00c7 Ftest_spi_can$WDCTL$0$0 == 0x00c9 _WDCTL = 0x00c9 Ftest_spi_can$T3CNT$0$0 == 0x00ca _T3CNT = 0x00ca Ftest_spi_can$T3CTL$0$0 == 0x00cb _T3CTL = 0x00cb Ftest_spi_can$T3CCTL0$0$0 == 0x00cc _T3CCTL0 = 0x00cc Ftest_spi_can$T3CC0$0$0 == 0x00cd _T3CC0 = 0x00cd Ftest_spi_can$T3CCTL1$0$0 == 0x00ce _T3CCTL1 = 0x00ce Ftest_spi_can$T3CC1$0$0 == 0x00cf _T3CC1 = 0x00cf Ftest_spi_can$PSW$0$0 == 0x00d0 _PSW = 0x00d0 Ftest_spi_can$DMAIRQ$0$0 == 0x00d1 _DMAIRQ = 0x00d1 Ftest_spi_can$DMA1CFGL$0$0 == 0x00d2 _DMA1CFGL = 0x00d2 Ftest_spi_can$DMA1CFGH$0$0 == 0x00d3 _DMA1CFGH = 0x00d3 Ftest_spi_can$DMA0CFGL$0$0 == 0x00d4 _DMA0CFGL = 0x00d4 Ftest_spi_can$DMA0CFGH$0$0 == 0x00d5 _DMA0CFGH = 0x00d5 Ftest_spi_can$DMAARM$0$0 == 0x00d6 _DMAARM = 0x00d6 Ftest_spi_can$DMAREQ$0$0 == 0x00d7 _DMAREQ = 0x00d7 Ftest_spi_can$TIMIF$0$0 == 0x00d8 _TIMIF = 0x00d8 Ftest_spi_can$RFD$0$0 == 0x00d9 _RFD = 0x00d9 Ftest_spi_can$T1CC0L$0$0 == 0x00da _T1CC0L = 0x00da Ftest_spi_can$T1CC0H$0$0 == 0x00db _T1CC0H = 0x00db Ftest_spi_can$T1CC1L$0$0 == 0x00dc _T1CC1L = 0x00dc Ftest_spi_can$T1CC1H$0$0 == 0x00dd _T1CC1H = 0x00dd Ftest_spi_can$T1CC2L$0$0 == 0x00de _T1CC2L = 0x00de Ftest_spi_can$T1CC2H$0$0 == 0x00df _T1CC2H = 0x00df Ftest_spi_can$ACC$0$0 == 0x00e0 _ACC = 0x00e0 Ftest_spi_can$RFST$0$0 == 0x00e1 _RFST = 0x00e1 Ftest_spi_can$T1CNTL$0$0 == 0x00e2 _T1CNTL = 0x00e2 Ftest_spi_can$T1CNTH$0$0 == 0x00e3 _T1CNTH = 0x00e3 Ftest_spi_can$T1CTL$0$0 == 0x00e4 _T1CTL = 0x00e4 Ftest_spi_can$T1CCTL0$0$0 == 0x00e5 _T1CCTL0 = 0x00e5 Ftest_spi_can$T1CCTL1$0$0 == 0x00e6 _T1CCTL1 = 0x00e6 Ftest_spi_can$T1CCTL2$0$0 == 0x00e7 _T1CCTL2 = 0x00e7 Ftest_spi_can$IRCON2$0$0 == 0x00e8 _IRCON2 = 0x00e8 Ftest_spi_can$RFIF$0$0 == 0x00e9 _RFIF = 0x00e9 Ftest_spi_can$T4CNT$0$0 == 0x00ea _T4CNT = 0x00ea Ftest_spi_can$T4CTL$0$0 == 0x00eb _T4CTL = 0x00eb Ftest_spi_can$T4CCTL0$0$0 == 0x00ec _T4CCTL0 = 0x00ec Ftest_spi_can$T4CC0$0$0 == 0x00ed _T4CC0 = 0x00ed Ftest_spi_can$T4CCTL1$0$0 == 0x00ee _T4CCTL1 = 0x00ee Ftest_spi_can$T4CC1$0$0 == 0x00ef _T4CC1 = 0x00ef Ftest_spi_can$B$0$0 == 0x00f0 _B = 0x00f0 Ftest_spi_can$PERCFG$0$0 == 0x00f1 _PERCFG = 0x00f1 Ftest_spi_can$ADCCFG$0$0 == 0x00f2 _ADCCFG = 0x00f2 Ftest_spi_can$P0SEL$0$0 == 0x00f3 _P0SEL = 0x00f3 Ftest_spi_can$P1SEL$0$0 == 0x00f4 _P1SEL = 0x00f4 Ftest_spi_can$P2SEL$0$0 == 0x00f5 _P2SEL = 0x00f5 Ftest_spi_can$P1INP$0$0 == 0x00f6 _P1INP = 0x00f6 Ftest_spi_can$P2INP$0$0 == 0x00f7 _P2INP = 0x00f7 Ftest_spi_can$U1CSR$0$0 == 0x00f8 _U1CSR = 0x00f8 Ftest_spi_can$U1DBUF$0$0 == 0x00f9 _U1DBUF = 0x00f9 Ftest_spi_can$U1BAUD$0$0 == 0x00fa _U1BAUD = 0x00fa Ftest_spi_can$U1UCR$0$0 == 0x00fb _U1UCR = 0x00fb Ftest_spi_can$U1GCR$0$0 == 0x00fc _U1GCR = 0x00fc Ftest_spi_can$P0DIR$0$0 == 0x00fd _P0DIR = 0x00fd Ftest_spi_can$P1DIR$0$0 == 0x00fe _P1DIR = 0x00fe Ftest_spi_can$P2DIR$0$0 == 0x00ff _P2DIR = 0x00ff Ftest_spi_can$DMA0CFG$0$0 == 0xffffd5d4 _DMA0CFG = 0xffffd5d4 Ftest_spi_can$DMA1CFG$0$0 == 0xffffd3d2 _DMA1CFG = 0xffffd3d2 Ftest_spi_can$FADDR$0$0 == 0xffffadac _FADDR = 0xffffadac Ftest_spi_can$ADC$0$0 == 0xffffbbba _ADC = 0xffffbbba Ftest_spi_can$T1CC0$0$0 == 0xffffdbda _T1CC0 = 0xffffdbda Ftest_spi_can$T1CC1$0$0 == 0xffffdddc _T1CC1 = 0xffffdddc Ftest_spi_can$T1CC2$0$0 == 0xffffdfde _T1CC2 = 0xffffdfde ;-------------------------------------------------------- ; special function bits ;-------------------------------------------------------- .area RSEG (ABS,DATA) .org 0x0000 Ftest_spi_can$P0_0$0$0 == 0x0080 _P0_0 = 0x0080 Ftest_spi_can$P0_1$0$0 == 0x0081 _P0_1 = 0x0081 Ftest_spi_can$P0_2$0$0 == 0x0082 _P0_2 = 0x0082 Ftest_spi_can$P0_3$0$0 == 0x0083 _P0_3 = 0x0083 Ftest_spi_can$P0_4$0$0 == 0x0084 _P0_4 = 0x0084 Ftest_spi_can$P0_5$0$0 == 0x0085 _P0_5 = 0x0085 Ftest_spi_can$P0_6$0$0 == 0x0086 _P0_6 = 0x0086 Ftest_spi_can$P0_7$0$0 == 0x0087 _P0_7 = 0x0087 Ftest_spi_can$_TCON_0$0$0 == 0x0088 __TCON_0 = 0x0088 Ftest_spi_can$RFTXRXIF$0$0 == 0x0089 _RFTXRXIF = 0x0089 Ftest_spi_can$_TCON_2$0$0 == 0x008a __TCON_2 = 0x008a Ftest_spi_can$URX0IF$0$0 == 0x008b _URX0IF = 0x008b Ftest_spi_can$_TCON_4$0$0 == 0x008c __TCON_4 = 0x008c Ftest_spi_can$ADCIF$0$0 == 0x008d _ADCIF = 0x008d Ftest_spi_can$_TCON_6$0$0 == 0x008e __TCON_6 = 0x008e Ftest_spi_can$URX1IF$0$0 == 0x008f _URX1IF = 0x008f Ftest_spi_can$P1_0$0$0 == 0x0090 _P1_0 = 0x0090 Ftest_spi_can$P1_1$0$0 == 0x0091 _P1_1 = 0x0091 Ftest_spi_can$P1_2$0$0 == 0x0092 _P1_2 = 0x0092 Ftest_spi_can$P1_3$0$0 == 0x0093 _P1_3 = 0x0093 Ftest_spi_can$P1_4$0$0 == 0x0094 _P1_4 = 0x0094 Ftest_spi_can$P1_5$0$0 == 0x0095 _P1_5 = 0x0095 Ftest_spi_can$P1_6$0$0 == 0x0096 _P1_6 = 0x0096 Ftest_spi_can$P1_7$0$0 == 0x0097 _P1_7 = 0x0097 Ftest_spi_can$ENCIF_0$0$0 == 0x0098 _ENCIF_0 = 0x0098 Ftest_spi_can$ENCIF_1$0$0 == 0x0099 _ENCIF_1 = 0x0099 Ftest_spi_can$_SOCON2$0$0 == 0x009a __SOCON2 = 0x009a Ftest_spi_can$_SOCON3$0$0 == 0x009b __SOCON3 = 0x009b Ftest_spi_can$_SOCON4$0$0 == 0x009c __SOCON4 = 0x009c Ftest_spi_can$_SOCON5$0$0 == 0x009d __SOCON5 = 0x009d Ftest_spi_can$_SOCON6$0$0 == 0x009e __SOCON6 = 0x009e Ftest_spi_can$_SOCON7$0$0 == 0x009f __SOCON7 = 0x009f Ftest_spi_can$P2_0$0$0 == 0x00a0 _P2_0 = 0x00a0 Ftest_spi_can$P2_1$0$0 == 0x00a1 _P2_1 = 0x00a1 Ftest_spi_can$P2_2$0$0 == 0x00a2 _P2_2 = 0x00a2 Ftest_spi_can$P2_3$0$0 == 0x00a3 _P2_3 = 0x00a3 Ftest_spi_can$P2_4$0$0 == 0x00a4 _P2_4 = 0x00a4 Ftest_spi_can$P2_5$0$0 == 0x00a5 _P2_5 = 0x00a5 Ftest_spi_can$P2_6$0$0 == 0x00a6 _P2_6 = 0x00a6 Ftest_spi_can$P2_7$0$0 == 0x00a7 _P2_7 = 0x00a7 Ftest_spi_can$RFTXRXIE$0$0 == 0x00a8 _RFTXRXIE = 0x00a8 Ftest_spi_can$ADCIE$0$0 == 0x00a9 _ADCIE = 0x00a9 Ftest_spi_can$URX0IE$0$0 == 0x00aa _URX0IE = 0x00aa Ftest_spi_can$URX1IE$0$0 == 0x00ab _URX1IE = 0x00ab Ftest_spi_can$ENCIE$0$0 == 0x00ac _ENCIE = 0x00ac Ftest_spi_can$STIE$0$0 == 0x00ad _STIE = 0x00ad Ftest_spi_can$_IEN06$0$0 == 0x00ae __IEN06 = 0x00ae Ftest_spi_can$EA$0$0 == 0x00af _EA = 0x00af Ftest_spi_can$DMAIE$0$0 == 0x00b8 _DMAIE = 0x00b8 Ftest_spi_can$T1IE$0$0 == 0x00b9 _T1IE = 0x00b9 Ftest_spi_can$T2IE$0$0 == 0x00ba _T2IE = 0x00ba Ftest_spi_can$T3IE$0$0 == 0x00bb _T3IE = 0x00bb Ftest_spi_can$T4IE$0$0 == 0x00bc _T4IE = 0x00bc Ftest_spi_can$P0IE$0$0 == 0x00bd _P0IE = 0x00bd Ftest_spi_can$_IEN16$0$0 == 0x00be __IEN16 = 0x00be Ftest_spi_can$_IEN17$0$0 == 0x00bf __IEN17 = 0x00bf Ftest_spi_can$DMAIF$0$0 == 0x00c0 _DMAIF = 0x00c0 Ftest_spi_can$T1IF$0$0 == 0x00c1 _T1IF = 0x00c1 Ftest_spi_can$T2IF$0$0 == 0x00c2 _T2IF = 0x00c2 Ftest_spi_can$T3IF$0$0 == 0x00c3 _T3IF = 0x00c3 Ftest_spi_can$T4IF$0$0 == 0x00c4 _T4IF = 0x00c4 Ftest_spi_can$P0IF$0$0 == 0x00c5 _P0IF = 0x00c5 Ftest_spi_can$_IRCON6$0$0 == 0x00c6 __IRCON6 = 0x00c6 Ftest_spi_can$STIF$0$0 == 0x00c7 _STIF = 0x00c7 Ftest_spi_can$P$0$0 == 0x00d0 _P = 0x00d0 Ftest_spi_can$F1$0$0 == 0x00d1 _F1 = 0x00d1 Ftest_spi_can$OV$0$0 == 0x00d2 _OV = 0x00d2 Ftest_spi_can$RS0$0$0 == 0x00d3 _RS0 = 0x00d3 Ftest_spi_can$RS1$0$0 == 0x00d4 _RS1 = 0x00d4 Ftest_spi_can$F0$0$0 == 0x00d5 _F0 = 0x00d5 Ftest_spi_can$AC$0$0 == 0x00d6 _AC = 0x00d6 Ftest_spi_can$CY$0$0 == 0x00d7 _CY = 0x00d7 Ftest_spi_can$T3OVFIF$0$0 == 0x00d8 _T3OVFIF = 0x00d8 Ftest_spi_can$T3CH0IF$0$0 == 0x00d9 _T3CH0IF = 0x00d9 Ftest_spi_can$T3CH1IF$0$0 == 0x00da _T3CH1IF = 0x00da Ftest_spi_can$T4OVFIF$0$0 == 0x00db _T4OVFIF = 0x00db Ftest_spi_can$T4CH0IF$0$0 == 0x00dc _T4CH0IF = 0x00dc Ftest_spi_can$T4CH1IF$0$0 == 0x00dd _T4CH1IF = 0x00dd Ftest_spi_can$OVFIM$0$0 == 0x00de _OVFIM = 0x00de Ftest_spi_can$_TIMIF7$0$0 == 0x00df __TIMIF7 = 0x00df Ftest_spi_can$ACC_0$0$0 == 0x00e0 _ACC_0 = 0x00e0 Ftest_spi_can$ACC_1$0$0 == 0x00e1 _ACC_1 = 0x00e1 Ftest_spi_can$ACC_2$0$0 == 0x00e2 _ACC_2 = 0x00e2 Ftest_spi_can$ACC_3$0$0 == 0x00e3 _ACC_3 = 0x00e3 Ftest_spi_can$ACC_4$0$0 == 0x00e4 _ACC_4 = 0x00e4 Ftest_spi_can$ACC_5$0$0 == 0x00e5 _ACC_5 = 0x00e5 Ftest_spi_can$ACC_6$0$0 == 0x00e6 _ACC_6 = 0x00e6 Ftest_spi_can$ACC_7$0$0 == 0x00e7 _ACC_7 = 0x00e7 Ftest_spi_can$P2IF$0$0 == 0x00e8 _P2IF = 0x00e8 Ftest_spi_can$UTX0IF$0$0 == 0x00e9 _UTX0IF = 0x00e9 Ftest_spi_can$UTX1IF$0$0 == 0x00ea _UTX1IF = 0x00ea Ftest_spi_can$P1IF$0$0 == 0x00eb _P1IF = 0x00eb Ftest_spi_can$WDTIF$0$0 == 0x00ec _WDTIF = 0x00ec Ftest_spi_can$_IRCON25$0$0 == 0x00ed __IRCON25 = 0x00ed Ftest_spi_can$_IRCON26$0$0 == 0x00ee __IRCON26 = 0x00ee Ftest_spi_can$_IRCON27$0$0 == 0x00ef __IRCON27 = 0x00ef Ftest_spi_can$B_0$0$0 == 0x00f0 _B_0 = 0x00f0 Ftest_spi_can$B_1$0$0 == 0x00f1 _B_1 = 0x00f1 Ftest_spi_can$B_2$0$0 == 0x00f2 _B_2 = 0x00f2 Ftest_spi_can$B_3$0$0 == 0x00f3 _B_3 = 0x00f3 Ftest_spi_can$B_4$0$0 == 0x00f4 _B_4 = 0x00f4 Ftest_spi_can$B_5$0$0 == 0x00f5 _B_5 = 0x00f5 Ftest_spi_can$B_6$0$0 == 0x00f6 _B_6 = 0x00f6 Ftest_spi_can$B_7$0$0 == 0x00f7 _B_7 = 0x00f7 Ftest_spi_can$U1ACTIVE$0$0 == 0x00f8 _U1ACTIVE = 0x00f8 Ftest_spi_can$U1TX_BYTE$0$0 == 0x00f9 _U1TX_BYTE = 0x00f9 Ftest_spi_can$U1RX_BYTE$0$0 == 0x00fa _U1RX_BYTE = 0x00fa Ftest_spi_can$U1ERR$0$0 == 0x00fb _U1ERR = 0x00fb Ftest_spi_can$U1FE$0$0 == 0x00fc _U1FE = 0x00fc Ftest_spi_can$U1SLAVE$0$0 == 0x00fd _U1SLAVE = 0x00fd Ftest_spi_can$U1RE$0$0 == 0x00fe _U1RE = 0x00fe Ftest_spi_can$U1MODE$0$0 == 0x00ff _U1MODE = 0x00ff ;-------------------------------------------------------- ; overlayable register banks ;-------------------------------------------------------- .area REG_BANK_0 (REL,OVR,DATA) .ds 8 ;-------------------------------------------------------- ; overlayable bit register bank ;-------------------------------------------------------- .area BIT_BANK (REL,OVR,DATA) bits: .ds 1 b0 = bits[0] b1 = bits[1] b2 = bits[2] b3 = bits[3] b4 = bits[4] b5 = bits[5] b6 = bits[6] b7 = bits[7] ;-------------------------------------------------------- ; internal ram data ;-------------------------------------------------------- .area DSEG (DATA) Lsend_Canmsg_wait$sloc0$1$0==. _send_Canmsg_wait_sloc0_1_0: .ds 2 Lget_Canmsg$sloc0$1$0==. _get_Canmsg_sloc0_1_0: .ds 3 Lget_Canmsg$sloc1$1$0==. _get_Canmsg_sloc1_1_0: .ds 1 Lget_Canmsg$sloc2$1$0==. _get_Canmsg_sloc2_1_0: .ds 1 Lget_Canmsg$sloc3$1$0==. _get_Canmsg_sloc3_1_0: .ds 1 Lget_Canmsg$sloc4$1$0==. _get_Canmsg_sloc4_1_0: .ds 2 Lget_Canmsg$sloc5$1$0==. _get_Canmsg_sloc5_1_0: .ds 3 G$reportLength$0$0==. _reportLength:: .ds 2 G$reportBytesSent$0$0==. _reportBytesSent:: .ds 2 G$msg2$0$0==. _msg2:: .ds 11 LsendReportIfNeeded$sloc0$1$0==. _sendReportIfNeeded_sloc0_1_0: .ds 4 Lmain$sloc0$1$0==. _main_sloc0_1_0: .ds 4 Lmain$sloc1$1$0==. _main_sloc1_1_0: .ds 4 ;-------------------------------------------------------- ; overlayable items in internal ram ;-------------------------------------------------------- .area OSEG (OVR,DATA) ;-------------------------------------------------------- ; Stack segment in internal ram ;-------------------------------------------------------- .area SSEG (DATA) __start__stack: .ds 1 ;-------------------------------------------------------- ; indirectly addressable internal ram data ;-------------------------------------------------------- .area ISEG (DATA) ;-------------------------------------------------------- ; absolute internal ram data ;-------------------------------------------------------- .area IABS (ABS,DATA) .area IABS (ABS,DATA) ;-------------------------------------------------------- ; bit data ;-------------------------------------------------------- .area BSEG (BIT) ;-------------------------------------------------------- ; paged external ram data ;-------------------------------------------------------- .area PSEG (PAG,XDATA) Lwrite_can_reg$val$1$1==. _write_can_reg_PARM_2: .ds 1 Lsend_Canmsg_wait$msg$1$1==. _send_Canmsg_wait_msg_1_1: .ds 3 Lsend_Canmsg_wait$i$1$1==. _send_Canmsg_wait_i_1_1: .ds 2 Lsend_Canmsg_wait$sent$1$1==. _send_Canmsg_wait_sent_1_1: .ds 1 Lget_Canmsg$msg$1$1==. _get_Canmsg_msg_1_1: .ds 3 LsendReportIfNeeded$lastReport$1$1==. _sendReportIfNeeded_lastReport_1_1: .ds 4 LsendReportIfNeeded$result$1$1==. _sendReportIfNeeded_result_1_1: .ds 12 Lmain$msg1$1$1==. _main_msg1_1_1: .ds 11 ;-------------------------------------------------------- ; external ram data ;-------------------------------------------------------- .area XSEG (XDATA) Ftest_spi_can$SYNC1$0$0 == 0xdf00 _SYNC1 = 0xdf00 Ftest_spi_can$SYNC0$0$0 == 0xdf01 _SYNC0 = 0xdf01 Ftest_spi_can$PKTLEN$0$0 == 0xdf02 _PKTLEN = 0xdf02 Ftest_spi_can$PKTCTRL1$0$0 == 0xdf03 _PKTCTRL1 = 0xdf03 Ftest_spi_can$PKTCTRL0$0$0 == 0xdf04 _PKTCTRL0 = 0xdf04 Ftest_spi_can$ADDR$0$0 == 0xdf05 _ADDR = 0xdf05 Ftest_spi_can$CHANNR$0$0 == 0xdf06 _CHANNR = 0xdf06 Ftest_spi_can$FSCTRL1$0$0 == 0xdf07 _FSCTRL1 = 0xdf07 Ftest_spi_can$FSCTRL0$0$0 == 0xdf08 _FSCTRL0 = 0xdf08 Ftest_spi_can$FREQ2$0$0 == 0xdf09 _FREQ2 = 0xdf09 Ftest_spi_can$FREQ1$0$0 == 0xdf0a _FREQ1 = 0xdf0a Ftest_spi_can$FREQ0$0$0 == 0xdf0b _FREQ0 = 0xdf0b Ftest_spi_can$MDMCFG4$0$0 == 0xdf0c _MDMCFG4 = 0xdf0c Ftest_spi_can$MDMCFG3$0$0 == 0xdf0d _MDMCFG3 = 0xdf0d Ftest_spi_can$MDMCFG2$0$0 == 0xdf0e _MDMCFG2 = 0xdf0e Ftest_spi_can$MDMCFG1$0$0 == 0xdf0f _MDMCFG1 = 0xdf0f Ftest_spi_can$MDMCFG0$0$0 == 0xdf10 _MDMCFG0 = 0xdf10 Ftest_spi_can$DEVIATN$0$0 == 0xdf11 _DEVIATN = 0xdf11 Ftest_spi_can$MCSM2$0$0 == 0xdf12 _MCSM2 = 0xdf12 Ftest_spi_can$MCSM1$0$0 == 0xdf13 _MCSM1 = 0xdf13 Ftest_spi_can$MCSM0$0$0 == 0xdf14 _MCSM0 = 0xdf14 Ftest_spi_can$FOCCFG$0$0 == 0xdf15 _FOCCFG = 0xdf15 Ftest_spi_can$BSCFG$0$0 == 0xdf16 _BSCFG = 0xdf16 Ftest_spi_can$AGCCTRL2$0$0 == 0xdf17 _AGCCTRL2 = 0xdf17 Ftest_spi_can$AGCCTRL1$0$0 == 0xdf18 _AGCCTRL1 = 0xdf18 Ftest_spi_can$AGCCTRL0$0$0 == 0xdf19 _AGCCTRL0 = 0xdf19 Ftest_spi_can$FREND1$0$0 == 0xdf1a _FREND1 = 0xdf1a Ftest_spi_can$FREND0$0$0 == 0xdf1b _FREND0 = 0xdf1b Ftest_spi_can$FSCAL3$0$0 == 0xdf1c _FSCAL3 = 0xdf1c Ftest_spi_can$FSCAL2$0$0 == 0xdf1d _FSCAL2 = 0xdf1d Ftest_spi_can$FSCAL1$0$0 == 0xdf1e _FSCAL1 = 0xdf1e Ftest_spi_can$FSCAL0$0$0 == 0xdf1f _FSCAL0 = 0xdf1f Ftest_spi_can$TEST2$0$0 == 0xdf23 _TEST2 = 0xdf23 Ftest_spi_can$TEST1$0$0 == 0xdf24 _TEST1 = 0xdf24 Ftest_spi_can$TEST0$0$0 == 0xdf25 _TEST0 = 0xdf25 Ftest_spi_can$PA_TABLE0$0$0 == 0xdf2e _PA_TABLE0 = 0xdf2e Ftest_spi_can$IOCFG2$0$0 == 0xdf2f _IOCFG2 = 0xdf2f Ftest_spi_can$IOCFG1$0$0 == 0xdf30 _IOCFG1 = 0xdf30 Ftest_spi_can$IOCFG0$0$0 == 0xdf31 _IOCFG0 = 0xdf31 Ftest_spi_can$PARTNUM$0$0 == 0xdf36 _PARTNUM = 0xdf36 Ftest_spi_can$VERSION$0$0 == 0xdf37 _VERSION = 0xdf37 Ftest_spi_can$FREQEST$0$0 == 0xdf38 _FREQEST = 0xdf38 Ftest_spi_can$LQI$0$0 == 0xdf39 _LQI = 0xdf39 Ftest_spi_can$RSSI$0$0 == 0xdf3a _RSSI = 0xdf3a Ftest_spi_can$MARCSTATE$0$0 == 0xdf3b _MARCSTATE = 0xdf3b Ftest_spi_can$PKTSTATUS$0$0 == 0xdf3c _PKTSTATUS = 0xdf3c Ftest_spi_can$VCO_VC_DAC$0$0 == 0xdf3d _VCO_VC_DAC = 0xdf3d Ftest_spi_can$I2SCFG0$0$0 == 0xdf40 _I2SCFG0 = 0xdf40 Ftest_spi_can$I2SCFG1$0$0 == 0xdf41 _I2SCFG1 = 0xdf41 Ftest_spi_can$I2SDATL$0$0 == 0xdf42 _I2SDATL = 0xdf42 Ftest_spi_can$I2SDATH$0$0 == 0xdf43 _I2SDATH = 0xdf43 Ftest_spi_can$I2SWCNT$0$0 == 0xdf44 _I2SWCNT = 0xdf44 Ftest_spi_can$I2SSTAT$0$0 == 0xdf45 _I2SSTAT = 0xdf45 Ftest_spi_can$I2SCLKF0$0$0 == 0xdf46 _I2SCLKF0 = 0xdf46 Ftest_spi_can$I2SCLKF1$0$0 == 0xdf47 _I2SCLKF1 = 0xdf47 Ftest_spi_can$I2SCLKF2$0$0 == 0xdf48 _I2SCLKF2 = 0xdf48 Ftest_spi_can$USBADDR$0$0 == 0xde00 _USBADDR = 0xde00 Ftest_spi_can$USBPOW$0$0 == 0xde01 _USBPOW = 0xde01 Ftest_spi_can$USBIIF$0$0 == 0xde02 _USBIIF = 0xde02 Ftest_spi_can$USBOIF$0$0 == 0xde04 _USBOIF = 0xde04 Ftest_spi_can$USBCIF$0$0 == 0xde06 _USBCIF = 0xde06 Ftest_spi_can$USBIIE$0$0 == 0xde07 _USBIIE = 0xde07 Ftest_spi_can$USBOIE$0$0 == 0xde09 _USBOIE = 0xde09 Ftest_spi_can$USBCIE$0$0 == 0xde0b _USBCIE = 0xde0b Ftest_spi_can$USBFRML$0$0 == 0xde0c _USBFRML = 0xde0c Ftest_spi_can$USBFRMH$0$0 == 0xde0d _USBFRMH = 0xde0d Ftest_spi_can$USBINDEX$0$0 == 0xde0e _USBINDEX = 0xde0e Ftest_spi_can$USBMAXI$0$0 == 0xde10 _USBMAXI = 0xde10 Ftest_spi_can$USBCSIL$0$0 == 0xde11 _USBCSIL = 0xde11 Ftest_spi_can$USBCSIH$0$0 == 0xde12 _USBCSIH = 0xde12 Ftest_spi_can$USBMAXO$0$0 == 0xde13 _USBMAXO = 0xde13 Ftest_spi_can$USBCSOL$0$0 == 0xde14 _USBCSOL = 0xde14 Ftest_spi_can$USBCSOH$0$0 == 0xde15 _USBCSOH = 0xde15 Ftest_spi_can$USBCNTL$0$0 == 0xde16 _USBCNTL = 0xde16 Ftest_spi_can$USBCNTH$0$0 == 0xde17 _USBCNTH = 0xde17 Ftest_spi_can$USBF0$0$0 == 0xde20 _USBF0 = 0xde20 Ftest_spi_can$USBF1$0$0 == 0xde22 _USBF1 = 0xde22 Ftest_spi_can$USBF2$0$0 == 0xde24 _USBF2 = 0xde24 Ftest_spi_can$USBF3$0$0 == 0xde26 _USBF3 = 0xde26 Ftest_spi_can$USBF4$0$0 == 0xde28 _USBF4 = 0xde28 Ftest_spi_can$USBF5$0$0 == 0xde2a _USBF5 = 0xde2a G$report$0$0==. _report:: .ds 500 ;-------------------------------------------------------- ; absolute external ram data ;-------------------------------------------------------- .area XABS (ABS,XDATA) ;-------------------------------------------------------- ; external initialized ram data ;-------------------------------------------------------- .area XISEG (XDATA) G$txdata2$0$0==. _txdata2:: .ds 14 G$rxdata$0$0==. _rxdata:: .ds 14 G$txdata$0$0==. _txdata:: .ds 14 .area HOME (CODE) .area GSINIT0 (CODE) .area GSINIT1 (CODE) .area GSINIT2 (CODE) .area GSINIT3 (CODE) .area GSINIT4 (CODE) .area GSINIT5 (CODE) .area GSINIT (CODE) .area GSFINAL (CODE) .area CSEG (CODE) ;-------------------------------------------------------- ; interrupt vector ;-------------------------------------------------------- .area HOME (CODE) __interrupt_vect: ljmp __sdcc_gsinit_startup reti .ds 7 reti .ds 7 reti .ds 7 ljmp _ISR_URX1 .ds 5 reti .ds 7 reti .ds 7 reti .ds 7 reti .ds 7 reti .ds 7 reti .ds 7 reti .ds 7 reti .ds 7 ljmp _ISR_T4 ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- .area HOME (CODE) .area GSINIT (CODE) .area GSFINAL (CODE) .area GSINIT (CODE) .globl __sdcc_gsinit_startup .globl __sdcc_program_startup .globl __start__stack .globl __mcs51_genXINIT .globl __mcs51_genXRAMCLEAR .globl __mcs51_genRAMCLEAR G$main$0$0 ==. C$test_spi_can.c$45$1$1 ==. ; apps/test_spi_can/test_spi_can.c:45: uint16 DATA reportLength = 0; clr a mov _reportLength,a mov (_reportLength + 1),a G$main$0$0 ==. C$test_spi_can.c$49$1$1 ==. ; apps/test_spi_can/test_spi_can.c:49: uint16 DATA reportBytesSent = 0; clr a mov _reportBytesSent,a mov (_reportBytesSent + 1),a .area GSFINAL (CODE) ljmp __sdcc_program_startup ;-------------------------------------------------------- ; Home ;-------------------------------------------------------- .area HOME (CODE) .area HOME (CODE) __sdcc_program_startup: lcall _main ; return from main will lock up sjmp . ;-------------------------------------------------------- ; code ;-------------------------------------------------------- .area CSEG (CODE) ;------------------------------------------------------------ ;Allocation info for local variables in function 'Can_init' ;------------------------------------------------------------ ;------------------------------------------------------------ G$Can_init$0$0 ==. C$CAN.c$24$0$0 ==. ; apps/test_spi_can/../CAN.c:24: void Can_init(uint8 baudrate){ ; ----------------------------------------- ; function Can_init ; ----------------------------------------- _Can_init: ar2 = 0x02 ar3 = 0x03 ar4 = 0x04 ar5 = 0x05 ar6 = 0x06 ar7 = 0x07 ar0 = 0x00 ar1 = 0x01 mov r2,dpl C$CAN.c$28$1$1 ==. ; apps/test_spi_can/../CAN.c:28: spiXMasterInit(); push ar2 lcall _spi1MasterInit C$CAN.c$29$1$1 ==. ; apps/test_spi_can/../CAN.c:29: spiXMasterSetFrequency(230400); mov dptr,#0x8400 mov b,#0x03 clr a lcall _spi1MasterSetFrequency C$CAN.c$30$1$1 ==. ; apps/test_spi_can/../CAN.c:30: spiXMasterSetClockPolarity(SPI_POLARITY_IDLE_HIGH); // idle when high setb _spi1MasterSetClockPolarity_PARM_1 lcall _spi1MasterSetClockPolarity C$CAN.c$31$1$1 ==. ; apps/test_spi_can/../CAN.c:31: spiXMasterSetClockPhase(SPI_PHASE_EDGE_TRAILING); // data sampled when clock goes from active to idle setb _spi1MasterSetClockPhase_PARM_1 lcall _spi1MasterSetClockPhase C$CAN.c$32$1$1 ==. ; apps/test_spi_can/../CAN.c:32: spiXMasterSetBitOrder(SPI_BIT_ORDER_MSB_FIRST); clr _spi1MasterSetBitOrder_PARM_1 lcall _spi1MasterSetBitOrder C$CAN.c$33$1$1 ==. ; apps/test_spi_can/../CAN.c:33: Can_reset(); //Reset CAN Controller & bring to CONFIG mode lcall _Can_reset pop ar2 C$CAN.c$34$1$1 ==. ; apps/test_spi_can/../CAN.c:34: set_Can_baudrate(baudrate); mov dpl,r2 lcall _set_Can_baudrate C$CAN.c$35$1$1 ==. ; apps/test_spi_can/../CAN.c:35: write_can_reg(0x0F,0x03); // set CAN CTRL in normal mode mov r0,#_write_can_reg_PARM_2 mov a,#0x03 movx @r0,a mov dpl,#0x0F C$CAN.c$37$1$1 ==. XG$Can_init$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'Can_setnormalmode' ;------------------------------------------------------------ ;------------------------------------------------------------ G$Can_setnormalmode$0$0 ==. C$CAN.c$40$1$1 ==. ; apps/test_spi_can/../CAN.c:40: void Can_setnormalmode(){ ; ----------------------------------------- ; function Can_setnormalmode ; ----------------------------------------- _Can_setnormalmode: C$CAN.c$41$1$1 ==. ; apps/test_spi_can/../CAN.c:41: uint8 val = read_can_reg(0x0F); mov dpl,#0x0F lcall _read_can_reg mov r2,dpl C$CAN.c$42$1$1 ==. ; apps/test_spi_can/../CAN.c:42: val = val & 0x1F; mov r0,#_write_can_reg_PARM_2 mov a,#0x1F anl a,r2 movx @r0,a C$CAN.c$43$1$1 ==. ; apps/test_spi_can/../CAN.c:43: write_can_reg(0x0F,val); // set CAN CTRL in normal mode mov dpl,#0x0F C$CAN.c$44$1$1 ==. XG$Can_setnormalmode$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'Can_setconfigmode' ;------------------------------------------------------------ ;------------------------------------------------------------ G$Can_setconfigmode$0$0 ==. C$CAN.c$46$1$1 ==. ; apps/test_spi_can/../CAN.c:46: void Can_setconfigmode(){ ; ----------------------------------------- ; function Can_setconfigmode ; ----------------------------------------- _Can_setconfigmode: C$CAN.c$47$1$1 ==. ; apps/test_spi_can/../CAN.c:47: uint8 val = read_can_reg(0x0F); mov dpl,#0x0F lcall _read_can_reg mov r2,dpl C$CAN.c$48$1$1 ==. ; apps/test_spi_can/../CAN.c:48: val = val | 0x80; mov r0,#_write_can_reg_PARM_2 mov a,#0x80 orl a,r2 movx @r0,a C$CAN.c$49$1$1 ==. ; apps/test_spi_can/../CAN.c:49: write_can_reg(0x0F,val); // set CAN CTRL in config mode mov dpl,#0x0F C$CAN.c$50$1$1 ==. XG$Can_setconfigmode$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'Can_reset' ;------------------------------------------------------------ ;------------------------------------------------------------ G$Can_reset$0$0 ==. C$CAN.c$55$1$1 ==. ; apps/test_spi_can/../CAN.c:55: void Can_reset(){ ; ----------------------------------------- ; function Can_reset ; ----------------------------------------- _Can_reset: C$CAN.c$56$1$1 ==. ; apps/test_spi_can/../CAN.c:56: txdata[0] = 0xC0; mov dptr,#_txdata mov a,#0xC0 movx @dptr,a C$CAN.c$57$1$1 ==. ; apps/test_spi_can/../CAN.c:57: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$58$1$1 ==. ; apps/test_spi_can/../CAN.c:58: spiXMasterTransfer(txdata,rxdata,1); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x01 movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata lcall _spi1MasterTransfer C$CAN.c$59$1$1 ==. ; apps/test_spi_can/../CAN.c:59: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$60$1$1 ==. ; apps/test_spi_can/../CAN.c:60: CShigh; setb b[0] mov bits,b mov dpl,#0x0E C$CAN.c$61$1$1 ==. XG$Can_reset$0$0 ==. ljmp _setDigitalOutput ;------------------------------------------------------------ ;Allocation info for local variables in function 'read_can_reg' ;------------------------------------------------------------ ;------------------------------------------------------------ G$read_can_reg$0$0 ==. C$CAN.c$63$1$1 ==. ; apps/test_spi_can/../CAN.c:63: uint8 read_can_reg(uint8 addr){ ; ----------------------------------------- ; function read_can_reg ; ----------------------------------------- _read_can_reg: mov r2,dpl C$CAN.c$65$1$1 ==. ; apps/test_spi_can/../CAN.c:65: txdata[0] = 0x03; // read instruction mov dptr,#_txdata mov a,#0x03 movx @dptr,a C$CAN.c$66$1$1 ==. ; apps/test_spi_can/../CAN.c:66: txdata[1] = addr; // read reg at address mov dptr,#(_txdata + 0x0001) mov a,r2 movx @dptr,a C$CAN.c$67$1$1 ==. ; apps/test_spi_can/../CAN.c:67: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$68$1$1 ==. ; apps/test_spi_can/../CAN.c:68: spiXMasterTransfer(txdata,rxdata,3); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x03 movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata lcall _spi1MasterTransfer C$CAN.c$69$1$1 ==. ; apps/test_spi_can/../CAN.c:69: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$70$1$1 ==. ; apps/test_spi_can/../CAN.c:70: CShigh; setb b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$71$1$1 ==. ; apps/test_spi_can/../CAN.c:71: return rxdata[2]; mov dptr,#(_rxdata + 0x0002) movx a,@dptr C$CAN.c$72$1$1 ==. XG$read_can_reg$0$0 ==. mov dpl,a ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'write_can_reg' ;------------------------------------------------------------ ;------------------------------------------------------------ G$write_can_reg$0$0 ==. C$CAN.c$74$1$1 ==. ; apps/test_spi_can/../CAN.c:74: void write_can_reg(uint8 addr,uint8 val){ ; ----------------------------------------- ; function write_can_reg ; ----------------------------------------- _write_can_reg: mov r2,dpl C$CAN.c$75$1$1 ==. ; apps/test_spi_can/../CAN.c:75: txdata[0] = 0x02; // write instruction mov dptr,#_txdata mov a,#0x02 movx @dptr,a C$CAN.c$76$1$1 ==. ; apps/test_spi_can/../CAN.c:76: txdata[1] = addr; // write to addr mov dptr,#(_txdata + 0x0001) mov a,r2 movx @dptr,a C$CAN.c$77$1$1 ==. ; apps/test_spi_can/../CAN.c:77: txdata[2] = val; // write val mov dptr,#(_txdata + 0x0002) mov r0,#_write_can_reg_PARM_2 movx a,@r0 movx @dptr,a C$CAN.c$78$1$1 ==. ; apps/test_spi_can/../CAN.c:78: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$79$1$1 ==. ; apps/test_spi_can/../CAN.c:79: spiXMasterTransfer(txdata,rxdata,3); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x03 movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata lcall _spi1MasterTransfer C$CAN.c$80$1$1 ==. ; apps/test_spi_can/../CAN.c:80: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$81$1$1 ==. ; apps/test_spi_can/../CAN.c:81: CShigh; setb b[0] mov bits,b mov dpl,#0x0E C$CAN.c$82$1$1 ==. XG$write_can_reg$0$0 ==. ljmp _setDigitalOutput ;------------------------------------------------------------ ;Allocation info for local variables in function 'buf0ovfbuf1' ;------------------------------------------------------------ ;------------------------------------------------------------ G$buf0ovfbuf1$0$0 ==. C$CAN.c$86$1$1 ==. ; apps/test_spi_can/../CAN.c:86: void buf0ovfbuf1(uint8 stat){ ; ----------------------------------------- ; function buf0ovfbuf1 ; ----------------------------------------- _buf0ovfbuf1: mov r2,dpl C$CAN.c$87$1$1 ==. ; apps/test_spi_can/../CAN.c:87: uint8 val = read_can_reg(0x60); mov dpl,#0x60 push ar2 lcall _read_can_reg mov r3,dpl pop ar2 C$CAN.c$88$1$1 ==. ; apps/test_spi_can/../CAN.c:88: if(stat){ mov a,r2 jz 00102$ C$CAN.c$89$2$2 ==. ; apps/test_spi_can/../CAN.c:89: val = val | (1<<2); // Write to BUKT orl ar3,#0x04 C$CAN.c$90$2$2 ==. ; apps/test_spi_can/../CAN.c:90: write_can_reg(0x60,val); mov r0,#_write_can_reg_PARM_2 mov a,r3 movx @r0,a mov dpl,#0x60 ljmp _write_can_reg 00102$: C$CAN.c$92$2$3 ==. ; apps/test_spi_can/../CAN.c:92: val = val & (0xFB); // Write to BUKT mov r0,#_write_can_reg_PARM_2 mov a,#0xFB anl a,r3 movx @r0,a C$CAN.c$93$2$3 ==. ; apps/test_spi_can/../CAN.c:93: write_can_reg(0x60,val); mov dpl,#0x60 C$CAN.c$95$1$1 ==. XG$buf0ovfbuf1$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'setmask0' ;------------------------------------------------------------ ;------------------------------------------------------------ G$setmask0$0$0 ==. C$CAN.c$97$1$1 ==. ; apps/test_spi_can/../CAN.c:97: void setmask0(uint16 mask){ ; ----------------------------------------- ; function setmask0 ; ----------------------------------------- _setmask0: mov r2,dpl mov r3,dph C$CAN.c$98$1$1 ==. ; apps/test_spi_can/../CAN.c:98: write_can_reg(0x20,(uint8) (mask>>3)); mov ar4,r2 mov a,r3 swap a rl a xch a,r4 swap a rl a anl a,#0x1f xrl a,r4 xch a,r4 anl a,#0x1f xch a,r4 xrl a,r4 xch a,r4 mov r0,#_write_can_reg_PARM_2 mov a,r4 movx @r0,a mov dpl,#0x20 push ar2 push ar3 lcall _write_can_reg pop ar3 pop ar2 C$CAN.c$99$1$1 ==. ; apps/test_spi_can/../CAN.c:99: write_can_reg(0x21,(uint8) (mask<<5)); mov r0,#_write_can_reg_PARM_2 mov a,r2 swap a rl a anl a,#0xe0 movx @r0,a mov dpl,#0x21 C$CAN.c$100$1$1 ==. XG$setmask0$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'setrxfil0' ;------------------------------------------------------------ ;------------------------------------------------------------ G$setrxfil0$0$0 ==. C$CAN.c$102$1$1 ==. ; apps/test_spi_can/../CAN.c:102: void setrxfil0(uint16 fil){ ; ----------------------------------------- ; function setrxfil0 ; ----------------------------------------- _setrxfil0: mov r2,dpl mov r3,dph C$CAN.c$103$1$1 ==. ; apps/test_spi_can/../CAN.c:103: write_can_reg(0x00,(uint8) (fil>>3)); mov ar4,r2 mov a,r3 swap a rl a xch a,r4 swap a rl a anl a,#0x1f xrl a,r4 xch a,r4 anl a,#0x1f xch a,r4 xrl a,r4 xch a,r4 mov r0,#_write_can_reg_PARM_2 mov a,r4 movx @r0,a mov dpl,#0x00 push ar2 push ar3 lcall _write_can_reg pop ar3 pop ar2 C$CAN.c$104$1$1 ==. ; apps/test_spi_can/../CAN.c:104: write_can_reg(0x01,(uint8) (fil<<5)); mov r0,#_write_can_reg_PARM_2 mov a,r2 swap a rl a anl a,#0xe0 movx @r0,a mov dpl,#0x01 C$CAN.c$105$1$1 ==. XG$setrxfil0$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'setrxfil1' ;------------------------------------------------------------ ;------------------------------------------------------------ G$setrxfil1$0$0 ==. C$CAN.c$107$1$1 ==. ; apps/test_spi_can/../CAN.c:107: void setrxfil1(uint16 fil){ ; ----------------------------------------- ; function setrxfil1 ; ----------------------------------------- _setrxfil1: mov r2,dpl mov r3,dph C$CAN.c$108$1$1 ==. ; apps/test_spi_can/../CAN.c:108: write_can_reg(0x04,(uint8) (fil>>3)); mov ar4,r2 mov a,r3 swap a rl a xch a,r4 swap a rl a anl a,#0x1f xrl a,r4 xch a,r4 anl a,#0x1f xch a,r4 xrl a,r4 xch a,r4 mov r0,#_write_can_reg_PARM_2 mov a,r4 movx @r0,a mov dpl,#0x04 push ar2 push ar3 lcall _write_can_reg pop ar3 pop ar2 C$CAN.c$109$1$1 ==. ; apps/test_spi_can/../CAN.c:109: write_can_reg(0x05,(uint8) (fil<<5)); mov r0,#_write_can_reg_PARM_2 mov a,r2 swap a rl a anl a,#0xe0 movx @r0,a mov dpl,#0x05 C$CAN.c$110$1$1 ==. XG$setrxfil1$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'set_Can_baudrate' ;------------------------------------------------------------ ;------------------------------------------------------------ G$set_Can_baudrate$0$0 ==. C$CAN.c$115$1$1 ==. ; apps/test_spi_can/../CAN.c:115: void set_Can_baudrate(uint8 A){ ; ----------------------------------------- ; function set_Can_baudrate ; ----------------------------------------- _set_Can_baudrate: mov r2,dpl C$CAN.c$116$1$1 ==. ; apps/test_spi_can/../CAN.c:116: switch(A){ cjne r2,#0x01,00109$ sjmp 00101$ 00109$: C$CAN.c$117$2$2 ==. ; apps/test_spi_can/../CAN.c:117: case 1: //125kbit/s BRP = 04h cjne r2,#0x02,00103$ sjmp 00102$ 00101$: C$CAN.c$119$2$2 ==. ; apps/test_spi_can/../CAN.c:119: write_can_reg(0x2A,0x04); // write to CNF1 mov r0,#_write_can_reg_PARM_2 mov a,#0x04 movx @r0,a mov dpl,#0x2A lcall _write_can_reg C$CAN.c$120$2$2 ==. ; apps/test_spi_can/../CAN.c:120: write_can_reg(0x29,0xB1); // write to CNF2 mov r0,#_write_can_reg_PARM_2 mov a,#0xB1 movx @r0,a mov dpl,#0x29 lcall _write_can_reg C$CAN.c$121$2$2 ==. ; apps/test_spi_can/../CAN.c:121: write_can_reg(0x28,0x05); // write to CNF3 mov r0,#_write_can_reg_PARM_2 mov a,#0x05 movx @r0,a mov dpl,#0x28 C$CAN.c$122$2$2 ==. ; apps/test_spi_can/../CAN.c:122: break; C$CAN.c$123$2$2 ==. ; apps/test_spi_can/../CAN.c:123: case 2: ljmp _write_can_reg 00102$: C$CAN.c$126$2$2 ==. ; apps/test_spi_can/../CAN.c:126: write_can_reg(0x2A,0x03); // write to CNF1 mov r0,#_write_can_reg_PARM_2 mov a,#0x03 movx @r0,a mov dpl,#0x2A lcall _write_can_reg C$CAN.c$127$2$2 ==. ; apps/test_spi_can/../CAN.c:127: write_can_reg(0x29,0x91); // write to CNF2 mov r0,#_write_can_reg_PARM_2 mov a,#0x91 movx @r0,a mov dpl,#0x29 lcall _write_can_reg C$CAN.c$128$2$2 ==. ; apps/test_spi_can/../CAN.c:128: write_can_reg(0x28,0x03); // write to CNF3 mov r0,#_write_can_reg_PARM_2 mov a,#0x03 movx @r0,a mov dpl,#0x28 C$CAN.c$129$2$2 ==. ; apps/test_spi_can/../CAN.c:129: break; C$CAN.c$130$2$2 ==. ; apps/test_spi_can/../CAN.c:130: default: ljmp _write_can_reg 00103$: C$CAN.c$133$2$2 ==. ; apps/test_spi_can/../CAN.c:133: write_can_reg(0x2A,0x03); // write to CNF1 mov r0,#_write_can_reg_PARM_2 mov a,#0x03 movx @r0,a mov dpl,#0x2A lcall _write_can_reg C$CAN.c$134$2$2 ==. ; apps/test_spi_can/../CAN.c:134: write_can_reg(0x29,0x91); // write to CNF2 mov r0,#_write_can_reg_PARM_2 mov a,#0x91 movx @r0,a mov dpl,#0x29 lcall _write_can_reg C$CAN.c$135$2$2 ==. ; apps/test_spi_can/../CAN.c:135: write_can_reg(0x28,0x03); // write to CNF3 mov r0,#_write_can_reg_PARM_2 mov a,#0x03 movx @r0,a mov dpl,#0x28 C$CAN.c$137$1$1 ==. ; apps/test_spi_can/../CAN.c:137: } C$CAN.c$138$1$1 ==. XG$set_Can_baudrate$0$0 ==. ljmp _write_can_reg ;------------------------------------------------------------ ;Allocation info for local variables in function 'load_can_txbuf0' ;------------------------------------------------------------ ;------------------------------------------------------------ G$load_can_txbuf0$0$0 ==. C$CAN.c$142$1$1 ==. ; apps/test_spi_can/../CAN.c:142: void load_can_txbuf0(){ ; ----------------------------------------- ; function load_can_txbuf0 ; ----------------------------------------- _load_can_txbuf0: C$CAN.c$143$1$1 ==. ; apps/test_spi_can/../CAN.c:143: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$146$1$1 ==. ; apps/test_spi_can/../CAN.c:146: spiXMasterTransfer(txdata2,rxdata,14); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x0E movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata2 lcall _spi1MasterTransfer C$CAN.c$147$1$1 ==. ; apps/test_spi_can/../CAN.c:147: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$148$1$1 ==. ; apps/test_spi_can/../CAN.c:148: CShigh; setb b[0] mov bits,b mov dpl,#0x0E C$CAN.c$149$1$1 ==. XG$load_can_txbuf0$0$0 ==. ljmp _setDigitalOutput ;------------------------------------------------------------ ;Allocation info for local variables in function 'load_can_txbuf1' ;------------------------------------------------------------ ;------------------------------------------------------------ G$load_can_txbuf1$0$0 ==. C$CAN.c$151$1$1 ==. ; apps/test_spi_can/../CAN.c:151: void load_can_txbuf1(){ ; ----------------------------------------- ; function load_can_txbuf1 ; ----------------------------------------- _load_can_txbuf1: C$CAN.c$152$1$1 ==. ; apps/test_spi_can/../CAN.c:152: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$153$1$1 ==. ; apps/test_spi_can/../CAN.c:153: txdata2[0] = 0x42; //tx buffer1 SIDH mov dptr,#_txdata2 mov a,#0x42 movx @dptr,a C$CAN.c$154$1$1 ==. ; apps/test_spi_can/../CAN.c:154: spiXMasterTransfer(txdata2,rxdata,14); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x0E movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata2 lcall _spi1MasterTransfer C$CAN.c$155$1$1 ==. ; apps/test_spi_can/../CAN.c:155: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$156$1$1 ==. ; apps/test_spi_can/../CAN.c:156: CShigh; setb b[0] mov bits,b mov dpl,#0x0E C$CAN.c$157$1$1 ==. XG$load_can_txbuf1$0$0 ==. ljmp _setDigitalOutput ;------------------------------------------------------------ ;Allocation info for local variables in function 'load_can_txbuf2' ;------------------------------------------------------------ ;------------------------------------------------------------ G$load_can_txbuf2$0$0 ==. C$CAN.c$159$1$1 ==. ; apps/test_spi_can/../CAN.c:159: void load_can_txbuf2(){ ; ----------------------------------------- ; function load_can_txbuf2 ; ----------------------------------------- _load_can_txbuf2: C$CAN.c$160$1$1 ==. ; apps/test_spi_can/../CAN.c:160: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$161$1$1 ==. ; apps/test_spi_can/../CAN.c:161: txdata2[0] = 0x44; //tx buffer2 SIDH mov dptr,#_txdata2 mov a,#0x44 movx @dptr,a C$CAN.c$162$1$1 ==. ; apps/test_spi_can/../CAN.c:162: spiXMasterTransfer(txdata2,rxdata,14); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x0E movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata2 lcall _spi1MasterTransfer C$CAN.c$163$1$1 ==. ; apps/test_spi_can/../CAN.c:163: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$164$1$1 ==. ; apps/test_spi_can/../CAN.c:164: CShigh; setb b[0] mov bits,b mov dpl,#0x0E C$CAN.c$165$1$1 ==. XG$load_can_txbuf2$0$0 ==. ljmp _setDigitalOutput ;------------------------------------------------------------ ;Allocation info for local variables in function 'read_rxbuf0' ;------------------------------------------------------------ ;------------------------------------------------------------ G$read_rxbuf0$0$0 ==. C$CAN.c$167$1$1 ==. ; apps/test_spi_can/../CAN.c:167: void read_rxbuf0(){ ; ----------------------------------------- ; function read_rxbuf0 ; ----------------------------------------- _read_rxbuf0: C$CAN.c$169$1$1 ==. ; apps/test_spi_can/../CAN.c:169: txdata2[0] = 0x90; // receive buffer0 starting with SIDH mov dptr,#_txdata2 mov a,#0x90 movx @dptr,a C$CAN.c$170$1$1 ==. ; apps/test_spi_can/../CAN.c:170: CSlow; clr b[0] mov bits,b mov dpl,#0x0E lcall _setDigitalOutput C$CAN.c$171$1$1 ==. ; apps/test_spi_can/../CAN.c:171: spiXMasterTransfer(txdata2,rxdata,14); mov r0,#_spi1MasterTransfer_PARM_2 mov a,#_rxdata movx @r0,a inc r0 mov a,#(_rxdata >> 8) movx @r0,a mov r0,#_spi1MasterTransfer_PARM_3 mov a,#0x0E movx @r0,a inc r0 clr a movx @r0,a mov dptr,#_txdata2 lcall _spi1MasterTransfer C$CAN.c$172$1$1 ==. ; apps/test_spi_can/../CAN.c:172: while(spiXMasterBusy()){ } 00101$: lcall _spi1MasterBusy jc 00101$ C$CAN.c$173$1$1 ==. ; apps/test_spi_can/../CAN.c:173: CShigh; setb b[0] mov bits,b mov dpl,#0x0E C$CAN.c$174$1$1 ==. XG$read_rxbuf0$0$0 ==. ljmp _setDigitalOutput ;------------------------------------------------------------ ;Allocation info for local variables in function 'send_Canmsg_wait' ;------------------------------------------------------------ ;sloc0 Allocated with name '_send_Canmsg_wait_sloc0_1_0' ;------------------------------------------------------------ G$send_Canmsg_wait$0$0 ==. C$CAN.c$180$1$1 ==. ; apps/test_spi_can/../CAN.c:180: void send_Canmsg_wait(Can_msg *msg){ ; ----------------------------------------- ; function send_Canmsg_wait ; ----------------------------------------- _send_Canmsg_wait: mov r2,b mov r3,dph mov a,dpl mov r0,#_send_Canmsg_wait_msg_1_1 movx @r0,a inc r0 mov a,r3 movx @r0,a inc r0 mov a,r2 movx @r0,a C$CAN.c$182$1$1 ==. ; apps/test_spi_can/../CAN.c:182: uint8 sent=0; mov r0,#_send_Canmsg_wait_sent_1_1 clr a movx @r0,a C$CAN.c$184$1$1 ==. ; apps/test_spi_can/../CAN.c:184: txdata2[1] =(uint8) (msg->id >> 3); mov r0,#_send_Canmsg_wait_msg_1_1 movx a,@r0 mov dpl,a inc r0 movx a,@r0 mov dph,a inc r0 movx a,@r0 mov b,a lcall __gptrget mov r6,a inc dptr lcall __gptrget mov r7,a mov ar5,r6 swap a rl a xch a,r5 swap a rl a anl a,#0x1f xrl a,r5 xch a,r5 anl a,#0x1f xch a,r5 xrl a,r5 xch a,r5 mov dptr,#(_txdata2 + 0x0001) mov a,r5 movx @dptr,a C$CAN.c$185$1$1 ==. ; apps/test_spi_can/../CAN.c:185: txdata2[2] = (uint8) (msg->id << 5); mov a,r6 swap a rl a anl a,#0xe0 mov r6,a mov dptr,#(_txdata2 + 0x0002) movx @dptr,a C$CAN.c$187$1$1 ==. ; apps/test_spi_can/../CAN.c:187: txdata2[5] = msg->len;// data len mov r0,#_send_Canmsg_wait_msg_1_1 movx a,@r0 add a,#0x02 mov r2,a inc r0 movx a,@r0 addc a,#0x00 mov r3,a inc r0 movx a,@r0 mov r4,a mov dpl,r2 mov dph,r3 mov b,r4 lcall __gptrget mov r2,a mov dptr,#(_txdata2 + 0x0005) movx @dptr,a C$CAN.c$188$2$2 ==. ; apps/test_spi_can/../CAN.c:188: for(i = 0;i < msg->len; i++){ mov r0,#_send_Canmsg_wait_msg_1_1 movx a,@r0 add a,#0x03 mov r3,a inc r0 movx a,@r0 addc a,#0x00 mov r4,a inc r0 movx a,@r0 mov r5,a mov r0,#_send_Canmsg_wait_i_1_1 clr a movx @r0,a inc r0 movx @r0,a 00112$: push ar3 push ar4 push ar5 mov ar3,r2 mov r4,#0x00 mov r0,#_send_Canmsg_wait_i_1_1 clr c movx a,@r0 subb a,r3 inc r0 movx a,@r0 xrl a,#0x80 mov b,r4 xrl b,#0x80 subb a,b pop ar5 pop ar4 pop ar3 jnc 00109$ C$CAN.c$189$1$1 ==. ; apps/test_spi_can/../CAN.c:189: txdata2[6+i] = msg->dat[i]; push ar2 mov r0,#_send_Canmsg_wait_i_1_1 movx a,@r0 add a,#0x06 add a,#_txdata2 mov _send_Canmsg_wait_sloc0_1_0,a clr a addc a,#(_txdata2 >> 8) mov (_send_Canmsg_wait_sloc0_1_0 + 1),a mov r0,#_send_Canmsg_wait_i_1_1 movx a,@r0 add a,r3 mov r7,a inc r0 movx a,@r0 addc a,r4 mov r2,a mov ar6,r5 mov dpl,r7 mov dph,r2 mov b,r6 lcall __gptrget mov r7,a mov dpl,_send_Canmsg_wait_sloc0_1_0 mov dph,(_send_Canmsg_wait_sloc0_1_0 + 1) movx @dptr,a C$CAN.c$188$1$1 ==. ; apps/test_spi_can/../CAN.c:188: for(i = 0;i < msg->len; i++){ mov r0,#_send_Canmsg_wait_i_1_1 movx a,@r0 add a,#0x01 movx @r0,a inc r0 movx a,@r0 addc a,#0x00 movx @r0,a pop ar2 C$CAN.c$192$1$1 ==. ; apps/test_spi_can/../CAN.c:192: while(!sent){ sjmp 00112$ 00109$: mov r0,#_send_Canmsg_wait_sent_1_1 movx a,@r0 jnz 00116$ C$CAN.c$193$2$3 ==. ; apps/test_spi_can/../CAN.c:193: if((read_can_reg(0x30) & (1<<3)) == 0){ // check if message in txbuf0 is pending transmission mov dpl,#0x30 lcall _read_can_reg mov a,dpl jb acc.3,00107$ C$CAN.c$194$3$4 ==. ; apps/test_spi_can/../CAN.c:194: load_can_txbuf0(); lcall _load_can_txbuf0 C$CAN.c$195$3$4 ==. ; apps/test_spi_can/../CAN.c:195: write_can_reg(0x30,0x0B);// initiate tx from txbuf0 mov r0,#_write_can_reg_PARM_2 mov a,#0x0B movx @r0,a mov dpl,#0x30 lcall _write_can_reg C$CAN.c$196$3$4 ==. ; apps/test_spi_can/../CAN.c:196: sent=1; mov r0,#_send_Canmsg_wait_sent_1_1 mov a,#0x01 movx @r0,a sjmp 00109$ 00107$: C$CAN.c$197$2$3 ==. ; apps/test_spi_can/../CAN.c:197: }else if((read_can_reg(0x40) & (1<<3)) == 0){ // check if message in txbuf1 is pending transmission mov dpl,#0x40 lcall _read_can_reg mov a,dpl jb acc.3,00104$ C$CAN.c$198$3$5 ==. ; apps/test_spi_can/../CAN.c:198: load_can_txbuf1(); lcall _load_can_txbuf1 C$CAN.c$199$3$5 ==. ; apps/test_spi_can/../CAN.c:199: write_can_reg(0x40,0x0B);// initiate tx from txbuf1 mov r0,#_write_can_reg_PARM_2 mov a,#0x0B movx @r0,a mov dpl,#0x40 lcall _write_can_reg C$CAN.c$200$3$5 ==. ; apps/test_spi_can/../CAN.c:200: sent=1; mov r0,#_send_Canmsg_wait_sent_1_1 mov a,#0x01 movx @r0,a sjmp 00109$ 00104$: C$CAN.c$201$2$3 ==. ; apps/test_spi_can/../CAN.c:201: }else if((read_can_reg(0x50) & (1<<3)) == 0){// check if message in txbuf2 is pending transmission mov dpl,#0x50 lcall _read_can_reg mov a,dpl jb acc.3,00109$ C$CAN.c$202$3$6 ==. ; apps/test_spi_can/../CAN.c:202: load_can_txbuf2(); lcall _load_can_txbuf2 C$CAN.c$203$3$6 ==. ; apps/test_spi_can/../CAN.c:203: write_can_reg(0x50,0x0B);// initiate tx from txbuf2 mov r0,#_write_can_reg_PARM_2 mov a,#0x0B movx @r0,a mov dpl,#0x50 lcall _write_can_reg C$CAN.c$204$3$6 ==. ; apps/test_spi_can/../CAN.c:204: sent=1; mov r0,#_send_Canmsg_wait_sent_1_1 mov a,#0x01 movx @r0,a sjmp 00109$ 00116$: C$CAN.c$207$1$1 ==. XG$send_Canmsg_wait$0$0 ==. ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'get_Canmsg' ;------------------------------------------------------------ ;sloc0 Allocated with name '_get_Canmsg_sloc0_1_0' ;sloc1 Allocated with name '_get_Canmsg_sloc1_1_0' ;sloc2 Allocated with name '_get_Canmsg_sloc2_1_0' ;sloc3 Allocated with name '_get_Canmsg_sloc3_1_0' ;sloc4 Allocated with name '_get_Canmsg_sloc4_1_0' ;sloc5 Allocated with name '_get_Canmsg_sloc5_1_0' ;------------------------------------------------------------ G$get_Canmsg$0$0 ==. C$CAN.c$211$1$1 ==. ; apps/test_spi_can/../CAN.c:211: uint8 get_Canmsg(Can_msg *msg){ ; ----------------------------------------- ; function get_Canmsg ; ----------------------------------------- _get_Canmsg: mov r2,b mov r3,dph mov a,dpl mov r0,#_get_Canmsg_msg_1_1 movx @r0,a inc r0 mov a,r3 movx @r0,a inc r0 mov a,r2 movx @r0,a C$CAN.c$212$1$1 ==. ; apps/test_spi_can/../CAN.c:212: uint8 nmsg = 0,i; mov r5,#0x00 C$CAN.c$213$1$1 ==. ; apps/test_spi_can/../CAN.c:213: if((read_can_reg(0x2c) & 1) == 1){ // rxbuf0 is full mov dpl,#0x2C push ar5 lcall _read_can_reg mov a,dpl pop ar5 anl a,#0x01 mov r6,a cjne r6,#0x01,00113$ sjmp 00114$ 00113$: ljmp 00102$ 00114$: C$CAN.c$214$2$2 ==. ; apps/test_spi_can/../CAN.c:214: read_rxbuf0(); //takes care of clearing interrupt lcall _read_rxbuf0 C$CAN.c$215$2$2 ==. ; apps/test_spi_can/../CAN.c:215: msg->len = rxdata[5] & 0x0F; mov r0,#_get_Canmsg_msg_1_1 movx a,@r0 add a,#0x02 mov _get_Canmsg_sloc0_1_0,a inc r0 movx a,@r0 addc a,#0x00 mov (_get_Canmsg_sloc0_1_0 + 1),a inc r0 movx a,@r0 mov (_get_Canmsg_sloc0_1_0 + 2),a mov dptr,#(_rxdata + 0x0005) movx a,@dptr mov _get_Canmsg_sloc1_1_0,a mov a,#0x0F anl a,_get_Canmsg_sloc1_1_0 mov _get_Canmsg_sloc2_1_0,a mov dpl,_get_Canmsg_sloc0_1_0 mov dph,(_get_Canmsg_sloc0_1_0 + 1) mov b,(_get_Canmsg_sloc0_1_0 + 2) lcall __gptrput C$CAN.c$216$2$2 ==. ; apps/test_spi_can/../CAN.c:216: msg->id = (rxdata[1] << 3) + (rxdata[2] >> 5); mov dptr,#(_rxdata + 0x0001) movx a,@dptr mov _get_Canmsg_sloc3_1_0,a mov _get_Canmsg_sloc4_1_0,_get_Canmsg_sloc3_1_0 mov (_get_Canmsg_sloc4_1_0 + 1),#0x00 mov r3,_get_Canmsg_sloc4_1_0 mov a,(_get_Canmsg_sloc4_1_0 + 1) swap a rr a anl a,#0xf8 xch a,r3 swap a rr a xch a,r3 xrl a,r3 xch a,r3 anl a,#0xf8 xch a,r3 xrl a,r3 mov r4,a mov dptr,#(_rxdata + 0x0002) movx a,@dptr swap a rr a anl a,#0x07 mov r6,a mov r7,#0x00 add a,r3 mov r3,a mov a,r7 addc a,r4 mov r4,a mov r0,#_get_Canmsg_msg_1_1 movx a,@r0 mov dpl,a inc r0 movx a,@r0 mov dph,a inc r0 movx a,@r0 mov b,a mov a,r3 lcall __gptrput inc dptr mov a,r4 lcall __gptrput C$CAN.c$217$3$3 ==. ; apps/test_spi_can/../CAN.c:217: for( i = 0;ilen;i++){ mov r0,#_get_Canmsg_msg_1_1 movx a,@r0 add a,#0x03 mov _get_Canmsg_sloc5_1_0,a inc r0 movx a,@r0 addc a,#0x00 mov (_get_Canmsg_sloc5_1_0 + 1),a inc r0 movx a,@r0 mov (_get_Canmsg_sloc5_1_0 + 2),a mov r2,#0x00 00103$: mov dpl,_get_Canmsg_sloc0_1_0 mov dph,(_get_Canmsg_sloc0_1_0 + 1) mov b,(_get_Canmsg_sloc0_1_0 + 2) lcall __gptrget mov r3,a mov a,r2 cjne a,ar3,00115$ 00115$: jnc 00106$ C$CAN.c$218$3$3 ==. ; apps/test_spi_can/../CAN.c:218: msg->dat[i] = rxdata[6+i]; mov a,r2 add a,_get_Canmsg_sloc5_1_0 mov r7,a clr a addc a,(_get_Canmsg_sloc5_1_0 + 1) mov r3,a mov r4,(_get_Canmsg_sloc5_1_0 + 2) mov a,#0x06 add a,r2 add a,#_rxdata mov dpl,a clr a addc a,#(_rxdata >> 8) mov dph,a movx a,@dptr mov r6,a mov dpl,r7 mov dph,r3 mov b,r4 lcall __gptrput C$CAN.c$217$2$2 ==. ; apps/test_spi_can/../CAN.c:217: for( i = 0;ilen;i++){ inc r2 sjmp 00103$ 00106$: C$CAN.c$220$2$2 ==. ; apps/test_spi_can/../CAN.c:220: nmsg += 1; mov r5,#0x01 00102$: C$CAN.c$224$1$1 ==. ; apps/test_spi_can/../CAN.c:224: return nmsg; mov dpl,r5 C$CAN.c$225$1$1 ==. XG$get_Canmsg$0$0 ==. ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'rxbuf0_full' ;------------------------------------------------------------ ;------------------------------------------------------------ G$rxbuf0_full$0$0 ==. C$CAN.c$227$1$1 ==. ; apps/test_spi_can/../CAN.c:227: uint8 rxbuf0_full() ; ----------------------------------------- ; function rxbuf0_full ; ----------------------------------------- _rxbuf0_full: C$CAN.c$229$1$1 ==. ; apps/test_spi_can/../CAN.c:229: if((read_can_reg(0x2c) & 1) == 1){ mov dpl,#0x2C lcall _read_can_reg mov a,dpl anl a,#0x01 mov r2,a cjne r2,#0x01,00102$ C$CAN.c$230$2$2 ==. ; apps/test_spi_can/../CAN.c:230: return 1; mov dpl,#0x01 C$CAN.c$232$1$1 ==. ; apps/test_spi_can/../CAN.c:232: return 0; C$CAN.c$233$1$1 ==. XG$rxbuf0_full$0$0 ==. ret 00102$: mov dpl,#0x00 ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'testfun' ;------------------------------------------------------------ ;------------------------------------------------------------ G$testfun$0$0 ==. C$CAN.c$235$1$1 ==. ; apps/test_spi_can/../CAN.c:235: uint8 testfun(){ ; ----------------------------------------- ; function testfun ; ----------------------------------------- _testfun: C$CAN.c$236$1$1 ==. ; apps/test_spi_can/../CAN.c:236: return 88; mov dpl,#0x58 C$CAN.c$237$1$1 ==. XG$testfun$0$0 ==. ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'updateLeds' ;------------------------------------------------------------ ;------------------------------------------------------------ G$updateLeds$0$0 ==. C$test_spi_can.c$56$1$1 ==. ; apps/test_spi_can/test_spi_can.c:56: void updateLeds() ; ----------------------------------------- ; function updateLeds ; ----------------------------------------- _updateLeds: C$test_spi_can.c$58$1$1 ==. ; apps/test_spi_can/test_spi_can.c:58: usbShowStatusWithGreenLed(); C$test_spi_can.c$61$1$1 ==. XG$updateLeds$0$0 ==. ljmp _usbShowStatusWithGreenLed ;------------------------------------------------------------ ;Allocation info for local variables in function 'putchar' ;------------------------------------------------------------ ;------------------------------------------------------------ G$putchar$0$0 ==. C$test_spi_can.c$65$1$1 ==. ; apps/test_spi_can/test_spi_can.c:65: void putchar(char c) ; ----------------------------------------- ; function putchar ; ----------------------------------------- _putchar: mov r2,dpl C$test_spi_can.c$67$1$1 ==. ; apps/test_spi_can/test_spi_can.c:67: report[reportLength] = c; mov a,_reportLength add a,#_report mov dpl,a mov a,(_reportLength + 1) addc a,#(_report >> 8) mov dph,a mov a,r2 movx @dptr,a C$test_spi_can.c$68$1$1 ==. ; apps/test_spi_can/test_spi_can.c:68: reportLength++; inc _reportLength clr a cjne a,_reportLength,00103$ inc (_reportLength + 1) 00103$: C$test_spi_can.c$69$1$1 ==. XG$putchar$0$0 ==. ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'sendReportIfNeeded' ;------------------------------------------------------------ ;sloc0 Allocated with name '_sendReportIfNeeded_sloc0_1_0' ;------------------------------------------------------------ G$sendReportIfNeeded$0$0 ==. C$test_spi_can.c$73$1$1 ==. ; apps/test_spi_can/test_spi_can.c:73: void sendReportIfNeeded() ; ----------------------------------------- ; function sendReportIfNeeded ; ----------------------------------------- _sendReportIfNeeded: C$test_spi_can.c$82$1$1 ==. ; apps/test_spi_can/test_spi_can.c:82: if (getMs() - lastReport >= param_report_period_ms && reportLength == 0) lcall _getMs mov r2,dpl mov r3,dph mov r4,b mov r5,a mov r0,#_sendReportIfNeeded_lastReport_1_1 setb c movx a,@r0 subb a,r2 cpl a cpl c mov _sendReportIfNeeded_sloc0_1_0,a cpl c inc r0 movx a,@r0 subb a,r3 cpl a cpl c mov (_sendReportIfNeeded_sloc0_1_0 + 1),a cpl c inc r0 movx a,@r0 subb a,r4 cpl a cpl c mov (_sendReportIfNeeded_sloc0_1_0 + 2),a cpl c inc r0 movx a,@r0 subb a,r5 cpl a mov (_sendReportIfNeeded_sloc0_1_0 + 3),a mov dptr,#_param_report_period_ms clr a movc a,@a+dptr mov r6,a mov a,#0x01 movc a,@a+dptr mov r7,a mov a,#0x02 movc a,@a+dptr mov r2,a mov a,#0x03 movc a,@a+dptr mov r3,a clr c mov a,_sendReportIfNeeded_sloc0_1_0 subb a,r6 mov a,(_sendReportIfNeeded_sloc0_1_0 + 1) subb a,r7 mov a,(_sendReportIfNeeded_sloc0_1_0 + 2) subb a,r2 mov a,(_sendReportIfNeeded_sloc0_1_0 + 3) subb a,r3 jnc 00118$ ljmp 00104$ 00118$: mov a,_reportLength orl a,(_reportLength + 1) jz 00119$ ljmp 00104$ 00119$: C$test_spi_can.c$84$2$2 ==. ; apps/test_spi_can/test_spi_can.c:84: lastReport = getMs(); lcall _getMs mov r2,dpl mov r3,dph mov r4,b mov r5,a mov r0,#_sendReportIfNeeded_lastReport_1_1 mov a,r2 movx @r0,a inc r0 mov a,r3 movx @r0,a inc r0 mov a,r4 movx @r0,a inc r0 mov a,r5 movx @r0,a C$test_spi_can.c$85$2$2 ==. ; apps/test_spi_can/test_spi_can.c:85: reportBytesSent = 0; clr a mov _reportBytesSent,a mov (_reportBytesSent + 1),a C$test_spi_can.c$88$2$2 ==. ; apps/test_spi_can/test_spi_can.c:88: if (param_bar_graph) mov dptr,#_param_bar_graph clr a movc a,@a+dptr mov r2,a mov a,#0x01 movc a,@a+dptr mov r3,a mov a,#0x02 movc a,@a+dptr mov r4,a mov a,#0x03 movc a,@a+dptr mov r5,a mov a,r2 orl a,r3 orl a,r4 orl a,r5 jnz 00120$ ljmp 00104$ 00120$: C$test_spi_can.c$90$3$3 ==. ; apps/test_spi_can/test_spi_can.c:90: printf("\x1B[0;0H"); // VT100 command for "go to 0,0" mov a,#__str_0 push acc mov a,#(__str_0 >> 8) push acc mov a,#0x80 push acc lcall _printf dec sp dec sp dec sp C$test_spi_can.c$93$3$3 ==. ; apps/test_spi_can/test_spi_can.c:93: printf("CANCTRL REG = %4d \n",read_can_reg(0x0f)); mov dpl,#0x0F lcall _read_can_reg mov r2,dpl mov r3,#0x00 push ar2 push ar3 mov a,#__str_1 push acc mov a,#(__str_1 >> 8) push acc mov a,#0x80 push acc lcall _printf mov a,sp add a,#0xfb mov sp,a C$test_spi_can.c$94$3$3 ==. ; apps/test_spi_can/test_spi_can.c:94: printf("CANSTAT REG = %4d \n",read_can_reg(0x0e)); mov dpl,#0x0E lcall _read_can_reg mov r2,dpl mov r3,#0x00 push ar2 push ar3 mov a,#__str_2 push acc mov a,#(__str_2 >> 8) push acc mov a,#0x80 push acc lcall _printf mov a,sp add a,#0xfb mov sp,a C$test_spi_can.c$95$3$3 ==. ; apps/test_spi_can/test_spi_can.c:95: printf("datalen = 0x%x ********\n",msg2.len); mov r2,(_msg2 + 0x0002) mov r3,#0x00 push ar2 push ar3 mov a,#__str_3 push acc mov a,#(__str_3 >> 8) push acc mov a,#0x80 push acc lcall _printf mov a,sp add a,#0xfb mov sp,a C$test_spi_can.c$96$3$3 ==. ; apps/test_spi_can/test_spi_can.c:96: printf("SID = 0x%x ********\n",msg2.id); push _msg2 push (_msg2 + 1) mov a,#__str_4 push acc mov a,#(__str_4 >> 8) push acc mov a,#0x80 push acc lcall _printf mov a,sp add a,#0xfb mov sp,a C$test_spi_can.c$98$3$3 ==. ; apps/test_spi_can/test_spi_can.c:98: printf("test fun is 0x %x\n ..",i ); mov a,#0x22 push acc clr a push acc mov a,#__str_5 push acc mov a,#(__str_5 >> 8) push acc mov a,#0x80 push acc lcall _printf mov a,sp add a,#0xfb mov sp,a C$test_spi_can.c$100$3$3 ==. ; apps/test_spi_can/test_spi_can.c:100: printf("test fun2 is 0x %x\n ..",i ); mov a,#0x20 push acc clr a push acc mov a,#__str_6 push acc mov a,#(__str_6 >> 8) push acc mov a,#0x80 push acc lcall _printf mov a,sp add a,#0xfb mov sp,a 00104$: C$test_spi_can.c$111$1$1 ==. ; apps/test_spi_can/test_spi_can.c:111: if (reportLength > 0) mov a,_reportLength orl a,(_reportLength + 1) jz 00111$ C$test_spi_can.c$113$2$5 ==. ; apps/test_spi_can/test_spi_can.c:113: bytesToSend = usbComTxAvailable(); lcall _usbComTxAvailable mov r2,dpl C$test_spi_can.c$114$2$5 ==. ; apps/test_spi_can/test_spi_can.c:114: if (bytesToSend > reportLength - reportBytesSent) mov a,_reportLength clr c subb a,_reportBytesSent mov r3,a mov a,(_reportLength + 1) subb a,(_reportBytesSent + 1) mov r4,a mov ar5,r2 mov r6,#0x00 clr c mov a,r3 subb a,r5 mov a,r4 subb a,r6 jnc 00107$ C$test_spi_can.c$117$3$6 ==. ; apps/test_spi_can/test_spi_can.c:117: usbComTxSend(report+reportBytesSent, reportLength - reportBytesSent); mov a,_reportBytesSent add a,#_report mov dpl,a mov a,(_reportBytesSent + 1) addc a,#(_report >> 8) mov dph,a mov r3,_reportLength mov r4,_reportBytesSent mov a,r3 clr c subb a,r4 mov r0,#_usbComTxSend_PARM_2 movx @r0,a lcall _usbComTxSend C$test_spi_can.c$118$3$6 ==. ; apps/test_spi_can/test_spi_can.c:118: reportLength = 0; clr a mov _reportLength,a mov (_reportLength + 1),a ret 00107$: C$test_spi_can.c$122$3$7 ==. ; apps/test_spi_can/test_spi_can.c:122: usbComTxSend(report+reportBytesSent, bytesToSend); mov a,_reportBytesSent add a,#_report mov dpl,a mov a,(_reportBytesSent + 1) addc a,#(_report >> 8) mov dph,a mov r0,#_usbComTxSend_PARM_2 mov a,r2 movx @r0,a push ar2 lcall _usbComTxSend pop ar2 C$test_spi_can.c$123$3$7 ==. ; apps/test_spi_can/test_spi_can.c:123: reportBytesSent += bytesToSend; mov r3,#0x00 mov a,r2 add a,_reportBytesSent mov _reportBytesSent,a mov a,r3 addc a,(_reportBytesSent + 1) mov (_reportBytesSent + 1),a 00111$: C$test_spi_can.c$127$2$1 ==. XG$sendReportIfNeeded$0$0 ==. ret ;------------------------------------------------------------ ;Allocation info for local variables in function 'main' ;------------------------------------------------------------ ;sloc0 Allocated with name '_main_sloc0_1_0' ;sloc1 Allocated with name '_main_sloc1_1_0' ;------------------------------------------------------------ G$main$0$0 ==. C$test_spi_can.c$136$2$1 ==. ; apps/test_spi_can/test_spi_can.c:136: void main() ; ----------------------------------------- ; function main ; ----------------------------------------- _main: C$test_spi_can.c$140$1$1 ==. ; apps/test_spi_can/test_spi_can.c:140: uint32 lastReport = 0; clr a mov _main_sloc0_1_0,a mov (_main_sloc0_1_0 + 1),a mov (_main_sloc0_1_0 + 2),a mov (_main_sloc0_1_0 + 3),a C$test_spi_can.c$141$1$1 ==. ; apps/test_spi_can/test_spi_can.c:141: msg2.id = 0x222; mov (_msg2 + 0),#0x22 mov (_msg2 + 1),#0x02 C$test_spi_can.c$142$1$1 ==. ; apps/test_spi_can/test_spi_can.c:142: msg2.len = 2; mov (_msg2 + 0x0002),#0x02 C$test_spi_can.c$143$1$1 ==. ; apps/test_spi_can/test_spi_can.c:143: msg1.id = 0x212; mov r0,#_main_msg1_1_1 mov a,#0x12 movx @r0,a inc r0 mov a,#0x02 movx @r0,a C$test_spi_can.c$144$1$1 ==. ; apps/test_spi_can/test_spi_can.c:144: msg1.len = 8; mov r0,#(_main_msg1_1_1 + 0x0002) mov a,#0x08 movx @r0,a C$test_spi_can.c$145$1$1 ==. ; apps/test_spi_can/test_spi_can.c:145: msg1.dat[1] = 0; mov r0,#(_main_msg1_1_1 + 0x0004) clr a movx @r0,a C$test_spi_can.c$146$1$1 ==. ; apps/test_spi_can/test_spi_can.c:146: msg1.dat[3] = 3; mov r0,#(_main_msg1_1_1 + 0x0006) mov a,#0x03 movx @r0,a C$test_spi_can.c$147$1$1 ==. ; apps/test_spi_can/test_spi_can.c:147: msg1.dat[1] = 1; mov r0,#(_main_msg1_1_1 + 0x0004) mov a,#0x01 movx @r0,a C$test_spi_can.c$148$1$1 ==. ; apps/test_spi_can/test_spi_can.c:148: msg1.dat[2] = 2; mov r0,#(_main_msg1_1_1 + 0x0005) mov a,#0x02 movx @r0,a C$test_spi_can.c$149$1$1 ==. ; apps/test_spi_can/test_spi_can.c:149: msg1.dat[4] = 4; mov r0,#(_main_msg1_1_1 + 0x0007) mov a,#0x04 movx @r0,a C$test_spi_can.c$150$1$1 ==. ; apps/test_spi_can/test_spi_can.c:150: msg1.dat[5] = 5; mov r0,#(_main_msg1_1_1 + 0x0008) mov a,#0x05 movx @r0,a C$test_spi_can.c$151$1$1 ==. ; apps/test_spi_can/test_spi_can.c:151: msg1.dat[6] = 6; mov r0,#(_main_msg1_1_1 + 0x0009) mov a,#0x06 movx @r0,a C$test_spi_can.c$152$1$1 ==. ; apps/test_spi_can/test_spi_can.c:152: msg1.dat[7] = 7; mov r0,#(_main_msg1_1_1 + 0x000a) mov a,#0x07 movx @r0,a C$test_spi_can.c$155$1$1 ==. ; apps/test_spi_can/test_spi_can.c:155: systemInit(); lcall _systemInit C$test_spi_can.c$156$1$1 ==. ; apps/test_spi_can/test_spi_can.c:156: usbInit(); lcall _usbInit C$test_spi_can.c$160$1$1 ==. ; apps/test_spi_can/test_spi_can.c:160: Can_init(2); mov dpl,#0x02 lcall _Can_init C$test_spi_can.c$161$1$1 ==. ; apps/test_spi_can/test_spi_can.c:161: Can_setconfigmode(); lcall _Can_setconfigmode C$test_spi_can.c$162$1$1 ==. ; apps/test_spi_can/test_spi_can.c:162: setmask0(0x700); mov dptr,#0x0700 lcall _setmask0 C$test_spi_can.c$163$1$1 ==. ; apps/test_spi_can/test_spi_can.c:163: setrxfil0(0x700); mov dptr,#0x0700 lcall _setrxfil0 C$test_spi_can.c$164$1$1 ==. ; apps/test_spi_can/test_spi_can.c:164: setrxfil1(0x500); mov dptr,#0x0500 lcall _setrxfil1 C$test_spi_can.c$165$1$1 ==. ; apps/test_spi_can/test_spi_can.c:165: Can_setnormalmode(); lcall _Can_setnormalmode C$test_spi_can.c$166$1$1 ==. ; apps/test_spi_can/test_spi_can.c:166: while(1) 00106$: C$test_spi_can.c$168$2$2 ==. ; apps/test_spi_can/test_spi_can.c:168: boardService(); //Checks to see if the yellow LED line (P2_2) is connected to 3V3. If they are connected, then it starts the bootloader by calling boardStartBootloader. This function is called by boardService. If you call this function regularly, then it provides a relatively easy way to get into bootloader mode if you can't do it with a USB command. Currently this function only works while the yellow LED is off. lcall _boardService C$test_spi_can.c$169$2$2 ==. ; apps/test_spi_can/test_spi_can.c:169: updateLeds(); lcall _updateLeds C$test_spi_can.c$170$2$2 ==. ; apps/test_spi_can/test_spi_can.c:170: usbComService(); lcall _usbComService C$test_spi_can.c$171$2$2 ==. ; apps/test_spi_can/test_spi_can.c:171: if((getMs() - lastReport) >= param_report_period_ms){ lcall _getMs mov r6,dpl mov r7,dph mov r2,b mov r3,a mov a,r6 clr c subb a,_main_sloc0_1_0 mov _main_sloc1_1_0,a mov a,r7 subb a,(_main_sloc0_1_0 + 1) mov (_main_sloc1_1_0 + 1),a mov a,r2 subb a,(_main_sloc0_1_0 + 2) mov (_main_sloc1_1_0 + 2),a mov a,r3 subb a,(_main_sloc0_1_0 + 3) mov (_main_sloc1_1_0 + 3),a mov dptr,#_param_report_period_ms clr a movc a,@a+dptr mov r4,a mov a,#0x01 movc a,@a+dptr mov r5,a mov a,#0x02 movc a,@a+dptr mov r2,a mov a,#0x03 movc a,@a+dptr mov r3,a clr c mov a,_main_sloc1_1_0 subb a,r4 mov a,(_main_sloc1_1_0 + 1) subb a,r5 mov a,(_main_sloc1_1_0 + 2) subb a,r2 mov a,(_main_sloc1_1_0 + 3) subb a,r3 jc 00102$ C$test_spi_can.c$172$3$3 ==. ; apps/test_spi_can/test_spi_can.c:172: lastReport = getMs(); lcall _getMs mov _main_sloc0_1_0,dpl mov (_main_sloc0_1_0 + 1),dph mov (_main_sloc0_1_0 + 2),b mov (_main_sloc0_1_0 + 3),a C$test_spi_can.c$173$3$3 ==. ; apps/test_spi_can/test_spi_can.c:173: send_Canmsg_wait(&msg1); mov dptr,#_main_msg1_1_1 mov b,#0x60 lcall _send_Canmsg_wait 00102$: C$test_spi_can.c$176$2$2 ==. ; apps/test_spi_can/test_spi_can.c:176: if(rxbuf0_full()){ // check if rxbuf0 has msg lcall _rxbuf0_full mov a,dpl jz 00104$ C$test_spi_can.c$177$3$4 ==. ; apps/test_spi_can/test_spi_can.c:177: get_Canmsg(&msg2); mov dptr,#_msg2 mov b,#0x40 lcall _get_Canmsg 00104$: C$test_spi_can.c$180$2$2 ==. ; apps/test_spi_can/test_spi_can.c:180: sendReportIfNeeded(); lcall _sendReportIfNeeded C$test_spi_can.c$183$1$1 ==. XG$main$0$0 ==. sjmp 00106$ .area CSEG (CODE) .area CONST (CODE) G$param_input_mode$0$0 == . _param_input_mode: .byte #0x00,#0x00,#0x00,#0x00 ; 0 G$param_bar_graph$0$0 == . _param_bar_graph: .byte #0x01,#0x00,#0x00,#0x00 ; 1 G$param_report_period_ms$0$0 == . _param_report_period_ms: .byte #0x28,#0x00,#0x00,#0x00 ; 40 Ftest_spi_can$_str_0$0$0 == . __str_0: .db 0x1B .ascii "[0;0H" .db 0x00 Ftest_spi_can$_str_1$0$0 == . __str_1: .ascii "CANCTRL REG = %4d " .db 0x0A .db 0x00 Ftest_spi_can$_str_2$0$0 == . __str_2: .ascii "CANSTAT REG = %4d " .db 0x0A .db 0x00 Ftest_spi_can$_str_3$0$0 == . __str_3: .ascii "datalen = 0x%x ********" .db 0x0A .db 0x00 Ftest_spi_can$_str_4$0$0 == . __str_4: .ascii "SID = 0x%x ********" .db 0x0A .db 0x00 Ftest_spi_can$_str_5$0$0 == . __str_5: .ascii "test fun is 0x %x" .db 0x0A .ascii " .." .db 0x00 Ftest_spi_can$_str_6$0$0 == . __str_6: .ascii "test fun2 is 0x %x" .db 0x0A .ascii " .." .db 0x00 .area XINIT (CODE) Ftest_spi_can$__xinit_txdata2$0$0 == . __xinit__txdata2: .db #0x40 ; 64 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x04 ; 4 .db #0x01 ; 1 .db #0x02 ; 2 .db #0x03 ; 3 .db #0x04 ; 4 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 Ftest_spi_can$__xinit_rxdata$0$0 == . __xinit__rxdata: .db #0x00 ; 0 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 .db 0x00 Ftest_spi_can$__xinit_txdata$0$0 == . __xinit__txdata: .db #0x40 ; 64 .db #0x20 ; 32 .db #0x20 ; 32 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x04 ; 4 .db #0x01 ; 1 .db #0x02 ; 2 .db #0x03 ; 3 .db #0x04 ; 4 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .db #0x00 ; 0 .area CABS (ABS,CODE)