;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.4.4 #831 (Sep 8 2004)
; This file generated Sat Sep 18 08:25:03 2004
;--------------------------------------------------------
.module rt_serial
.optsdcc -mmcs51 --model-large
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _TF1
.globl _TR1
.globl _TF0
.globl _TR0
.globl _IE1
.globl _IT1
.globl _IE0
.globl _IT0
.globl _T2CON_7
.globl _T2CON_6
.globl _T2CON_5
.globl _T2CON_4
.globl _T2CON_3
.globl _T2CON_2
.globl _T2CON_1
.globl _T2CON_0
.globl _TF2
.globl _EXF2
.globl _RCLK
.globl _TCLK
.globl _EXEN2
.globl _TR2
.globl _C_T2
.globl _CP_RL2
.globl _SM0
.globl _SM1
.globl _SM2
.globl _REN
.globl _TB8
.globl _RB8
.globl _TI
.globl _RI
.globl _CY
.globl _AC
.globl _F0
.globl _RS1
.globl _RS0
.globl _OV
.globl _F1
.globl _P
.globl _P5_7
.globl _P5_6
.globl _P5_5
.globl _P5_4
.globl _P5_3
.globl _P5_2
.globl _P5_1
.globl _P5_0
.globl _P4_7
.globl _P4_6
.globl _P4_5
.globl _P4_4
.globl _P4_3
.globl _P4_2
.globl _P4_1
.globl _P4_0
.globl _RD
.globl _WR
.globl _T1
.globl _T0
.globl _INT1
.globl _INT0
.globl _TXD0
.globl _TXD
.globl _RXD0
.globl _RXD
.globl _P3_7
.globl _P3_6
.globl _P3_5
.globl _P3_4
.globl _P3_3
.globl _P3_2
.globl _P3_1
.globl _P3_0
.globl _P2_7
.globl _P2_6
.globl _P2_5
.globl _P2_4
.globl _P2_3
.globl _P2_2
.globl _P2_1
.globl _P2_0
.globl _P1_7
.globl _P1_6
.globl _P1_5
.globl _P1_4
.globl _P1_3
.globl _P1_2
.globl _P1_1
.globl _P1_0
.globl _P0_7
.globl _P0_6
.globl _P0_5
.globl _P0_4
.globl _P0_3
.globl _P0_2
.globl _P0_1
.globl _P0_0
.globl _PPC
.globl _PT2
.globl _PS
.globl _PT1
.globl _PX1
.globl _PT0
.globl _PX0
.globl _EA
.globl _EC
.globl _ET2
.globl _ES
.globl _ET1
.globl _EX1
.globl _ET0
.globl _EX0
.globl _CF
.globl _CR
.globl _CCF4
.globl _CCF3
.globl _CCF2
.globl _CCF1
.globl _CCF0
.globl _BREG_F7
.globl _BREG_F6
.globl _BREG_F5
.globl _BREG_F4
.globl _BREG_F3
.globl _BREG_F2
.globl _BREG_F1
.globl _BREG_F0
.globl _WDTRST
.globl _WDTPRG
.globl _TMOD
.globl _TL2
.globl _TL1
.globl _TL0
.globl _TH2
.globl _TH1
.globl _TH0
.globl _TCON
.globl _T2CON
.globl _SP
.globl _SCON
.globl _SBUF0
.globl _SBUF
.globl _SADEN0
.globl _RCAP2L
.globl _RCAP2H
.globl _PSW
.globl _PCON
.globl _P5
.globl _P4
.globl _P3
.globl _P2
.globl _P1
.globl _P0
.globl _IPH
.globl _IP
.globl _IE
.globl _FCON
.globl _EETIM
.globl _EECON
.globl _DP0L
.globl _DPL
.globl _DP0H
.globl _DPH
.globl _CMOD
.globl _CL
.globl _CKCON
.globl _CH
.globl _CCON
.globl _CCAPM4
.globl _CCAPM3
.globl _CCAPM2
.globl _CCAPM1
.globl _CCAPM0
.globl _CCAP4L
.globl _CCAP3L
.globl _CCAP2L
.globl _CCAP1L
.globl _CCAP0L
.globl _CCAP4H
.globl _CCAP3H
.globl _CCAP2H
.globl _CCAP1H
.globl _CCAP0H
.globl _AUXR1
.globl _B
.globl _AUXR
.globl _ACC
.globl _SIO1_break_PARM_2
.globl _SIO2_BitCnt
.globl _SIO2_RxCount
.globl _SIO1_TxCount
.globl _SIO1_TxBusy
.globl _rt_serial_init
.globl _SIOInterrupt
.globl _T2Interrupt
.globl _putchar
.globl _getchar
.globl _SIO2_getchar
.globl _SIO1_pollchar
.globl _SIO2_pollchar
.globl _SIO1_flush
.globl _SIO2_flush
.globl _SIO1_break
.globl _SendStringCode
.globl _SendStringXdata
.globl _SendHex
.globl _SIOTakeSemaphore
.globl _SIOPutSemaphore
.globl _SIOSetSemaphore
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
.area RSEG (DATA)
G$ACC$0$0 == 0x00e0
_ACC = 0x00e0
G$AUXR$0$0 == 0x008e
_AUXR = 0x008e
G$B$0$0 == 0x00f0
_B = 0x00f0
G$AUXR1$0$0 == 0x00a2
_AUXR1 = 0x00a2
G$CCAP0H$0$0 == 0x00fa
_CCAP0H = 0x00fa
G$CCAP1H$0$0 == 0x00fb
_CCAP1H = 0x00fb
G$CCAP2H$0$0 == 0x00fc
_CCAP2H = 0x00fc
G$CCAP3H$0$0 == 0x00fd
_CCAP3H = 0x00fd
G$CCAP4H$0$0 == 0x00fe
_CCAP4H = 0x00fe
G$CCAP0L$0$0 == 0x00ea
_CCAP0L = 0x00ea
G$CCAP1L$0$0 == 0x00eb
_CCAP1L = 0x00eb
G$CCAP2L$0$0 == 0x00ec
_CCAP2L = 0x00ec
G$CCAP3L$0$0 == 0x00ed
_CCAP3L = 0x00ed
G$CCAP4L$0$0 == 0x00ee
_CCAP4L = 0x00ee
G$CCAPM0$0$0 == 0x00da
_CCAPM0 = 0x00da
G$CCAPM1$0$0 == 0x00db
_CCAPM1 = 0x00db
G$CCAPM2$0$0 == 0x00dc
_CCAPM2 = 0x00dc
G$CCAPM3$0$0 == 0x00dd
_CCAPM3 = 0x00dd
G$CCAPM4$0$0 == 0x00de
_CCAPM4 = 0x00de
G$CCON$0$0 == 0x00d8
_CCON = 0x00d8
G$CH$0$0 == 0x00f9
_CH = 0x00f9
G$CKCON$0$0 == 0x008f
_CKCON = 0x008f
G$CL$0$0 == 0x00e9
_CL = 0x00e9
G$CMOD$0$0 == 0x00d9
_CMOD = 0x00d9
G$DPH$0$0 == 0x0083
_DPH = 0x0083
G$DP0H$0$0 == 0x0083
_DP0H = 0x0083
G$DPL$0$0 == 0x0082
_DPL = 0x0082
G$DP0L$0$0 == 0x0082
_DP0L = 0x0082
G$EECON$0$0 == 0x00d2
_EECON = 0x00d2
G$EETIM$0$0 == 0x00d3
_EETIM = 0x00d3
G$FCON$0$0 == 0x00d1
_FCON = 0x00d1
G$IE$0$0 == 0x00a8
_IE = 0x00a8
G$IP$0$0 == 0x00b8
_IP = 0x00b8
G$IPH$0$0 == 0x00b7
_IPH = 0x00b7
G$P0$0$0 == 0x0080
_P0 = 0x0080
G$P1$0$0 == 0x0090
_P1 = 0x0090
G$P2$0$0 == 0x00a0
_P2 = 0x00a0
G$P3$0$0 == 0x00b0
_P3 = 0x00b0
G$P4$0$0 == 0x00c0
_P4 = 0x00c0
G$P5$0$0 == 0x00e8
_P5 = 0x00e8
G$PCON$0$0 == 0x0087
_PCON = 0x0087
G$PSW$0$0 == 0x00d0
_PSW = 0x00d0
G$RCAP2H$0$0 == 0x00cb
_RCAP2H = 0x00cb
G$RCAP2L$0$0 == 0x00ca
_RCAP2L = 0x00ca
G$SADEN0$0$0 == 0x00b9
_SADEN0 = 0x00b9
G$SBUF$0$0 == 0x0099
_SBUF = 0x0099
G$SBUF0$0$0 == 0x0099
_SBUF0 = 0x0099
G$SCON$0$0 == 0x0098
_SCON = 0x0098
G$SP$0$0 == 0x0081
_SP = 0x0081
G$T2CON$0$0 == 0x00c8
_T2CON = 0x00c8
G$TCON$0$0 == 0x0088
_TCON = 0x0088
G$TH0$0$0 == 0x008c
_TH0 = 0x008c
G$TH1$0$0 == 0x008d
_TH1 = 0x008d
G$TH2$0$0 == 0x00cd
_TH2 = 0x00cd
G$TL0$0$0 == 0x008a
_TL0 = 0x008a
G$TL1$0$0 == 0x008b
_TL1 = 0x008b
G$TL2$0$0 == 0x00cc
_TL2 = 0x00cc
G$TMOD$0$0 == 0x0089
_TMOD = 0x0089
G$WDTPRG$0$0 == 0x00a7
_WDTPRG = 0x00a7
G$WDTRST$0$0 == 0x00a6
_WDTRST = 0x00a6
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
.area RSEG (DATA)
G$BREG_F0$0$0 == 0x00f0
_BREG_F0 = 0x00f0
G$BREG_F1$0$0 == 0x00f1
_BREG_F1 = 0x00f1
G$BREG_F2$0$0 == 0x00f2
_BREG_F2 = 0x00f2
G$BREG_F3$0$0 == 0x00f3
_BREG_F3 = 0x00f3
G$BREG_F4$0$0 == 0x00f4
_BREG_F4 = 0x00f4
G$BREG_F5$0$0 == 0x00f5
_BREG_F5 = 0x00f5
G$BREG_F6$0$0 == 0x00f6
_BREG_F6 = 0x00f6
G$BREG_F7$0$0 == 0x00f7
_BREG_F7 = 0x00f7
G$CCF0$0$0 == 0x00d8
_CCF0 = 0x00d8
G$CCF1$0$0 == 0x00d9
_CCF1 = 0x00d9
G$CCF2$0$0 == 0x00da
_CCF2 = 0x00da
G$CCF3$0$0 == 0x00db
_CCF3 = 0x00db
G$CCF4$0$0 == 0x00dc
_CCF4 = 0x00dc
G$CR$0$0 == 0x00de
_CR = 0x00de
G$CF$0$0 == 0x00df
_CF = 0x00df
G$EX0$0$0 == 0x00a8
_EX0 = 0x00a8
G$ET0$0$0 == 0x00a9
_ET0 = 0x00a9
G$EX1$0$0 == 0x00aa
_EX1 = 0x00aa
G$ET1$0$0 == 0x00ab
_ET1 = 0x00ab
G$ES$0$0 == 0x00ac
_ES = 0x00ac
G$ET2$0$0 == 0x00ad
_ET2 = 0x00ad
G$EC$0$0 == 0x00ae
_EC = 0x00ae
G$EA$0$0 == 0x00af
_EA = 0x00af
G$PX0$0$0 == 0x00b8
_PX0 = 0x00b8
G$PT0$0$0 == 0x00b9
_PT0 = 0x00b9
G$PX1$0$0 == 0x00ba
_PX1 = 0x00ba
G$PT1$0$0 == 0x00bb
_PT1 = 0x00bb
G$PS$0$0 == 0x00bc
_PS = 0x00bc
G$PT2$0$0 == 0x00bd
_PT2 = 0x00bd
G$PPC$0$0 == 0x00be
_PPC = 0x00be
G$P0_0$0$0 == 0x0080
_P0_0 = 0x0080
G$P0_1$0$0 == 0x0081
_P0_1 = 0x0081
G$P0_2$0$0 == 0x0082
_P0_2 = 0x0082
G$P0_3$0$0 == 0x0083
_P0_3 = 0x0083
G$P0_4$0$0 == 0x0084
_P0_4 = 0x0084
G$P0_5$0$0 == 0x0085
_P0_5 = 0x0085
G$P0_6$0$0 == 0x0086
_P0_6 = 0x0086
G$P0_7$0$0 == 0x0087
_P0_7 = 0x0087
G$P1_0$0$0 == 0x0090
_P1_0 = 0x0090
G$P1_1$0$0 == 0x0091
_P1_1 = 0x0091
G$P1_2$0$0 == 0x0092
_P1_2 = 0x0092
G$P1_3$0$0 == 0x0093
_P1_3 = 0x0093
G$P1_4$0$0 == 0x0094
_P1_4 = 0x0094
G$P1_5$0$0 == 0x0095
_P1_5 = 0x0095
G$P1_6$0$0 == 0x0096
_P1_6 = 0x0096
G$P1_7$0$0 == 0x0097
_P1_7 = 0x0097
G$P2_0$0$0 == 0x00a0
_P2_0 = 0x00a0
G$P2_1$0$0 == 0x00a1
_P2_1 = 0x00a1
G$P2_2$0$0 == 0x00a2
_P2_2 = 0x00a2
G$P2_3$0$0 == 0x00a3
_P2_3 = 0x00a3
G$P2_4$0$0 == 0x00a4
_P2_4 = 0x00a4
G$P2_5$0$0 == 0x00a5
_P2_5 = 0x00a5
G$P2_6$0$0 == 0x00a6
_P2_6 = 0x00a6
G$P2_7$0$0 == 0x00a7
_P2_7 = 0x00a7
G$P3_0$0$0 == 0x00b0
_P3_0 = 0x00b0
G$P3_1$0$0 == 0x00b1
_P3_1 = 0x00b1
G$P3_2$0$0 == 0x00b2
_P3_2 = 0x00b2
G$P3_3$0$0 == 0x00b3
_P3_3 = 0x00b3
G$P3_4$0$0 == 0x00b4
_P3_4 = 0x00b4
G$P3_5$0$0 == 0x00b5
_P3_5 = 0x00b5
G$P3_6$0$0 == 0x00b6
_P3_6 = 0x00b6
G$P3_7$0$0 == 0x00b7
_P3_7 = 0x00b7
G$RXD$0$0 == 0x00b0
_RXD = 0x00b0
G$RXD0$0$0 == 0x00b0
_RXD0 = 0x00b0
G$TXD$0$0 == 0x00b1
_TXD = 0x00b1
G$TXD0$0$0 == 0x00b1
_TXD0 = 0x00b1
G$INT0$0$0 == 0x00b2
_INT0 = 0x00b2
G$INT1$0$0 == 0x00b3
_INT1 = 0x00b3
G$T0$0$0 == 0x00b4
_T0 = 0x00b4
G$T1$0$0 == 0x00b5
_T1 = 0x00b5
G$WR$0$0 == 0x00b6
_WR = 0x00b6
G$RD$0$0 == 0x00b7
_RD = 0x00b7
G$P4_0$0$0 == 0x00c0
_P4_0 = 0x00c0
G$P4_1$0$0 == 0x00c1
_P4_1 = 0x00c1
G$P4_2$0$0 == 0x00c2
_P4_2 = 0x00c2
G$P4_3$0$0 == 0x00c3
_P4_3 = 0x00c3
G$P4_4$0$0 == 0x00c4
_P4_4 = 0x00c4
G$P4_5$0$0 == 0x00c5
_P4_5 = 0x00c5
G$P4_6$0$0 == 0x00c6
_P4_6 = 0x00c6
G$P4_7$0$0 == 0x00c7
_P4_7 = 0x00c7
G$P5_0$0$0 == 0x00e8
_P5_0 = 0x00e8
G$P5_1$0$0 == 0x00e9
_P5_1 = 0x00e9
G$P5_2$0$0 == 0x00ea
_P5_2 = 0x00ea
G$P5_3$0$0 == 0x00eb
_P5_3 = 0x00eb
G$P5_4$0$0 == 0x00ec
_P5_4 = 0x00ec
G$P5_5$0$0 == 0x00ed
_P5_5 = 0x00ed
G$P5_6$0$0 == 0x00ee
_P5_6 = 0x00ee
G$P5_7$0$0 == 0x00ef
_P5_7 = 0x00ef
G$P$0$0 == 0x00d0
_P = 0x00d0
G$F1$0$0 == 0x00d1
_F1 = 0x00d1
G$OV$0$0 == 0x00d2
_OV = 0x00d2
G$RS0$0$0 == 0x00d3
_RS0 = 0x00d3
G$RS1$0$0 == 0x00d4
_RS1 = 0x00d4
G$F0$0$0 == 0x00d5
_F0 = 0x00d5
G$AC$0$0 == 0x00d6
_AC = 0x00d6
G$CY$0$0 == 0x00d7
_CY = 0x00d7
G$RI$0$0 == 0x0098
_RI = 0x0098
G$TI$0$0 == 0x0099
_TI = 0x0099
G$RB8$0$0 == 0x009a
_RB8 = 0x009a
G$TB8$0$0 == 0x009b
_TB8 = 0x009b
G$REN$0$0 == 0x009c
_REN = 0x009c
G$SM2$0$0 == 0x009d
_SM2 = 0x009d
G$SM1$0$0 == 0x009e
_SM1 = 0x009e
G$SM0$0$0 == 0x009f
_SM0 = 0x009f
G$CP_RL2$0$0 == 0x00c8
_CP_RL2 = 0x00c8
G$C_T2$0$0 == 0x00c9
_C_T2 = 0x00c9
G$TR2$0$0 == 0x00ca
_TR2 = 0x00ca
G$EXEN2$0$0 == 0x00cb
_EXEN2 = 0x00cb
G$TCLK$0$0 == 0x00cc
_TCLK = 0x00cc
G$RCLK$0$0 == 0x00cd
_RCLK = 0x00cd
G$EXF2$0$0 == 0x00ce
_EXF2 = 0x00ce
G$TF2$0$0 == 0x00cf
_TF2 = 0x00cf
G$T2CON_0$0$0 == 0x00c8
_T2CON_0 = 0x00c8
G$T2CON_1$0$0 == 0x00c9
_T2CON_1 = 0x00c9
G$T2CON_2$0$0 == 0x00ca
_T2CON_2 = 0x00ca
G$T2CON_3$0$0 == 0x00cb
_T2CON_3 = 0x00cb
G$T2CON_4$0$0 == 0x00cc
_T2CON_4 = 0x00cc
G$T2CON_5$0$0 == 0x00cd
_T2CON_5 = 0x00cd
G$T2CON_6$0$0 == 0x00ce
_T2CON_6 = 0x00ce
G$T2CON_7$0$0 == 0x00cf
_T2CON_7 = 0x00cf
G$IT0$0$0 == 0x0088
_IT0 = 0x0088
G$IE0$0$0 == 0x0089
_IE0 = 0x0089
G$IT1$0$0 == 0x008a
_IT1 = 0x008a
G$IE1$0$0 == 0x008b
_IE1 = 0x008b
G$TR0$0$0 == 0x008c
_TR0 = 0x008c
G$TF0$0$0 == 0x008d
_TF0 = 0x008d
G$TR1$0$0 == 0x008e
_TR1 = 0x008e
G$TF1$0$0 == 0x008f
_TF1 = 0x008f
;--------------------------------------------------------
; overlayable register banks
;--------------------------------------------------------
.area REG_BANK_0 (REL,OVR,DATA)
.ds 8
.area REG_BANK_1 (REL,OVR,DATA)
.ds 8
.area REG_BANK_2 (REL,OVR,DATA)
.ds 8
.area REG_BANK_3 (REL,OVR,DATA)
.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
.area DSEG (DATA)
;--------------------------------------------------------
; overlayable items in internal ram
;--------------------------------------------------------
.area OSEG (OVR,DATA)
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
.area ISEG (DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
.area BSEG (BIT)
G$SIO1_TxBusy$0$0==.
_SIO1_TxBusy::
.ds 1
Frt_serial$SIO_put_semaphore$0$0==.
_SIO_put_semaphore:
.ds 1
Lputchar$EA_local$1$1==.
_putchar_EA_local_1_1:
.ds 1
Lgetchar$EA_local$1$1==.
_getchar_EA_local_1_1:
.ds 1
LSIO2_getchar$EA_local$1$1==.
_SIO2_getchar_EA_local_1_1:
.ds 1
LSIO1_flush$EA_local$1$1==.
_SIO1_flush_EA_local_1_1:
.ds 1
LSIO2_flush$EA_local$1$1==.
_SIO2_flush_EA_local_1_1:
.ds 1
LSIOTakeSemaphore$EA_local$1$1==.
_SIOTakeSemaphore_EA_local_1_1:
.ds 1
LSIOSetSemaphore$EA_local$1$1==.
_SIOSetSemaphore_EA_local_1_1:
.ds 1
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
.area XSEG (XDATA)
Frt_serial$SIO1_TXFIFO$0$0==.
_SIO1_TXFIFO:
.ds 128
Frt_serial$SIO1_RXFIFO$0$0==.
_SIO1_RXFIFO:
.ds 32
Frt_serial$SIO2_RXFIFO$0$0==.
_SIO2_RXFIFO:
.ds 64
Frt_serial$SIO1_TxPtr$0$0==.
_SIO1_TxPtr:
.ds 1
G$SIO1_TxCount$0$0==.
_SIO1_TxCount::
.ds 1
Frt_serial$SIO1_RxPtr$0$0==.
_SIO1_RxPtr:
.ds 1
Frt_serial$SIO1_RxCount$0$0==.
_SIO1_RxCount:
.ds 1
Frt_serial$SIO2_RxPtr$0$0==.
_SIO2_RxPtr:
.ds 1
G$SIO2_RxCount$0$0==.
_SIO2_RxCount::
.ds 1
Frt_serial$SIO2_Byte$0$0==.
_SIO2_Byte:
.ds 1
G$SIO2_BitCnt$0$0==.
_SIO2_BitCnt::
.ds 1
LSIOInterrupt$Chr$2$2==.
_SIOInterrupt_Chr_2_2::
.ds 1
Lputchar$c$1$1==.
_putchar_c_1_1::
.ds 1
LSIO1_break$ticks$1$1==.
_SIO1_break_PARM_2::
.ds 1
LSIO1_break$level$1$1==.
_SIO1_break_level_1_1::
.ds 1
LSendStringCode$s$1$1==.
_SendStringCode_s_1_1::
.ds 2
LSendStringXdata$s$1$1==.
_SendStringXdata_s_1_1::
.ds 2
LSendHex$x$1$1==.
_SendHex_x_1_1::
.ds 1
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
.area XISEG (XDATA)
.area CSEG (CODE)
.area GSINIT0 (CODE)
.area GSINIT1 (CODE)
.area GSINIT2 (CODE)
.area GSINIT3 (CODE)
.area GSINIT4 (CODE)
.area GSINIT5 (CODE)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area GSINIT (CODE)
.area GSFINAL (CODE)
.area GSINIT (CODE)
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area HOME (CODE)
.area CSEG (CODE)
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area CSEG (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function 'rt_serial_init'
;------------------------------------------------------------
;------------------------------------------------------------
G$rt_serial_init$0$0 ==.
C$rt_serial.c$180$0$0 ==.
;rt_serial.c:180: void rt_serial_init (void)
; -----------------------------------------
; function rt_serial_init
; -----------------------------------------
_rt_serial_init:
ar2 = 0x02
ar3 = 0x03
ar4 = 0x04
ar5 = 0x05
ar6 = 0x06
ar7 = 0x07
ar0 = 0x00
ar1 = 0x01
C$rt_serial.c$183$1$1 ==.
;rt_serial.c:183: SIO1_TxPtr = 0;
; genAssign
mov dptr,#_SIO1_TxPtr
; Peephole 181 changed mov to clr
C$rt_serial.c$184$1$1 ==.
;rt_serial.c:184: SIO1_RxPtr = 0;
; genAssign
; Peephole 181 changed mov to clr
; Peephole 219 removed redundant clear
C$rt_serial.c$185$1$1 ==.
;rt_serial.c:185: SIO1_TxCount = 0;
; genAssign
; Peephole 181 changed mov to clr
C$rt_serial.c$186$1$1 ==.
;rt_serial.c:186: SIO1_RxCount = 0;
; genAssign
; Peephole 181 changed mov to clr
; Peephole 219 removed redundant clear
; Peephole 219.a removed redundant clear
clr a
movx @dptr,a
mov dptr,#_SIO1_RxPtr
movx @dptr,a
mov dptr,#_SIO1_TxCount
movx @dptr,a
mov dptr,#_SIO1_RxCount
movx @dptr,a
C$rt_serial.c$187$1$1 ==.
;rt_serial.c:187: SIO1_TxBusy = FALSE;
; genAssign
clr _SIO1_TxBusy
C$rt_serial.c$188$1$1 ==.
;rt_serial.c:188: SIO1_TxPtr = 0;
; genAssign
mov dptr,#_SIO1_TxPtr
; Peephole 181 changed mov to clr
C$rt_serial.c$190$1$1 ==.
;rt_serial.c:190: SIO2_RxPtr = 0;
; genAssign
; Peephole 181 changed mov to clr
; Peephole 219 removed redundant clear
C$rt_serial.c$191$1$1 ==.
;rt_serial.c:191: SIO2_RxCount = 0;
; genAssign
; Peephole 181 changed mov to clr
; Peephole 219.a removed redundant clear
clr a
movx @dptr,a
mov dptr,#_SIO2_RxPtr
movx @dptr,a
mov dptr,#_SIO2_RxCount
movx @dptr,a
C$rt_serial.c$204$1$1 ==.
;rt_serial.c:204: SIO1_CTS = FALSE; /* assert CTS */
; genAssign
clr _P1_5
C$rt_serial.c$207$1$1 ==.
;rt_serial.c:207: SIO_put_semaphore = TRUE;
; genAssign
setb _SIO_put_semaphore
C$rt_serial.c$209$1$1 ==.
;rt_serial.c:209: TR1 = FALSE;
; genAssign
clr _TR1
C$rt_serial.c$210$1$1 ==.
;rt_serial.c:210: SCON= 0x50; /* select mode 1 (8bit variable baudrate) */
; genAssign
mov _SCON,#0x50
C$rt_serial.c$212$1$1 ==.
;rt_serial.c:212: TH1 = SIO1_BAUDCODE; /* set timer 1 for SIO1 baud */
; genAssign
mov _TH1,#0xFD
C$rt_serial.c$213$1$1 ==.
;rt_serial.c:213: TL1 = SIO1_BAUDCODE; /* set timer 1*/
; genAssign
mov _TL1,#0xFD
C$rt_serial.c$214$1$1 ==.
;rt_serial.c:214: TR1 = TRUE; /* set timer 1 running */
; genAssign
setb _TR1
C$rt_serial.c$219$1$1 ==.
;rt_serial.c:219: T2CON = 0; /* 16 bit auto reload */
; genAssign
mov _T2CON,#0x00
C$rt_serial.c$221$1$1 ==.
;rt_serial.c:221: EXEN2 = TRUE; /* allow for falling edge IRQ */
; genAssign
setb _EXEN2
C$rt_serial.c$223$1$1 ==.
;rt_serial.c:223: ET2 = TRUE; /*TURNED OFF to allow further debug allow for T2 interrupt */
; genAssign
setb _ET2
C$rt_serial.c$225$1$1 ==.
;rt_serial.c:225: TR2 = TRUE; /* only edges now */
; genAssign
setb _TR2
C$rt_serial.c$228$1$1 ==.
;rt_serial.c:228: PT2 = TRUE; /* up priority */
; genAssign
setb _PT2
C$rt_serial.c$229$1$1 ==.
;rt_serial.c:229: IPH |=PT2H;
; genOr
orl _IPH,#0x20
C$rt_serial.c$233$1$1 ==.
;rt_serial.c:233: RCAP2H = SIO2_BAUDCODE_START / 256; /* setup for 4800 baud */
; genAssign
mov _RCAP2H,#0xFF
C$rt_serial.c$234$1$1 ==.
;rt_serial.c:234: RCAP2L = SIO2_BAUDCODE_START & 255; /* start bit */
; genAssign
mov _RCAP2L,#0xA0
C$rt_serial.c$237$1$1 ==.
;rt_serial.c:237: REN = TRUE; // Receive characters.
; genAssign
setb _REN
C$rt_serial.c$239$1$1 ==.
;rt_serial.c:239: ES = TRUE;
; genAssign
setb _ES
C$rt_serial.c$242$1$1 ==.
;rt_serial.c:242: SIO1_RTS = FALSE; /* enable output by forcing ready status*/
; genAssign
clr _P1_4
00101$:
C$rt_serial.c$245$1$1 ==.
XG$rt_serial_init$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIOInterrupt'
;------------------------------------------------------------
;Chr Allocated with name '_SIOInterrupt_Chr_2_2'
;TempPtr Allocated with name '_SIOInterrupt_TempPtr_4_5'
;c Allocated with name '_SIOInterrupt_c_4_9'
;------------------------------------------------------------
G$SIOInterrupt$0$0 ==.
C$rt_serial.c$253$1$1 ==.
;rt_serial.c:253: void SIOInterrupt(void) interrupt SIO_INTVEC using SIO_INTERRUPT_BANK
; -----------------------------------------
; function SIOInterrupt
; -----------------------------------------
_SIOInterrupt:
ar2 = 0x0a
ar3 = 0x0b
ar4 = 0x0c
ar5 = 0x0d
ar6 = 0x0e
ar7 = 0x0f
ar0 = 0x08
ar1 = 0x09
push acc
push dpl
push dph
push psw
mov psw,#0x08
C$rt_serial.c$260$1$1 ==.
;rt_serial.c:260: if(RI) /* receive handler */
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
C$rt_serial.c$265$2$2 ==.
;rt_serial.c:265: RI = 0;
; genAssign
; Peephole 250.a using atomic test and clear
jbc _RI,00124$
sjmp 00108$
00124$:
C$rt_serial.c$266$2$2 ==.
;rt_serial.c:266: Chr = SBUF;
; genAssign
mov dptr,#_SIOInterrupt_Chr_2_2
mov a,_SBUF
movx @dptr,a
C$rt_serial.c$296$3$3 ==.
;rt_serial.c:296: if (SIO1_RxCount >= SIO1_RX_FIFOFULL-1)
; genAssign
mov dptr,#_SIO1_RxCount
movx a,@dptr
mov r2,a
; genCmpLt
; genCmp
cjne r2,#0x1F,00125$
00125$:
; genIfxJump
; Peephole 112.b changed ljmp to sjmp
; Peephole 160 removed sjmp by inverse jump logic
jc 00102$
00126$:
C$rt_serial.c$298$4$4 ==.
;rt_serial.c:298: SIO1_CTS = TRUE;
; genAssign
setb _P1_5
00102$:
C$rt_serial.c$302$3$3 ==.
;rt_serial.c:302: if(SIO1_RxCount != SIO1_RX_FIFOFULL) /* is there room left in the Rx FIFO ? */
; genAssign
mov dptr,#_SIO1_RxCount
movx a,@dptr
mov r2,a
; genCmpEq
cjne r2,#0x20,00127$
; Peephole 112.b changed ljmp to sjmp
sjmp 00104$
00127$:
C$rt_serial.c$304$4$5 ==.
;rt_serial.c:304: Byte TempPtr = (SIO1_RxPtr+SIO1_RxCount) & SIO1_RX_FIFOMASK;
; genAssign
mov dptr,#_SIO1_RxCount
movx a,@dptr
mov r2,a
; genAssign
mov dptr,#_SIO1_RxPtr
movx a,@dptr
mov r3,a
; genPlus
; Peephole 236.g used r2 instead of ar2
mov a,r2
; Peephole 236.a used r3 instead of ar3
add a,r3
; genAnd
anl a,#0x1F
C$rt_serial.c$305$4$5 ==.
;rt_serial.c:305: SIO1_RXFIFO[TempPtr] = Chr;
; genPlus
; Peephole 177.b removed redundant mov
; Peephole 215 removed some moves
add a,#_SIO1_RXFIFO
mov r2,a
; Peephole 181 changed mov to clr
clr a
addc a,#(_SIO1_RXFIFO >> 8)
mov r3,a
; genAssign
mov dptr,#_SIOInterrupt_Chr_2_2
movx a,@dptr
; genPointerSet
; genFarPointerSet
; Peephole 136 removed redundant moves
mov r4,a
mov dpl,r2
mov dph,r3
movx @dptr,a
C$rt_serial.c$306$4$5 ==.
;rt_serial.c:306: SIO1_RxCount++;
; genPlus
mov dptr,#_SIO1_RxCount
movx a,@dptr
add a,#0x01
movx @dptr,a
00104$:
C$rt_serial.c$310$2$2 ==.
;rt_serial.c:310: INT_SIGNAL(SIO1_TASK,SERIAL_SIG);
; genPointerGet
; genNearPointerGet
mov r0,#(_task_signals + 0x0002)
mov ar2,@r0
; genOr
mov a,#0x40
orl a,r2
; genPointerSet
; genNearPointerSet
mov r0,#(_task_signals + 0x0002)
mov @r0,acc
; genPointerGet
; genNearPointerGet
mov r0,#(_task_signals + 0x0002)
mov ar2,@r0
; genPointerGet
; genNearPointerGet
mov r0,#(_task_masks + 0x0002)
mov ar3,@r0
; genAnd
mov a,r3
anl a,r2
; genIfx
; genIfxJump
; Peephole 110 removed ljmp by inverse jump logic
jz 00108$
00128$:
; genOr
orl _ready,#0x04
00108$:
C$rt_serial.c$314$1$1 ==.
;rt_serial.c:314: if(TI) /* handle transmit interrupt */
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
C$rt_serial.c$316$2$7 ==.
;rt_serial.c:316: TI = 0;
; genAssign
; Peephole 250.a using atomic test and clear
jbc _TI,00129$
sjmp 00115$
00129$:
C$rt_serial.c$332$3$8 ==.
;rt_serial.c:332: if(!SIO1_RTS && SIO1_TxCount)
; genIfx
; genIfxJump
; Peephole 112.a removed ljmp by inverse jump logic
jb _P1_4,00110$
00130$:
; genAssign
mov dptr,#_SIO1_TxCount
movx a,@dptr
; genIfx
; Peephole 105 removed redundant mov
mov r2,a
; genIfxJump
; Peephole 110 removed ljmp by inverse jump logic
jz 00110$
00131$:
C$rt_serial.c$340$4$9 ==.
;rt_serial.c:340: SIO1_TxCount--;
; genMinus
mov dptr,#_SIO1_TxCount
; genMinusDec
movx a,@dptr
dec a
; genAssign
mov dptr,#_SIO1_TxCount
movx @dptr,a
C$rt_serial.c$341$4$9 ==.
;rt_serial.c:341: c = SIO1_TXFIFO[SIO1_TxPtr++]; /* send next char if there is one, and */
; genAssign
mov dptr,#_SIO1_TxPtr
movx a,@dptr
mov r2,a
; genPlus
mov dptr,#_SIO1_TxPtr
movx a,@dptr
add a,#0x01
movx @dptr,a
; genPlus
; Peephole 236.g used r2 instead of ar2
mov a,r2
add a,#_SIO1_TXFIFO
mov dpl,a
; Peephole 181 changed mov to clr
clr a
addc a,#(_SIO1_TXFIFO >> 8)
mov dph,a
; genPointerGet
; genFarPointerGet
movx a,@dptr
mov r2,a
C$rt_serial.c$342$4$9 ==.
;rt_serial.c:342: SIO1_TxPtr &= SIO1_TX_FIFOMASK;
; genAssign
; genAnd
; Peephole 248.b optimized and to xdata
mov dptr,#_SIO1_TxPtr
movx a,@dptr
mov r3,a
anl a,#0x7F
movx @dptr,a
C$rt_serial.c$343$4$9 ==.
;rt_serial.c:343: SIO1_TxBusy = TRUE; /* flow has not been stopped */
; genAssign
setb _SIO1_TxBusy
C$rt_serial.c$344$4$9 ==.
;rt_serial.c:344: SBUF = c;
; genAssign
mov _SBUF,r2
; Peephole 112.b changed ljmp to sjmp
sjmp 00115$
00110$:
C$rt_serial.c$348$4$10 ==.
;rt_serial.c:348: SIO1_TxBusy = FALSE;
; genAssign
clr _SIO1_TxBusy
00115$:
pop psw
pop dph
pop dpl
pop acc
C$rt_serial.c$355$3$1 ==.
XG$SIOInterrupt$0$0 ==.
reti
; eliminated unneeded push/pop b
;------------------------------------------------------------
;Allocation info for local variables in function 'T2Interrupt'
;------------------------------------------------------------
;TempPtr Allocated with name '_T2Interrupt_TempPtr_6_10'
;------------------------------------------------------------
G$T2Interrupt$0$0 ==.
C$rt_serial.c$362$3$1 ==.
;rt_serial.c:362: void T2Interrupt(void) interrupt T2_INTVEC using T2_INTERRUPT_BANK
; -----------------------------------------
; function T2Interrupt
; -----------------------------------------
_T2Interrupt:
ar2 = 0x1a
ar3 = 0x1b
ar4 = 0x1c
ar5 = 0x1d
ar6 = 0x1e
ar7 = 0x1f
ar0 = 0x18
ar1 = 0x19
push acc
push dpl
push dph
push psw
mov psw,#0x18
C$rt_serial.c$366$1$1 ==.
;rt_serial.c:366: if (EXF2)
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
C$rt_serial.c$369$2$2 ==.
;rt_serial.c:369: EXF2 = FALSE;
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EXF2,00133$
sjmp 00102$
00133$:
C$rt_serial.c$370$2$2 ==.
;rt_serial.c:370: TF2 = FALSE;
; genAssign
clr _TF2
C$rt_serial.c$372$2$2 ==.
;rt_serial.c:372: EXEN2 = FALSE; /* turn off the ext2 IRQ */
; genAssign
clr _EXEN2
C$rt_serial.c$376$2$2 ==.
;rt_serial.c:376: RCAP2H = SIO2_BAUDCODE_BIT / 256;
; genAssign
mov _RCAP2H,#0xFF
C$rt_serial.c$377$2$2 ==.
;rt_serial.c:377: RCAP2L = SIO2_BAUDCODE_BIT & 255; /* set timer 2 for 4800 baud */
; genAssign
mov _RCAP2L,#0x40
C$rt_serial.c$379$2$2 ==.
;rt_serial.c:379: SIO2_BitCnt = 0; /* count up incl start bit to 8 */
; genAssign
mov dptr,#_SIO2_BitCnt
; Peephole 181 changed mov to clr
clr a
movx @dptr,a
00102$:
C$rt_serial.c$387$1$1 ==.
;rt_serial.c:387: if (TF2)
; genIfx
; genIfxJump
C$rt_serial.c$390$2$3 ==.
;rt_serial.c:390: TF2 = FALSE;
; genAssign
; Peephole 250.b using atomic test and clear
jbc _TF2,00134$
ljmp 00122$
00134$:
C$rt_serial.c$440$2$3 ==.
;rt_serial.c:440: if(!EXEN2)
; genIfx
; genIfxJump
jnb _EXEN2,00135$
ljmp 00122$
00135$:
C$rt_serial.c$443$3$4 ==.
;rt_serial.c:443: if(SIO2_BitCnt == 0)
; genAssign
mov dptr,#_SIO2_BitCnt
movx a,@dptr
mov r2,a
; genCmpEq
; Peephole 112.b changed ljmp to sjmp
; Peephole 199 optimized misc jump sequence
cjne r2,#0x00,00116$
;00136$:
; Peephole 200 removed redundant sjmp
00137$:
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
jnb _P1_1,00104$
00138$:
C$rt_serial.c$448$5$6 ==.
;rt_serial.c:448: RCAP2H = SIO2_BAUDCODE_START / 256; /* setup for 4800 baud */
; genAssign
mov _RCAP2H,#0xFF
C$rt_serial.c$449$5$6 ==.
;rt_serial.c:449: RCAP2L = SIO2_BAUDCODE_START & 255; /* start bit */
; genAssign
mov _RCAP2L,#0xA0
C$rt_serial.c$450$5$6 ==.
;rt_serial.c:450: EXF2 = FALSE;
; genAssign
clr _EXF2
C$rt_serial.c$451$5$6 ==.
;rt_serial.c:451: EXEN2 = TRUE;
; genAssign
setb _EXEN2
C$rt_serial.c$452$5$6 ==.
;rt_serial.c:452: TR2 = TRUE; /* Keep running counter */
; genAssign
setb _TR2
ljmp 00122$
00104$:
C$rt_serial.c$459$5$7 ==.
;rt_serial.c:459: SIO2_BitCnt++;
; genPlus
mov dptr,#_SIO2_BitCnt
movx a,@dptr
add a,#0x01
movx @dptr,a
ljmp 00122$
00116$:
C$rt_serial.c$464$4$8 ==.
;rt_serial.c:464: SIO2_Byte = (SIO2_Byte >> 1) | (SIO2_RXD << 7);
; genAssign
mov dptr,#_SIO2_Byte
movx a,@dptr
; genRightShift
; genRightShiftLiteral
; genrshOne
; Peephole 105 removed redundant mov
mov r2,a
clr c
rrc a
mov r2,a
; genAssign
clr a
mov c,_P1_1
rlc a
; genLeftShift
; genLeftShiftLiteral
; genlshOne
; Peephole 105 removed redundant mov
mov r3,a
rr a
anl a,#0x80
; genOr
; Peephole 177.d removed redundant move
mov r3,a
mov dptr,#_SIO2_Byte
orl a,r2
movx @dptr,a
C$rt_serial.c$466$4$8 ==.
;rt_serial.c:466: if (SIO2_BitCnt==8 )
; genAssign
mov dptr,#_SIO2_BitCnt
movx a,@dptr
mov r2,a
; genCmpEq
; Peephole 112.b changed ljmp to sjmp
; Peephole 199 optimized misc jump sequence
cjne r2,#0x08,00111$
;00139$:
; Peephole 200 removed redundant sjmp
00140$:
C$rt_serial.c$468$5$9 ==.
;rt_serial.c:468: if(SIO2_RxCount != SIO2_RX_FIFOFULL) /* is there room left in the Rx FIFO ? */
; genAssign
mov dptr,#_SIO2_RxCount
movx a,@dptr
mov r2,a
; genCmpEq
cjne r2,#0x40,00141$
; Peephole 112.b changed ljmp to sjmp
sjmp 00107$
00141$:
C$rt_serial.c$470$6$10 ==.
;rt_serial.c:470: Byte TempPtr = (SIO2_RxPtr+SIO2_RxCount) & SIO2_RX_FIFOMASK;
; genAssign
mov dptr,#_SIO2_RxCount
movx a,@dptr
mov r2,a
; genAssign
mov dptr,#_SIO2_RxPtr
movx a,@dptr
mov r3,a
; genPlus
; Peephole 236.g used r2 instead of ar2
mov a,r2
; Peephole 236.a used r3 instead of ar3
add a,r3
; genAnd
anl a,#0x3F
C$rt_serial.c$471$6$10 ==.
;rt_serial.c:471: SIO2_RXFIFO[TempPtr] = SIO2_Byte;
; genPlus
; Peephole 177.b removed redundant mov
; Peephole 215 removed some moves
add a,#_SIO2_RXFIFO
mov r2,a
; Peephole 181 changed mov to clr
clr a
addc a,#(_SIO2_RXFIFO >> 8)
mov r3,a
; genAssign
mov dptr,#_SIO2_Byte
movx a,@dptr
; genPointerSet
; genFarPointerSet
; Peephole 136 removed redundant moves
mov r4,a
mov dpl,r2
mov dph,r3
movx @dptr,a
C$rt_serial.c$472$6$10 ==.
;rt_serial.c:472: SIO2_RxCount++;
; genPlus
mov dptr,#_SIO2_RxCount
movx a,@dptr
add a,#0x01
movx @dptr,a
00107$:
C$rt_serial.c$475$5$9 ==.
;rt_serial.c:475: INT_SIGNAL(SIO2_TASK,SERIAL_SIG);
; genPointerGet
; genNearPointerGet
mov r0,#(_task_signals + 0x0001)
mov ar2,@r0
; genOr
mov a,#0x40
orl a,r2
; genPointerSet
; genNearPointerSet
mov r0,#(_task_signals + 0x0001)
mov @r0,acc
; genPointerGet
; genNearPointerGet
mov r0,#(_task_signals + 0x0001)
mov ar2,@r0
; genPointerGet
; genNearPointerGet
mov r0,#(_task_masks + 0x0001)
mov ar3,@r0
; genAnd
mov a,r3
anl a,r2
; genIfx
; genIfxJump
; Peephole 110 removed ljmp by inverse jump logic
jz 00111$
00142$:
; genOr
orl _ready,#0x02
00111$:
C$rt_serial.c$479$4$8 ==.
;rt_serial.c:479: if(SIO2_BitCnt <8 )
; genAssign
mov dptr,#_SIO2_BitCnt
movx a,@dptr
mov r2,a
; genCmpLt
; genCmp
cjne r2,#0x08,00143$
00143$:
; genIfxJump
; Peephole 108 removed ljmp by inverse jump logic
jnc 00113$
00144$:
C$rt_serial.c$481$5$12 ==.
;rt_serial.c:481: SIO2_BitCnt++;
; genPlus
mov dptr,#_SIO2_BitCnt
movx a,@dptr
add a,#0x01
movx @dptr,a
; Peephole 112.b changed ljmp to sjmp
sjmp 00122$
00113$:
C$rt_serial.c$497$6$14 ==.
;rt_serial.c:497: RCAP2H = SIO2_BAUDCODE_START / 256; /* setup for 4800 baud */
; genAssign
mov _RCAP2H,#0xFF
C$rt_serial.c$498$6$14 ==.
;rt_serial.c:498: RCAP2L = SIO2_BAUDCODE_START & 255; /* start bit */
; genAssign
mov _RCAP2L,#0xA0
C$rt_serial.c$499$6$14 ==.
;rt_serial.c:499: EXF2 = FALSE;
; genAssign
clr _EXF2
C$rt_serial.c$500$6$14 ==.
;rt_serial.c:500: EXEN2 = TRUE;
; genAssign
setb _EXEN2
C$rt_serial.c$501$6$14 ==.
;rt_serial.c:501: TR2 = TRUE; /* Keep running counter */
; genAssign
setb _TR2
00122$:
pop psw
pop dph
pop dpl
pop acc
C$rt_serial.c$507$1$1 ==.
XG$T2Interrupt$0$0 ==.
reti
; eliminated unneeded push/pop b
;------------------------------------------------------------
;Allocation info for local variables in function 'putchar'
;------------------------------------------------------------
;c Allocated with name '_putchar_c_1_1'
;------------------------------------------------------------
G$putchar$0$0 ==.
C$rt_serial.c$525$1$1 ==.
;rt_serial.c:525: void putchar(char c)
; -----------------------------------------
; function putchar
; -----------------------------------------
_putchar:
ar2 = 0x02
ar3 = 0x03
ar4 = 0x04
ar5 = 0x05
ar6 = 0x06
ar7 = 0x07
ar0 = 0x00
ar1 = 0x01
; genReceive
mov a,dpl
mov dptr,#_putchar_c_1_1
movx @dptr,a
C$rt_serial.c$528$2$2 ==.
;rt_serial.c:528: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00119$
sjmp 00102$
00119$:
; genAssign
setb _putchar_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00107$
00102$:
; genAssign
clr _putchar_EA_local_1_1
C$rt_serial.c$530$1$1 ==.
;rt_serial.c:530: while(SIO1_TxCount == SIO1_TX_FIFOFULL)
00107$:
; genAssign
mov dptr,#_SIO1_TxCount
movx a,@dptr
mov r2,a
; genCmpEq
; Peephole 112.b changed ljmp to sjmp
; Peephole 199 optimized misc jump sequence
cjne r2,#0x80,00109$
;00120$:
; Peephole 200 removed redundant sjmp
00121$:
C$rt_serial.c$533$3$6 ==.
;rt_serial.c:533: END_CRITICAL;
; genAssign
mov c,_putchar_EA_local_1_1
mov _EA,c
C$rt_serial.c$534$2$5 ==.
;rt_serial.c:534: RESCHEDULE;
; genCall
lcall _reschedule
C$rt_serial.c$536$3$7 ==.
;rt_serial.c:536: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00122$
sjmp 00105$
00122$:
; genAssign
setb _putchar_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00107$
00105$:
; genAssign
clr _putchar_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00107$
00109$:
C$rt_serial.c$540$1$1 ==.
;rt_serial.c:540: SIO1_TXFIFO[(SIO1_TxPtr+SIO1_TxCount) & SIO1_TX_FIFOMASK] = c; /* place character into buffer */
; genAssign
mov dptr,#_SIO1_TxCount
movx a,@dptr
mov r2,a
; genAssign
mov dptr,#_SIO1_TxPtr
movx a,@dptr
; genPlus
; Peephole 236.g used r2 instead of ar2
; Peephole 236.a used r3 instead of ar3
; Peephole 214 reduced some extra moves
mov r3,a
add a,r2
; genAnd
anl a,#0x7F
; genPlus
add a,#_SIO1_TXFIFO
mov r2,a
; Peephole 240 use clr instead of addc a,#0
clr a
addc a,#(_SIO1_TXFIFO >> 8)
mov r3,a
; genAssign
mov dptr,#_putchar_c_1_1
movx a,@dptr
; genPointerSet
; genFarPointerSet
; Peephole 136 removed redundant moves
mov r4,a
mov dpl,r2
mov dph,r3
movx @dptr,a
C$rt_serial.c$541$1$1 ==.
;rt_serial.c:541: SIO1_TxCount++;
; genPlus
mov dptr,#_SIO1_TxCount
movx a,@dptr
add a,#0x01
movx @dptr,a
C$rt_serial.c$542$2$10 ==.
;rt_serial.c:542: END_CRITICAL;
; genAssign
mov c,_putchar_EA_local_1_1
mov _EA,c
C$rt_serial.c$544$1$1 ==.
;rt_serial.c:544: if (!SIO1_TxBusy)
; genIfx
; genIfxJump
; Peephole 112.a removed ljmp by inverse jump logic
jb _SIO1_TxBusy,00112$
00123$:
C$rt_serial.c$546$2$11 ==.
;rt_serial.c:546: TI=1;
; genAssign
setb _TI
00112$:
C$rt_serial.c$569$2$1 ==.
XG$putchar$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'getchar'
;------------------------------------------------------------
;Chr Allocated with name '_getchar_Chr_1_1'
;------------------------------------------------------------
G$getchar$0$0 ==.
C$rt_serial.c$620$2$1 ==.
;rt_serial.c:620: char getchar(void)
; -----------------------------------------
; function getchar
; -----------------------------------------
_getchar:
C$rt_serial.c$624$1$1 ==.
;rt_serial.c:624: while (!SIO1_RxCount)
00101$:
; genAssign
mov dptr,#_SIO1_RxCount
movx a,@dptr
; genIfx
; Peephole 105 removed redundant mov
mov r2,a
; genIfxJump
; Peephole 109 removed ljmp by inverse jump logic
jnz 00103$
00115$:
C$rt_serial.c$626$2$2 ==.
;rt_serial.c:626: RESCHEDULE;
; genCall
lcall _reschedule
; Peephole 112.b changed ljmp to sjmp
sjmp 00101$
00103$:
C$rt_serial.c$629$2$3 ==.
;rt_serial.c:629: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00116$
sjmp 00105$
00116$:
; genAssign
setb _getchar_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00106$
00105$:
; genAssign
clr _getchar_EA_local_1_1
00106$:
C$rt_serial.c$631$1$1 ==.
;rt_serial.c:631: Chr = SIO1_RXFIFO[SIO1_RxPtr]; /* get next char out of RxFIFO */
; genAssign
mov dptr,#_SIO1_RxPtr
movx a,@dptr
; genPlus
; Peephole 177.b removed redundant mov
mov r2,a
add a,#_SIO1_RXFIFO
mov dpl,a
; Peephole 181 changed mov to clr
clr a
addc a,#(_SIO1_RXFIFO >> 8)
mov dph,a
; genPointerGet
; genFarPointerGet
movx a,@dptr
mov r2,a
C$rt_serial.c$632$1$1 ==.
;rt_serial.c:632: SIO1_RxPtr++;
; genPlus
mov dptr,#_SIO1_RxPtr
movx a,@dptr
add a,#0x01
movx @dptr,a
C$rt_serial.c$633$1$1 ==.
;rt_serial.c:633: SIO1_RxPtr &= SIO1_RX_FIFOMASK;
; genAssign
; genAnd
; Peephole 248.b optimized and to xdata
mov dptr,#_SIO1_RxPtr
movx a,@dptr
mov r3,a
anl a,#0x1F
movx @dptr,a
C$rt_serial.c$634$1$1 ==.
;rt_serial.c:634: SIO1_RxCount--;
; genMinus
mov dptr,#_SIO1_RxCount
; genMinusDec
movx a,@dptr
dec a
; genAssign
mov dptr,#_SIO1_RxCount
movx @dptr,a
C$rt_serial.c$635$1$1 ==.
;rt_serial.c:635: SIO1_RxCount &= SIO1_RX_FIFOMASK;
; genAssign
; genAnd
; Peephole 248.b optimized and to xdata
mov dptr,#_SIO1_RxCount
movx a,@dptr
mov r3,a
anl a,#0x1F
movx @dptr,a
C$rt_serial.c$647$1$1 ==.
;rt_serial.c:647: if(SIO1_RxCount <= (Byte) SIO1_RX_FIFO_LWM) /* when space in FIFO restart */
; genAssign
mov dptr,#_SIO1_RxCount
movx a,@dptr
mov r3,a
; genCmpGt
; genCmp
clr c
mov a,#0x08
subb a,r3
; genIfxJump
; Peephole 112.b changed ljmp to sjmp
; Peephole 160 removed sjmp by inverse jump logic
jc 00108$
00117$:
C$rt_serial.c$649$2$6 ==.
;rt_serial.c:649: SIO1_CTS = FALSE;
; genAssign
clr _P1_5
00108$:
C$rt_serial.c$653$2$7 ==.
;rt_serial.c:653: END_CRITICAL;
; genAssign
mov c,_getchar_EA_local_1_1
mov _EA,c
C$rt_serial.c$655$1$1 ==.
;rt_serial.c:655: return Chr;
; genRet
mov dpl,r2
00109$:
C$rt_serial.c$656$1$1 ==.
XG$getchar$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIO2_getchar'
;------------------------------------------------------------
;Chr Allocated with name '_SIO2_getchar_Chr_1_1'
;------------------------------------------------------------
G$SIO2_getchar$0$0 ==.
C$rt_serial.c$662$1$1 ==.
;rt_serial.c:662: char SIO2_getchar(void)
; -----------------------------------------
; function SIO2_getchar
; -----------------------------------------
_SIO2_getchar:
C$rt_serial.c$667$1$1 ==.
;rt_serial.c:667: while (!SIO2_RxCount)
00101$:
; genAssign
mov dptr,#_SIO2_RxCount
movx a,@dptr
; genIfx
; Peephole 105 removed redundant mov
mov r2,a
; genIfxJump
; Peephole 109 removed ljmp by inverse jump logic
jnz 00103$
00112$:
C$rt_serial.c$669$2$2 ==.
;rt_serial.c:669: RESCHEDULE;
; genCall
lcall _reschedule
; Peephole 112.b changed ljmp to sjmp
sjmp 00101$
00103$:
C$rt_serial.c$672$2$3 ==.
;rt_serial.c:672: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00113$
sjmp 00105$
00113$:
; genAssign
setb _SIO2_getchar_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00106$
00105$:
; genAssign
clr _SIO2_getchar_EA_local_1_1
00106$:
C$rt_serial.c$674$1$1 ==.
;rt_serial.c:674: Chr = SIO2_RXFIFO[SIO2_RxPtr]; /* get next char out of RxFIFO */
; genAssign
mov dptr,#_SIO2_RxPtr
movx a,@dptr
; genPlus
; Peephole 177.b removed redundant mov
mov r2,a
add a,#_SIO2_RXFIFO
mov dpl,a
; Peephole 181 changed mov to clr
clr a
addc a,#(_SIO2_RXFIFO >> 8)
mov dph,a
; genPointerGet
; genFarPointerGet
movx a,@dptr
mov r2,a
C$rt_serial.c$675$1$1 ==.
;rt_serial.c:675: SIO2_RxPtr++;
; genPlus
mov dptr,#_SIO2_RxPtr
movx a,@dptr
add a,#0x01
movx @dptr,a
C$rt_serial.c$676$1$1 ==.
;rt_serial.c:676: SIO2_RxPtr &= SIO2_RX_FIFOMASK;
; genAssign
; genAnd
; Peephole 248.b optimized and to xdata
mov dptr,#_SIO2_RxPtr
movx a,@dptr
mov r3,a
anl a,#0x3F
movx @dptr,a
C$rt_serial.c$677$1$1 ==.
;rt_serial.c:677: SIO2_RxCount--;
; genMinus
mov dptr,#_SIO2_RxCount
; genMinusDec
movx a,@dptr
dec a
; genAssign
mov dptr,#_SIO2_RxCount
movx @dptr,a
C$rt_serial.c$678$1$1 ==.
;rt_serial.c:678: SIO2_RxCount &= SIO2_RX_FIFOMASK;
; genAssign
; genAnd
; Peephole 248.b optimized and to xdata
mov dptr,#_SIO2_RxCount
movx a,@dptr
mov r3,a
anl a,#0x3F
movx @dptr,a
C$rt_serial.c$680$2$6 ==.
;rt_serial.c:680: END_CRITICAL;
; genAssign
mov c,_SIO2_getchar_EA_local_1_1
mov _EA,c
C$rt_serial.c$682$1$1 ==.
;rt_serial.c:682: return Chr;
; genRet
mov dpl,r2
00107$:
C$rt_serial.c$683$1$1 ==.
XG$SIO2_getchar$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIO1_pollchar'
;------------------------------------------------------------
;------------------------------------------------------------
G$SIO1_pollchar$0$0 ==.
C$rt_serial.c$694$1$1 ==.
;rt_serial.c:694: char SIO1_pollchar(void)
; -----------------------------------------
; function SIO1_pollchar
; -----------------------------------------
_SIO1_pollchar:
C$rt_serial.c$696$1$1 ==.
;rt_serial.c:696: return SIO1_RxCount;
; genAssign
mov dptr,#_SIO1_RxCount
movx a,@dptr
; genRet
C$rt_serial.c$697$1$1 ==.
XG$SIO1_pollchar$0$0 ==.
; Peephole 234 loading dpl directly from a(ccumulator), r2 not set
mov dpl,a
00101$:
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIO2_pollchar'
;------------------------------------------------------------
;------------------------------------------------------------
G$SIO2_pollchar$0$0 ==.
C$rt_serial.c$700$1$1 ==.
;rt_serial.c:700: char SIO2_pollchar(void)
; -----------------------------------------
; function SIO2_pollchar
; -----------------------------------------
_SIO2_pollchar:
C$rt_serial.c$702$1$1 ==.
;rt_serial.c:702: return SIO2_RxCount;
; genAssign
mov dptr,#_SIO2_RxCount
movx a,@dptr
; genRet
C$rt_serial.c$703$1$1 ==.
XG$SIO2_pollchar$0$0 ==.
; Peephole 234 loading dpl directly from a(ccumulator), r2 not set
mov dpl,a
00101$:
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIO1_flush'
;------------------------------------------------------------
;------------------------------------------------------------
G$SIO1_flush$0$0 ==.
C$rt_serial.c$706$1$1 ==.
;rt_serial.c:706: void SIO1_flush(void)
; -----------------------------------------
; function SIO1_flush
; -----------------------------------------
_SIO1_flush:
C$rt_serial.c$709$2$2 ==.
;rt_serial.c:709: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00107$
sjmp 00102$
00107$:
; genAssign
setb _SIO1_flush_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00103$
00102$:
; genAssign
clr _SIO1_flush_EA_local_1_1
00103$:
C$rt_serial.c$710$1$1 ==.
;rt_serial.c:710: SIO1_RxPtr = 0;
; genAssign
mov dptr,#_SIO1_RxPtr
; Peephole 181 changed mov to clr
C$rt_serial.c$711$1$1 ==.
;rt_serial.c:711: SIO1_RxCount = 0;
; genAssign
; Peephole 181 changed mov to clr
; Peephole 219 removed redundant clear
clr a
movx @dptr,a
mov dptr,#_SIO1_RxCount
movx @dptr,a
C$rt_serial.c$712$2$5 ==.
;rt_serial.c:712: END_CRITICAL;
; genAssign
mov c,_SIO1_flush_EA_local_1_1
mov _EA,c
00104$:
C$rt_serial.c$713$2$5 ==.
XG$SIO1_flush$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIO2_flush'
;------------------------------------------------------------
;------------------------------------------------------------
G$SIO2_flush$0$0 ==.
C$rt_serial.c$716$2$5 ==.
;rt_serial.c:716: void SIO2_flush(void)
; -----------------------------------------
; function SIO2_flush
; -----------------------------------------
_SIO2_flush:
C$rt_serial.c$719$2$2 ==.
;rt_serial.c:719: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00107$
sjmp 00102$
00107$:
; genAssign
setb _SIO2_flush_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00103$
00102$:
; genAssign
clr _SIO2_flush_EA_local_1_1
00103$:
C$rt_serial.c$720$1$1 ==.
;rt_serial.c:720: SIO2_RxPtr = 0;
; genAssign
mov dptr,#_SIO2_RxPtr
; Peephole 181 changed mov to clr
C$rt_serial.c$721$1$1 ==.
;rt_serial.c:721: SIO2_RxCount = 0;
; genAssign
; Peephole 181 changed mov to clr
; Peephole 219 removed redundant clear
clr a
movx @dptr,a
mov dptr,#_SIO2_RxCount
movx @dptr,a
C$rt_serial.c$722$2$5 ==.
;rt_serial.c:722: END_CRITICAL;
; genAssign
mov c,_SIO2_flush_EA_local_1_1
mov _EA,c
00104$:
C$rt_serial.c$723$2$5 ==.
XG$SIO2_flush$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIO1_break'
;------------------------------------------------------------
;ticks Allocated with name '_SIO1_break_PARM_2'
;level Allocated with name '_SIO1_break_level_1_1'
;------------------------------------------------------------
G$SIO1_break$0$0 ==.
C$rt_serial.c$732$2$5 ==.
;rt_serial.c:732: void SIO1_break(char level,unsigned char ticks)
; -----------------------------------------
; function SIO1_break
; -----------------------------------------
_SIO1_break:
; genReceive
mov a,dpl
mov dptr,#_SIO1_break_level_1_1
movx @dptr,a
C$rt_serial.c$735$1$1 ==.
;rt_serial.c:735: while(SIO1_TxCount)
00101$:
; genAssign
mov dptr,#_SIO1_TxCount
movx a,@dptr
; genIfx
; Peephole 105 removed redundant mov
mov r2,a
; genIfxJump
; Peephole 110 removed ljmp by inverse jump logic
jz 00103$
00108$:
C$rt_serial.c$737$2$2 ==.
;rt_serial.c:737: RESCHEDULE;
; genCall
lcall _reschedule
; Peephole 112.b changed ljmp to sjmp
sjmp 00101$
00103$:
C$rt_serial.c$740$1$1 ==.
;rt_serial.c:740: SIO1_TXD = level;
; genAssign
mov dptr,#_SIO1_break_level_1_1
movx a,@dptr
add a,#0xff
mov _TXD,c
C$rt_serial.c$741$1$1 ==.
;rt_serial.c:741: sleep(ticks);
; genAssign
mov dptr,#_SIO1_break_PARM_2
movx a,@dptr
; genCall
; Peephole 244.c loading dpl from a instead of r2
mov r2,a
mov dpl,a
lcall _sleep
C$rt_serial.c$742$1$1 ==.
;rt_serial.c:742: SIO1_TXD = 1;
; genAssign
setb _TXD
00104$:
C$rt_serial.c$743$1$1 ==.
XG$SIO1_break$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SendStringCode'
;------------------------------------------------------------
;s Allocated with name '_SendStringCode_s_1_1'
;c Allocated with name '_SendStringCode_c_1_1'
;------------------------------------------------------------
G$SendStringCode$0$0 ==.
C$rt_serial.c$753$1$1 ==.
;rt_serial.c:753: void SendStringCode(code char * s)
; -----------------------------------------
; function SendStringCode
; -----------------------------------------
_SendStringCode:
; genReceive
mov r2,dph
mov a,dpl
mov dptr,#_SendStringCode_s_1_1
movx @dptr,a
inc dptr
mov a,r2
movx @dptr,a
C$rt_serial.c$756$1$1 ==.
;rt_serial.c:756: if (!s) return;
; genAssign
mov dptr,#_SendStringCode_s_1_1
movx a,@dptr
mov r2,a
inc dptr
movx a,@dptr
; genIfx
; Peephole 135 removed redundant mov
mov r3,a
orl a,r2
; genIfxJump
; Peephole 109 removed ljmp by inverse jump logic
jnz 00103$
00111$:
; genRet
C$rt_serial.c$758$1$1 ==.
;rt_serial.c:758: while(*s)
; Peephole 112.b changed ljmp to sjmp
; Peephole 251.b replaced sjmp to ret with ret
ret
00103$:
; genAssign
mov dptr,#_SendStringCode_s_1_1
movx a,@dptr
mov r2,a
inc dptr
movx a,@dptr
mov r3,a
; genPointerGet
; genCodePointerGet
mov dpl,r2
mov dph,r3
; Peephole 181 changed mov to clr
clr a
movc a,@a+dptr
; genIfx
; Peephole 105 removed redundant mov
mov r4,a
; genIfxJump
; Peephole 110 removed ljmp by inverse jump logic
jz 00106$
00112$:
C$rt_serial.c$760$2$2 ==.
;rt_serial.c:760: c= *s++;
; genAssign
; genPlus
mov dptr,#_SendStringCode_s_1_1
; genPlusIncr
mov a,#0x01
; Peephole 236.a used r2 instead of ar2
add a,r2
movx @dptr,a
; Peephole 181 changed mov to clr
clr a
; Peephole 236.b used r3 instead of ar3
addc a,r3
inc dptr
movx @dptr,a
C$rt_serial.c$761$2$2 ==.
;rt_serial.c:761: putchar(c);
; genCall
mov dpl,r4
lcall _putchar
; Peephole 112.b changed ljmp to sjmp
sjmp 00103$
00106$:
C$rt_serial.c$763$1$1 ==.
XG$SendStringCode$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SendStringXdata'
;------------------------------------------------------------
;s Allocated with name '_SendStringXdata_s_1_1'
;c Allocated with name '_SendStringXdata_c_1_1'
;------------------------------------------------------------
G$SendStringXdata$0$0 ==.
C$rt_serial.c$766$1$1 ==.
;rt_serial.c:766: void SendStringXdata(xdata char * s)
; -----------------------------------------
; function SendStringXdata
; -----------------------------------------
_SendStringXdata:
; genReceive
mov r2,dph
mov a,dpl
mov dptr,#_SendStringXdata_s_1_1
movx @dptr,a
inc dptr
mov a,r2
movx @dptr,a
C$rt_serial.c$769$1$1 ==.
;rt_serial.c:769: if (!s) return;
; genAssign
mov dptr,#_SendStringXdata_s_1_1
movx a,@dptr
mov r2,a
inc dptr
movx a,@dptr
; genIfx
; Peephole 135 removed redundant mov
mov r3,a
orl a,r2
; genIfxJump
; Peephole 109 removed ljmp by inverse jump logic
jnz 00103$
00111$:
; genRet
C$rt_serial.c$771$1$1 ==.
;rt_serial.c:771: while(*s)
; Peephole 112.b changed ljmp to sjmp
; Peephole 251.b replaced sjmp to ret with ret
ret
00103$:
; genAssign
mov dptr,#_SendStringXdata_s_1_1
movx a,@dptr
mov r2,a
inc dptr
movx a,@dptr
mov r3,a
; genPointerGet
; genFarPointerGet
mov dpl,r2
mov dph,r3
movx a,@dptr
; genIfx
; Peephole 105 removed redundant mov
mov r4,a
; genIfxJump
; Peephole 110 removed ljmp by inverse jump logic
jz 00106$
00112$:
C$rt_serial.c$773$2$2 ==.
;rt_serial.c:773: c= *s++;
; genAssign
; genPlus
mov dptr,#_SendStringXdata_s_1_1
; genPlusIncr
mov a,#0x01
; Peephole 236.a used r2 instead of ar2
add a,r2
movx @dptr,a
; Peephole 181 changed mov to clr
clr a
; Peephole 236.b used r3 instead of ar3
addc a,r3
inc dptr
movx @dptr,a
C$rt_serial.c$774$2$2 ==.
;rt_serial.c:774: putchar(c);
; genCall
mov dpl,r4
lcall _putchar
; Peephole 112.b changed ljmp to sjmp
sjmp 00103$
00106$:
C$rt_serial.c$776$1$1 ==.
XG$SendStringXdata$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SendHex'
;------------------------------------------------------------
;x Allocated with name '_SendHex_x_1_1'
;p Allocated with name '_SendHex_p_1_1'
;------------------------------------------------------------
G$SendHex$0$0 ==.
C$rt_serial.c$782$1$1 ==.
;rt_serial.c:782: void SendHex(unsigned char x)
; -----------------------------------------
; function SendHex
; -----------------------------------------
_SendHex:
; genReceive
mov a,dpl
mov dptr,#_SendHex_x_1_1
movx @dptr,a
C$rt_serial.c$785$1$1 ==.
;rt_serial.c:785: p = x / 16;
; genAssign
mov dptr,#_SendHex_x_1_1
movx a,@dptr
; genRightShift
; genRightShiftLiteral
; genrshOne
; Peephole 105 removed redundant mov
mov r2,a
swap a
anl a,#0x0f
mov r2,a
C$rt_serial.c$786$1$1 ==.
;rt_serial.c:786: putchar(p>15?'-':p>9?p+'A'-10:p+'0');
; genCmpGt
; genCmp
clr c
mov a,#0x0F
subb a,r2
; genIfxJump
; Peephole 108 removed ljmp by inverse jump logic
jnc 00103$
00115$:
; genAssign
mov r3,#0x2D
; Peephole 112.b changed ljmp to sjmp
sjmp 00104$
00103$:
; genCmpGt
; genCmp
clr c
mov a,#0x09
subb a,r2
; genIfxJump
; Peephole 108 removed ljmp by inverse jump logic
jnc 00105$
00116$:
; genPlus
mov a,#0x37
; Peephole 236.a used r2 instead of ar2
add a,r2
mov r4,a
; Peephole 112.b changed ljmp to sjmp
sjmp 00106$
00105$:
; genPlus
mov a,#0x30
; Peephole 236.a used r2 instead of ar2
add a,r2
mov r4,a
00106$:
; genAssign
mov ar3,r4
00104$:
; genCall
mov dpl,r3
lcall _putchar
C$rt_serial.c$787$1$1 ==.
;rt_serial.c:787: p = x & 15;
; genAssign
mov dptr,#_SendHex_x_1_1
movx a,@dptr
mov r2,a
; genAnd
anl ar2,#0x0F
C$rt_serial.c$788$1$1 ==.
;rt_serial.c:788: putchar(p>15?'-':p>9?p+'A'-10:p+'0');
; genCmpGt
; genCmp
clr c
mov a,#0x0F
subb a,r2
; genIfxJump
; Peephole 108 removed ljmp by inverse jump logic
jnc 00107$
00117$:
; genAssign
mov r3,#0x2D
; Peephole 112.b changed ljmp to sjmp
sjmp 00108$
00107$:
; genCmpGt
; genCmp
clr c
mov a,#0x09
subb a,r2
; genIfxJump
; Peephole 108 removed ljmp by inverse jump logic
jnc 00109$
00118$:
; genPlus
mov a,#0x37
; Peephole 236.a used r2 instead of ar2
add a,r2
mov r4,a
; Peephole 112.b changed ljmp to sjmp
sjmp 00110$
00109$:
; genPlus
mov a,#0x30
; Peephole 236.a used r2 instead of ar2
add a,r2
mov r4,a
00110$:
; genAssign
mov ar3,r4
00108$:
; genCall
mov dpl,r3
C$rt_serial.c$789$1$1 ==.
XG$SendHex$0$0 ==.
; Peephole 253.b replaced lcall/ret with ljmp
ljmp _putchar
;------------------------------------------------------------
;Allocation info for local variables in function 'SIOTakeSemaphore'
;------------------------------------------------------------
;------------------------------------------------------------
G$SIOTakeSemaphore$0$0 ==.
C$rt_serial.c$799$1$1 ==.
;rt_serial.c:799: void SIOTakeSemaphore(void)
; -----------------------------------------
; function SIOTakeSemaphore
; -----------------------------------------
_SIOTakeSemaphore:
C$rt_serial.c$802$1$1 ==.
;rt_serial.c:802: while(1){
00108$:
C$rt_serial.c$803$3$3 ==.
;rt_serial.c:803: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00115$
sjmp 00102$
00115$:
; genAssign
setb _SIOTakeSemaphore_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00103$
00102$:
; genAssign
clr _SIOTakeSemaphore_EA_local_1_1
00103$:
C$rt_serial.c$804$2$2 ==.
;rt_serial.c:804: if(SIO_put_semaphore)
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
C$rt_serial.c$806$3$6 ==.
;rt_serial.c:806: SIO_put_semaphore = FALSE;
; genAssign
; Peephole 250.a using atomic test and clear
jbc _SIO_put_semaphore,00116$
sjmp 00105$
00116$:
C$rt_serial.c$807$4$7 ==.
;rt_serial.c:807: END_CRITICAL;
; genAssign
mov c,_SIOTakeSemaphore_EA_local_1_1
mov _EA,c
C$rt_serial.c$808$3$6 ==.
;rt_serial.c:808: return;
; genRet
; Peephole 112.b changed ljmp to sjmp
; Peephole 251.b replaced sjmp to ret with ret
ret
00105$:
C$rt_serial.c$813$4$9 ==.
;rt_serial.c:813: END_CRITICAL;
; genAssign
mov c,_SIOTakeSemaphore_EA_local_1_1
mov _EA,c
C$rt_serial.c$814$3$8 ==.
;rt_serial.c:814: RESCHEDULE;
; genCall
lcall _reschedule
; Peephole 112.b changed ljmp to sjmp
sjmp 00108$
00110$:
C$rt_serial.c$817$1$1 ==.
XG$SIOTakeSemaphore$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIOPutSemaphore'
;------------------------------------------------------------
;------------------------------------------------------------
G$SIOPutSemaphore$0$0 ==.
C$rt_serial.c$819$1$1 ==.
;rt_serial.c:819: void SIOPutSemaphore(void)
; -----------------------------------------
; function SIOPutSemaphore
; -----------------------------------------
_SIOPutSemaphore:
C$rt_serial.c$821$1$1 ==.
;rt_serial.c:821: SIO_put_semaphore = TRUE;
; genAssign
setb _SIO_put_semaphore
00101$:
C$rt_serial.c$822$1$1 ==.
XG$SIOPutSemaphore$0$0 ==.
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'SIOSetSemaphore'
;------------------------------------------------------------
;rc Allocated with name '_SIOSetSemaphore_rc_1_1'
;------------------------------------------------------------
G$SIOSetSemaphore$0$0 ==.
C$rt_serial.c$824$1$1 ==.
;rt_serial.c:824: char SIOSetSemaphore(Bool value)
; -----------------------------------------
; function SIOSetSemaphore
; -----------------------------------------
_SIOSetSemaphore:
; genReceive
mov r2,dpl
C$rt_serial.c$828$2$2 ==.
;rt_serial.c:828: BEGIN_CRITICAL;
; genIfx
; genIfxJump
; Peephole 111 removed ljmp by inverse jump logic
; genAssign
; Peephole 250.a using atomic test and clear
jbc _EA,00107$
sjmp 00102$
00107$:
; genAssign
setb _SIOSetSemaphore_EA_local_1_1
; Peephole 112.b changed ljmp to sjmp
sjmp 00103$
00102$:
; genAssign
clr _SIOSetSemaphore_EA_local_1_1
00103$:
C$rt_serial.c$829$1$1 ==.
;rt_serial.c:829: rc= SIO_put_semaphore;
; genAssign
clr a
mov c,_SIO_put_semaphore
rlc a
mov r3,a
C$rt_serial.c$830$1$1 ==.
;rt_serial.c:830: SIO_put_semaphore = value;
; genAssign
mov a,r2
add a,#0xff
mov _SIO_put_semaphore,c
C$rt_serial.c$831$2$5 ==.
;rt_serial.c:831: END_CRITICAL;
; genAssign
mov c,_SIOSetSemaphore_EA_local_1_1
mov _EA,c
C$rt_serial.c$832$1$1 ==.
;rt_serial.c:832: return rc;
; genRet
mov dpl,r3
00104$:
C$rt_serial.c$833$1$1 ==.
XG$SIOSetSemaphore$0$0 ==.
ret
.area CSEG (CODE)
.area XINIT (CODE)