Initial commit - sync AliceRC to Gitea
This commit is contained in:
@@ -0,0 +1,680 @@
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ANSI-C Compiler
|
||||
; Version 4.2.0 #13081 (Linux)
|
||||
;--------------------------------------------------------
|
||||
.module sbus
|
||||
.optsdcc -mmcs51 --model-small
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
.globl _sbus_make_uart_frame_PARM_2
|
||||
.globl _sbus_unpack_channels_PARM_2
|
||||
.globl _EADC
|
||||
.globl _ET1
|
||||
.globl _ET0
|
||||
.globl _ES
|
||||
.globl _EA
|
||||
.globl _REN
|
||||
.globl _RI
|
||||
.globl _TI
|
||||
.globl _TR1
|
||||
.globl _TF1
|
||||
.globl _IT0
|
||||
.globl _IE0
|
||||
.globl _TR0
|
||||
.globl _TF0
|
||||
.globl _CMPCR2
|
||||
.globl _CMPCR1
|
||||
.globl _TA
|
||||
.globl _IRCBAND_REG
|
||||
.globl _IAP_TPS
|
||||
.globl _IAP_CONTR
|
||||
.globl _IAP_TRIG
|
||||
.globl _IAP_CMD
|
||||
.globl _IAP_ADDRL
|
||||
.globl _IAP_ADDRH
|
||||
.globl _IAP_DATA
|
||||
.globl _WDT_CONTR
|
||||
.globl _PCA_PWM3
|
||||
.globl _PCA_PWM2
|
||||
.globl _PCA_PWM1
|
||||
.globl _PCA_PWM0
|
||||
.globl _CCAP3L
|
||||
.globl _CCAP2L
|
||||
.globl _CCAP1L
|
||||
.globl _CCAP0L
|
||||
.globl _CCAPM3
|
||||
.globl _CCAPM2
|
||||
.globl _CCAPM1
|
||||
.globl _CCAPM0
|
||||
.globl _CMOD
|
||||
.globl _CCON
|
||||
.globl _ADCTIM_X
|
||||
.globl _ADCCFG
|
||||
.globl _ADC_RESL
|
||||
.globl _ADC_RES
|
||||
.globl _ADC_CONTR
|
||||
.globl _SPDAT
|
||||
.globl _SPCTL
|
||||
.globl _SPSTAT
|
||||
.globl _IP2H
|
||||
.globl _IP2
|
||||
.globl _IP
|
||||
.globl _IE2
|
||||
.globl _IE
|
||||
.globl _BRT
|
||||
.globl _P_SW1
|
||||
.globl _SADEN
|
||||
.globl _SADDR
|
||||
.globl _S2BUF
|
||||
.globl _S2CON
|
||||
.globl _SBUF
|
||||
.globl _SCON
|
||||
.globl _TM4PS_X
|
||||
.globl _TM3PS_X
|
||||
.globl _TM2PS_X
|
||||
.globl _T4T3M
|
||||
.globl _T4L
|
||||
.globl _T4H
|
||||
.globl _T3L
|
||||
.globl _T3H
|
||||
.globl _T2L
|
||||
.globl _T2H
|
||||
.globl _INTCLKO
|
||||
.globl _AUXR
|
||||
.globl _TH1
|
||||
.globl _TH0
|
||||
.globl _TL1
|
||||
.globl _TL0
|
||||
.globl _TMOD
|
||||
.globl _TCON
|
||||
.globl _P_SW2
|
||||
.globl _P5M0
|
||||
.globl _P5M1
|
||||
.globl _P4M0
|
||||
.globl _P4M1
|
||||
.globl _P3M0
|
||||
.globl _P3M1
|
||||
.globl _P2M0
|
||||
.globl _P2M1
|
||||
.globl _P1M0
|
||||
.globl _P1M1
|
||||
.globl _P0M0
|
||||
.globl _P0M1
|
||||
.globl _PSW
|
||||
.globl _B
|
||||
.globl _ACC
|
||||
.globl _PCON
|
||||
.globl _DPH
|
||||
.globl _DPL
|
||||
.globl _SP
|
||||
.globl _P5
|
||||
.globl _P4
|
||||
.globl _P3
|
||||
.globl _P2
|
||||
.globl _P1
|
||||
.globl _P0
|
||||
.globl _sbus_unpack_channels
|
||||
.globl _sbus_make_uart_frame
|
||||
;--------------------------------------------------------
|
||||
; special function registers
|
||||
;--------------------------------------------------------
|
||||
.area RSEG (ABS,DATA)
|
||||
.org 0x0000
|
||||
_P0 = 0x0080
|
||||
_P1 = 0x0090
|
||||
_P2 = 0x00a0
|
||||
_P3 = 0x00b0
|
||||
_P4 = 0x00c0
|
||||
_P5 = 0x00c8
|
||||
_SP = 0x0081
|
||||
_DPL = 0x0082
|
||||
_DPH = 0x0083
|
||||
_PCON = 0x0087
|
||||
_ACC = 0x00e0
|
||||
_B = 0x00f0
|
||||
_PSW = 0x00d0
|
||||
_P0M1 = 0x0093
|
||||
_P0M0 = 0x0094
|
||||
_P1M1 = 0x0091
|
||||
_P1M0 = 0x0092
|
||||
_P2M1 = 0x0095
|
||||
_P2M0 = 0x0096
|
||||
_P3M1 = 0x00b1
|
||||
_P3M0 = 0x00b2
|
||||
_P4M1 = 0x00b3
|
||||
_P4M0 = 0x00b4
|
||||
_P5M1 = 0x00c9
|
||||
_P5M0 = 0x00ca
|
||||
_P_SW2 = 0x00ba
|
||||
_TCON = 0x0088
|
||||
_TMOD = 0x0089
|
||||
_TL0 = 0x008a
|
||||
_TL1 = 0x008b
|
||||
_TH0 = 0x008c
|
||||
_TH1 = 0x008d
|
||||
_AUXR = 0x008e
|
||||
_INTCLKO = 0x008f
|
||||
_T2H = 0x00d6
|
||||
_T2L = 0x00d7
|
||||
_T3H = 0x00d4
|
||||
_T3L = 0x00d5
|
||||
_T4H = 0x00d2
|
||||
_T4L = 0x00d3
|
||||
_T4T3M = 0x00d1
|
||||
_TM2PS_X = 0xfea1
|
||||
_TM3PS_X = 0xfea2
|
||||
_TM4PS_X = 0xfea3
|
||||
_SCON = 0x0098
|
||||
_SBUF = 0x0099
|
||||
_S2CON = 0x009a
|
||||
_S2BUF = 0x009b
|
||||
_SADDR = 0x00a9
|
||||
_SADEN = 0x00b9
|
||||
_P_SW1 = 0x00a2
|
||||
_BRT = 0x009c
|
||||
_IE = 0x00a8
|
||||
_IE2 = 0x00af
|
||||
_IP = 0x00b8
|
||||
_IP2 = 0x00b6
|
||||
_IP2H = 0x00b7
|
||||
_SPSTAT = 0x00cd
|
||||
_SPCTL = 0x00ce
|
||||
_SPDAT = 0x00cf
|
||||
_ADC_CONTR = 0x00bc
|
||||
_ADC_RES = 0x00bd
|
||||
_ADC_RESL = 0x00be
|
||||
_ADCCFG = 0x00de
|
||||
_ADCTIM_X = 0xfea8
|
||||
_CCON = 0x00d8
|
||||
_CMOD = 0x00d9
|
||||
_CCAPM0 = 0x00da
|
||||
_CCAPM1 = 0x00db
|
||||
_CCAPM2 = 0x00dc
|
||||
_CCAPM3 = 0x00dd
|
||||
_CCAP0L = 0x00ea
|
||||
_CCAP1L = 0x00eb
|
||||
_CCAP2L = 0x00ec
|
||||
_CCAP3L = 0x00ed
|
||||
_PCA_PWM0 = 0x00f2
|
||||
_PCA_PWM1 = 0x00f3
|
||||
_PCA_PWM2 = 0x00f4
|
||||
_PCA_PWM3 = 0x00f5
|
||||
_WDT_CONTR = 0x00c1
|
||||
_IAP_DATA = 0x00c2
|
||||
_IAP_ADDRH = 0x00c3
|
||||
_IAP_ADDRL = 0x00c4
|
||||
_IAP_CMD = 0x00c5
|
||||
_IAP_TRIG = 0x00c6
|
||||
_IAP_CONTR = 0x00c7
|
||||
_IAP_TPS = 0x00f7
|
||||
_IRCBAND_REG = 0x009d
|
||||
_TA = 0x00ae
|
||||
_CMPCR1 = 0x00e6
|
||||
_CMPCR2 = 0x00e7
|
||||
;--------------------------------------------------------
|
||||
; special function bits
|
||||
;--------------------------------------------------------
|
||||
.area RSEG (ABS,DATA)
|
||||
.org 0x0000
|
||||
_TF0 = 0x008d
|
||||
_TR0 = 0x008c
|
||||
_IE0 = 0x0089
|
||||
_IT0 = 0x0088
|
||||
_TF1 = 0x008f
|
||||
_TR1 = 0x008e
|
||||
_TI = 0x0099
|
||||
_RI = 0x0098
|
||||
_REN = 0x009c
|
||||
_EA = 0x00af
|
||||
_ES = 0x00ac
|
||||
_ET0 = 0x00a9
|
||||
_ET1 = 0x00ab
|
||||
_EADC = 0x00ad
|
||||
;--------------------------------------------------------
|
||||
; overlayable register banks
|
||||
;--------------------------------------------------------
|
||||
.area REG_BANK_0 (REL,OVR,DATA)
|
||||
.ds 8
|
||||
;--------------------------------------------------------
|
||||
; internal ram data
|
||||
;--------------------------------------------------------
|
||||
.area DSEG (DATA)
|
||||
;--------------------------------------------------------
|
||||
; overlayable items in internal ram
|
||||
;--------------------------------------------------------
|
||||
.area OSEG (OVR,DATA)
|
||||
_sbus_unpack_channels_PARM_2:
|
||||
.ds 3
|
||||
_sbus_unpack_channels_in_65536_3:
|
||||
.ds 3
|
||||
_sbus_unpack_channels_bit_buf_65536_4:
|
||||
.ds 4
|
||||
_sbus_unpack_channels_in_idx_65536_4:
|
||||
.ds 1
|
||||
_sbus_unpack_channels_i_65536_4:
|
||||
.ds 1
|
||||
.area OSEG (OVR,DATA)
|
||||
_sbus_make_uart_frame_PARM_2:
|
||||
.ds 3
|
||||
_sbus_make_uart_frame_ch_65536_8:
|
||||
.ds 3
|
||||
_sbus_make_uart_frame_bit_buf_65536_9:
|
||||
.ds 4
|
||||
_sbus_make_uart_frame_bit_count_65536_9:
|
||||
.ds 1
|
||||
_sbus_make_uart_frame_out_idx_65536_9:
|
||||
.ds 1
|
||||
_sbus_make_uart_frame_i_65536_9:
|
||||
.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)
|
||||
;--------------------------------------------------------
|
||||
; external ram data
|
||||
;--------------------------------------------------------
|
||||
.area XSEG (XDATA)
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
.area XABS (ABS,XDATA)
|
||||
;--------------------------------------------------------
|
||||
; external initialized ram data
|
||||
;--------------------------------------------------------
|
||||
.area XISEG (XDATA)
|
||||
.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)
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
.area HOME (CODE)
|
||||
.area GSINIT (CODE)
|
||||
.area GSFINAL (CODE)
|
||||
.area GSINIT (CODE)
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
.area HOME (CODE)
|
||||
.area HOME (CODE)
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
.area CSEG (CODE)
|
||||
;------------------------------------------------------------
|
||||
;Allocation info for local variables in function 'sbus_unpack_channels'
|
||||
;------------------------------------------------------------
|
||||
;ch Allocated with name '_sbus_unpack_channels_PARM_2'
|
||||
;in Allocated with name '_sbus_unpack_channels_in_65536_3'
|
||||
;bit_buf Allocated with name '_sbus_unpack_channels_bit_buf_65536_4'
|
||||
;bit_count Allocated to registers r0
|
||||
;in_idx Allocated with name '_sbus_unpack_channels_in_idx_65536_4'
|
||||
;i Allocated with name '_sbus_unpack_channels_i_65536_4'
|
||||
;------------------------------------------------------------
|
||||
; src/sbus.c:7: void sbus_unpack_channels(const uint8_t in[22], uint16_t ch[SBUS_CH_COUNT])
|
||||
; -----------------------------------------
|
||||
; function sbus_unpack_channels
|
||||
; -----------------------------------------
|
||||
_sbus_unpack_channels:
|
||||
ar7 = 0x07
|
||||
ar6 = 0x06
|
||||
ar5 = 0x05
|
||||
ar4 = 0x04
|
||||
ar3 = 0x03
|
||||
ar2 = 0x02
|
||||
ar1 = 0x01
|
||||
ar0 = 0x00
|
||||
mov _sbus_unpack_channels_in_65536_3,dpl
|
||||
mov (_sbus_unpack_channels_in_65536_3 + 1),dph
|
||||
mov (_sbus_unpack_channels_in_65536_3 + 2),b
|
||||
; src/sbus.c:10: uint32_t bit_buf = 0;
|
||||
clr a
|
||||
mov _sbus_unpack_channels_bit_buf_65536_4,a
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 1),a
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 2),a
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 3),a
|
||||
; src/sbus.c:11: uint8_t bit_count = 0;
|
||||
mov r0,#0x00
|
||||
; src/sbus.c:16: while (bit_count < 11) {
|
||||
; 1-genFromRTrack replaced mov _sbus_unpack_channels_in_idx_65536_4,#0x00
|
||||
mov _sbus_unpack_channels_in_idx_65536_4,a
|
||||
; 1-genFromRTrack replaced mov _sbus_unpack_channels_i_65536_4,#0x00
|
||||
mov _sbus_unpack_channels_i_65536_4,a
|
||||
00101$:
|
||||
cjne r0,#0x0b,00118$
|
||||
00118$:
|
||||
jnc 00103$
|
||||
; src/sbus.c:17: bit_buf |= ((uint32_t)in[in_idx++]) << bit_count;
|
||||
mov a,_sbus_unpack_channels_in_idx_65536_4
|
||||
add a,_sbus_unpack_channels_in_65536_3
|
||||
mov r5,a
|
||||
clr a
|
||||
addc a,(_sbus_unpack_channels_in_65536_3 + 1)
|
||||
mov r6,a
|
||||
mov r7,(_sbus_unpack_channels_in_65536_3 + 2)
|
||||
inc _sbus_unpack_channels_in_idx_65536_4
|
||||
mov dpl,r5
|
||||
mov dph,r6
|
||||
mov b,r7
|
||||
lcall __gptrget
|
||||
mov r7,a
|
||||
mov r5,#0x00
|
||||
mov r6,#0x00
|
||||
mov r4,#0x00
|
||||
mov b,r0
|
||||
inc b
|
||||
sjmp 00121$
|
||||
00120$:
|
||||
mov a,r7
|
||||
add a,r7
|
||||
mov r7,a
|
||||
mov a,r5
|
||||
rlc a
|
||||
mov r5,a
|
||||
mov a,r6
|
||||
rlc a
|
||||
mov r6,a
|
||||
mov a,r4
|
||||
rlc a
|
||||
mov r4,a
|
||||
00121$:
|
||||
djnz b,00120$
|
||||
mov a,r7
|
||||
orl _sbus_unpack_channels_bit_buf_65536_4,a
|
||||
mov a,r5
|
||||
orl (_sbus_unpack_channels_bit_buf_65536_4 + 1),a
|
||||
mov a,r6
|
||||
orl (_sbus_unpack_channels_bit_buf_65536_4 + 2),a
|
||||
mov a,r4
|
||||
orl (_sbus_unpack_channels_bit_buf_65536_4 + 3),a
|
||||
; src/sbus.c:18: bit_count += 8;
|
||||
mov ar7,r0
|
||||
mov a,#0x08
|
||||
add a,r7
|
||||
mov r0,a
|
||||
sjmp 00101$
|
||||
00103$:
|
||||
; src/sbus.c:20: ch[i] = (uint16_t)(bit_buf & 0x07FF);
|
||||
mov a,_sbus_unpack_channels_i_65536_4
|
||||
mov b,#0x02
|
||||
mul ab
|
||||
add a,_sbus_unpack_channels_PARM_2
|
||||
mov r5,a
|
||||
mov a,(_sbus_unpack_channels_PARM_2 + 1)
|
||||
addc a,b
|
||||
mov r6,a
|
||||
mov r7,(_sbus_unpack_channels_PARM_2 + 2)
|
||||
mov r1,_sbus_unpack_channels_bit_buf_65536_4
|
||||
mov r2,(_sbus_unpack_channels_bit_buf_65536_4 + 1)
|
||||
anl ar2,#0x07
|
||||
mov dpl,r5
|
||||
mov dph,r6
|
||||
mov b,r7
|
||||
mov a,r1
|
||||
lcall __gptrput
|
||||
inc dptr
|
||||
mov a,r2
|
||||
lcall __gptrput
|
||||
; src/sbus.c:21: bit_buf >>= 11;
|
||||
mov _sbus_unpack_channels_bit_buf_65536_4,(_sbus_unpack_channels_bit_buf_65536_4 + 1)
|
||||
mov a,(_sbus_unpack_channels_bit_buf_65536_4 + 2)
|
||||
swap a
|
||||
rl a
|
||||
xch a,_sbus_unpack_channels_bit_buf_65536_4
|
||||
swap a
|
||||
rl a
|
||||
anl a,#0x1f
|
||||
xrl a,_sbus_unpack_channels_bit_buf_65536_4
|
||||
xch a,_sbus_unpack_channels_bit_buf_65536_4
|
||||
anl a,#0x1f
|
||||
xch a,_sbus_unpack_channels_bit_buf_65536_4
|
||||
xrl a,_sbus_unpack_channels_bit_buf_65536_4
|
||||
xch a,_sbus_unpack_channels_bit_buf_65536_4
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 1),a
|
||||
mov a,(_sbus_unpack_channels_bit_buf_65536_4 + 3)
|
||||
swap a
|
||||
rl a
|
||||
anl a,#0xe0
|
||||
orl a,(_sbus_unpack_channels_bit_buf_65536_4 + 1)
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 1),a
|
||||
mov a,(_sbus_unpack_channels_bit_buf_65536_4 + 3)
|
||||
swap a
|
||||
rl a
|
||||
anl a,#0x1f
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 2),a
|
||||
mov (_sbus_unpack_channels_bit_buf_65536_4 + 3),#0x00
|
||||
; src/sbus.c:22: bit_count -= 11;
|
||||
mov ar7,r0
|
||||
mov a,r7
|
||||
add a,#0xf5
|
||||
mov r0,a
|
||||
; src/sbus.c:15: for (i = 0; i < SBUS_CH_COUNT; i++) {
|
||||
inc _sbus_unpack_channels_i_65536_4
|
||||
mov a,#0x100 - 0x10
|
||||
add a,_sbus_unpack_channels_i_65536_4
|
||||
jc 00122$
|
||||
ljmp 00101$
|
||||
00122$:
|
||||
; src/sbus.c:24: }
|
||||
ret
|
||||
;------------------------------------------------------------
|
||||
;Allocation info for local variables in function 'sbus_make_uart_frame'
|
||||
;------------------------------------------------------------
|
||||
;out Allocated with name '_sbus_make_uart_frame_PARM_2'
|
||||
;ch Allocated with name '_sbus_make_uart_frame_ch_65536_8'
|
||||
;bit_buf Allocated with name '_sbus_make_uart_frame_bit_buf_65536_9'
|
||||
;bit_count Allocated with name '_sbus_make_uart_frame_bit_count_65536_9'
|
||||
;out_idx Allocated with name '_sbus_make_uart_frame_out_idx_65536_9'
|
||||
;i Allocated with name '_sbus_make_uart_frame_i_65536_9'
|
||||
;------------------------------------------------------------
|
||||
; src/sbus.c:26: void sbus_make_uart_frame(const uint16_t ch[SBUS_CH_COUNT], uint8_t out[25])
|
||||
; -----------------------------------------
|
||||
; function sbus_make_uart_frame
|
||||
; -----------------------------------------
|
||||
_sbus_make_uart_frame:
|
||||
mov _sbus_make_uart_frame_ch_65536_8,dpl
|
||||
mov (_sbus_make_uart_frame_ch_65536_8 + 1),dph
|
||||
mov (_sbus_make_uart_frame_ch_65536_8 + 2),b
|
||||
; src/sbus.c:28: uint32_t bit_buf = 0;
|
||||
clr a
|
||||
mov _sbus_make_uart_frame_bit_buf_65536_9,a
|
||||
mov (_sbus_make_uart_frame_bit_buf_65536_9 + 1),a
|
||||
mov (_sbus_make_uart_frame_bit_buf_65536_9 + 2),a
|
||||
mov (_sbus_make_uart_frame_bit_buf_65536_9 + 3),a
|
||||
; src/sbus.c:29: uint8_t bit_count = 0;
|
||||
; 1-genFromRTrack replaced mov _sbus_make_uart_frame_bit_count_65536_9,#0x00
|
||||
mov _sbus_make_uart_frame_bit_count_65536_9,a
|
||||
; src/sbus.c:30: uint8_t out_idx = 0;
|
||||
; 1-genFromRTrack replaced mov _sbus_make_uart_frame_out_idx_65536_9,#0x00
|
||||
mov _sbus_make_uart_frame_out_idx_65536_9,a
|
||||
; src/sbus.c:33: out[0] = 0x0F; /* start byte */
|
||||
mov r5,_sbus_make_uart_frame_PARM_2
|
||||
mov r6,(_sbus_make_uart_frame_PARM_2 + 1)
|
||||
mov r7,(_sbus_make_uart_frame_PARM_2 + 2)
|
||||
mov dpl,r5
|
||||
mov dph,r6
|
||||
mov b,r7
|
||||
mov a,#0x0f
|
||||
lcall __gptrput
|
||||
; src/sbus.c:35: for (i = 0; i < SBUS_CH_COUNT; i++) {
|
||||
mov _sbus_make_uart_frame_i_65536_9,#0x00
|
||||
00107$:
|
||||
; src/sbus.c:36: bit_buf |= ((uint32_t)(ch[i] & 0x07FF)) << bit_count;
|
||||
mov a,_sbus_make_uart_frame_i_65536_9
|
||||
mov b,#0x02
|
||||
mul ab
|
||||
add a,_sbus_make_uart_frame_ch_65536_8
|
||||
mov r1,a
|
||||
mov a,(_sbus_make_uart_frame_ch_65536_8 + 1)
|
||||
addc a,b
|
||||
mov r2,a
|
||||
mov r3,(_sbus_make_uart_frame_ch_65536_8 + 2)
|
||||
mov dpl,r1
|
||||
mov dph,r2
|
||||
mov b,r3
|
||||
lcall __gptrget
|
||||
mov r1,a
|
||||
inc dptr
|
||||
lcall __gptrget
|
||||
mov r2,a
|
||||
anl ar2,#0x07
|
||||
mov r3,#0x00
|
||||
mov r4,#0x00
|
||||
mov b,_sbus_make_uart_frame_bit_count_65536_9
|
||||
inc b
|
||||
sjmp 00134$
|
||||
00133$:
|
||||
mov a,r1
|
||||
add a,r1
|
||||
mov r1,a
|
||||
mov a,r2
|
||||
rlc a
|
||||
mov r2,a
|
||||
mov a,r3
|
||||
rlc a
|
||||
mov r3,a
|
||||
mov a,r4
|
||||
rlc a
|
||||
mov r4,a
|
||||
00134$:
|
||||
djnz b,00133$
|
||||
mov a,r1
|
||||
orl _sbus_make_uart_frame_bit_buf_65536_9,a
|
||||
mov a,r2
|
||||
orl (_sbus_make_uart_frame_bit_buf_65536_9 + 1),a
|
||||
mov a,r3
|
||||
orl (_sbus_make_uart_frame_bit_buf_65536_9 + 2),a
|
||||
mov a,r4
|
||||
orl (_sbus_make_uart_frame_bit_buf_65536_9 + 3),a
|
||||
; src/sbus.c:37: bit_count += 11;
|
||||
mov r4,_sbus_make_uart_frame_bit_count_65536_9
|
||||
mov a,#0x0b
|
||||
add a,r4
|
||||
mov _sbus_make_uart_frame_bit_count_65536_9,a
|
||||
; src/sbus.c:38: while (bit_count >= 8) {
|
||||
mov r4,_sbus_make_uart_frame_out_idx_65536_9
|
||||
00101$:
|
||||
mov a,#0x100 - 0x08
|
||||
add a,_sbus_make_uart_frame_bit_count_65536_9
|
||||
jnc 00116$
|
||||
; src/sbus.c:39: out[1 + out_idx++] = (uint8_t)(bit_buf & 0xFF);
|
||||
mov ar2,r4
|
||||
mov r3,#0x00
|
||||
inc r4
|
||||
inc r2
|
||||
cjne r2,#0x00,00136$
|
||||
inc r3
|
||||
00136$:
|
||||
mov a,r2
|
||||
add a,r5
|
||||
mov r2,a
|
||||
mov a,r3
|
||||
addc a,r6
|
||||
mov r1,a
|
||||
mov ar3,r7
|
||||
mov r0,_sbus_make_uart_frame_bit_buf_65536_9
|
||||
mov dpl,r2
|
||||
mov dph,r1
|
||||
mov b,r3
|
||||
mov a,r0
|
||||
lcall __gptrput
|
||||
; src/sbus.c:40: bit_buf >>= 8;
|
||||
mov _sbus_make_uart_frame_bit_buf_65536_9,(_sbus_make_uart_frame_bit_buf_65536_9 + 1)
|
||||
mov (_sbus_make_uart_frame_bit_buf_65536_9 + 1),(_sbus_make_uart_frame_bit_buf_65536_9 + 2)
|
||||
mov (_sbus_make_uart_frame_bit_buf_65536_9 + 2),(_sbus_make_uart_frame_bit_buf_65536_9 + 3)
|
||||
mov (_sbus_make_uart_frame_bit_buf_65536_9 + 3),#0x00
|
||||
; src/sbus.c:41: bit_count -= 8;
|
||||
mov a,_sbus_make_uart_frame_bit_count_65536_9
|
||||
mov r0,a
|
||||
add a,#0xf8
|
||||
mov _sbus_make_uart_frame_bit_count_65536_9,a
|
||||
sjmp 00101$
|
||||
00116$:
|
||||
mov _sbus_make_uart_frame_out_idx_65536_9,r4
|
||||
; src/sbus.c:35: for (i = 0; i < SBUS_CH_COUNT; i++) {
|
||||
inc _sbus_make_uart_frame_i_65536_9
|
||||
mov a,#0x100 - 0x10
|
||||
add a,_sbus_make_uart_frame_i_65536_9
|
||||
jc 00137$
|
||||
ljmp 00107$
|
||||
00137$:
|
||||
; src/sbus.c:45: if (bit_count > 0) out[1 + out_idx++] = (uint8_t)(bit_buf & 0xFF);
|
||||
mov a,_sbus_make_uart_frame_bit_count_65536_9
|
||||
jz 00106$
|
||||
mov r3,#0x00
|
||||
inc r4
|
||||
cjne r4,#0x00,00139$
|
||||
inc r3
|
||||
00139$:
|
||||
mov a,r4
|
||||
add a,r5
|
||||
mov r4,a
|
||||
mov a,r3
|
||||
addc a,r6
|
||||
mov r3,a
|
||||
mov ar2,r7
|
||||
mov r1,_sbus_make_uart_frame_bit_buf_65536_9
|
||||
mov dpl,r4
|
||||
mov dph,r3
|
||||
mov b,r2
|
||||
mov a,r1
|
||||
lcall __gptrput
|
||||
00106$:
|
||||
; src/sbus.c:47: out[23] = 0x00; /* flags (no failsafe) */
|
||||
mov a,#0x17
|
||||
add a,r5
|
||||
mov r2,a
|
||||
clr a
|
||||
addc a,r6
|
||||
mov r3,a
|
||||
mov ar4,r7
|
||||
mov dpl,r2
|
||||
mov dph,r3
|
||||
mov b,r4
|
||||
clr a
|
||||
lcall __gptrput
|
||||
; src/sbus.c:48: out[24] = 0x00; /* end */
|
||||
mov a,#0x18
|
||||
add a,r5
|
||||
mov r5,a
|
||||
clr a
|
||||
addc a,r6
|
||||
mov r6,a
|
||||
mov dpl,r5
|
||||
mov dph,r6
|
||||
mov b,r7
|
||||
clr a
|
||||
; src/sbus.c:49: }
|
||||
ljmp __gptrput
|
||||
.area CSEG (CODE)
|
||||
.area CONST (CODE)
|
||||
_DEFAULT_ADDR:
|
||||
.db #0xe7 ; 231
|
||||
.db #0xe7 ; 231
|
||||
.db #0xe7 ; 231
|
||||
.db #0xe7 ; 231
|
||||
.db #0xc2 ; 194
|
||||
.area XINIT (CODE)
|
||||
.area CABS (ABS,CODE)
|
||||
Reference in New Issue
Block a user