You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

161 lines
3.7 KiB

#CC-RL Compiler RL78 Assembler Source
#@ CC-RL Version : V1.15.00 [06 Dec 2024]
#@ Commmand :
#@ -cpu=S3
#@ -S
#@ -Olite
#@ -I .
#@ -asm_path=tmp
#@ r_cg_timer_user.c
#@ compiled at Tue Sep 15 15:34:42 2026
.PUBLIC _g_tau1_ch5_width
.PUBLIC _R_TAU1_Channel5_CaptureReset
.PUBLIC _R_TAU1_Channel5_GetLowWidthTicks
.PUBLIC _R_TAU1_Channel5_CaptureOverflowed
.SECTION .text,TEXT
_r_tau1_channel5_interrupt@1 .vector 0x006E
.TYPE _r_tau1_channel5_interrupt@1,function,.LFE1-_r_tau1_channel5_interrupt@1
_r_tau1_channel5_interrupt@1:
.STACK _r_tau1_channel5_interrupt@1 = 14
push ax
push bc
push de
push hl
push hl
movw ax, !0x01EA
shrw ax, 0x01
onew ax
bnc $.BB@LABEL@1_4
.BB@LABEL@1_1: ; if_then_bb
addw ax, !0xFF7A
movw bc, ax
clrw ax
sknc
.BB@LABEL@1_2: ; if_then_bb
incw ax
.BB@LABEL@1_3: ; if_then_bb
incw ax
br $.BB@LABEL@1_6
.BB@LABEL@1_4: ; if_else_bb
addw ax, !0xFF7A
movw bc, ax
clrw ax
sknc
.BB@LABEL@1_5: ; if_else_bb
incw ax
.BB@LABEL@1_6: ; if_else_bb
movw !LOWW(_g_tau1_ch5_width+0x00002), ax
movw ax, bc
movw !LOWW(_g_tau1_ch5_width), ax
mov a, 0xFFF07
shrw ax, 8+0x00000
shrw ax, 0x01
bnc $.BB@LABEL@1_10
.BB@LABEL@1_7: ; if_then_bb17
mov a, !LOWW(_g_tau1_ch5_capture_head@2)
inc a
and a, #0x0F
mov [sp+0x00], a
cmp a, !LOWW(_g_tau1_ch5_capture_tail@3)
bz $.BB@LABEL@1_9
.BB@LABEL@1_8: ; if_then_bb30
mov a, !LOWW(_g_tau1_ch5_capture_head@2)
mov x, #0x04
mulu x
addw ax, #LOWW(_g_tau1_ch5_low_ticks@1)
movw de, ax
movw bc, !LOWW(_g_tau1_ch5_width+0x00002)
movw hl, !LOWW(_g_tau1_ch5_width)
movw ax, bc
movw [de+0x02], ax
movw ax, hl
movw [de], ax
mov a, [sp+0x00]
mov !LOWW(_g_tau1_ch5_capture_head@2), a
br $.BB@LABEL@1_10
.BB@LABEL@1_9: ; if_else_bb36
oneb !LOWW(_g_tau1_ch5_capture_overflow@4)
.BB@LABEL@1_10: ; return
pop ax
pop hl
pop de
pop bc
pop ax
reti
.LFE1:
.SECTION .textf,TEXTF
.TYPE _R_TAU1_Channel5_CaptureReset,function,.LFE2-_R_TAU1_Channel5_CaptureReset
_R_TAU1_Channel5_CaptureReset:
.STACK _R_TAU1_Channel5_CaptureReset = 4
clrb !LOWW(_g_tau1_ch5_capture_head@2)
clrb !LOWW(_g_tau1_ch5_capture_tail@3)
clrb !LOWW(_g_tau1_ch5_capture_overflow@4)
clrw ax
movw !LOWW(_g_tau1_ch5_width+0x00002), ax
movw !LOWW(_g_tau1_ch5_width), ax
ret
.LFE2:
.TYPE _R_TAU1_Channel5_GetLowWidthTicks,function,.LFE3-_R_TAU1_Channel5_GetLowWidthTicks
_R_TAU1_Channel5_GetLowWidthTicks:
.STACK _R_TAU1_Channel5_GetLowWidthTicks = 6
push ax
or a, x
bz $.BB@LABEL@3_3
.BB@LABEL@3_1: ; if_break_bb
mov a, !LOWW(_g_tau1_ch5_capture_tail@3)
cmp a, !LOWW(_g_tau1_ch5_capture_head@2)
bz $.BB@LABEL@3_3
.BB@LABEL@3_2: ; if_then_bb11
mov a, !LOWW(_g_tau1_ch5_capture_tail@3)
mov x, #0x04
mulu x
addw ax, #LOWW(_g_tau1_ch5_low_ticks@1)
movw de, ax
movw ax, [de+0x02]
movw bc, ax
movw ax, [de]
movw de, ax
movw ax, [sp+0x00]
xchw ax, de
movw [de], ax
movw ax, bc
movw [de+0x02], ax
mov a, !LOWW(_g_tau1_ch5_capture_tail@3)
inc a
and a, #0x0F
mov !LOWW(_g_tau1_ch5_capture_tail@3), a
oneb a
pop bc
ret
.BB@LABEL@3_3: ; bb25
clrb a
pop bc
ret
.LFE3:
.TYPE _R_TAU1_Channel5_CaptureOverflowed,function,.LFE4-_R_TAU1_Channel5_CaptureOverflowed
_R_TAU1_Channel5_CaptureOverflowed:
.STACK _R_TAU1_Channel5_CaptureOverflowed = 4
mov a, !LOWW(_g_tau1_ch5_capture_overflow@4)
ret
.LFE4:
.SECTION .data,DATA
.ALIGN 2
.TYPE _g_tau1_ch5_width,object,4
_g_tau1_ch5_width:
.DS (4)
.TYPE _g_tau1_ch5_capture_head@2,object,1
_g_tau1_ch5_capture_head@2:
.DS (1)
.TYPE _g_tau1_ch5_capture_tail@3,object,1
_g_tau1_ch5_capture_tail@3:
.DS (1)
.TYPE _g_tau1_ch5_capture_overflow@4,object,1
_g_tau1_ch5_capture_overflow@4:
.DS (1)
.SECTION .bss,BSS
.ALIGN 2
.TYPE _g_tau1_ch5_low_ticks@1,object,64
_g_tau1_ch5_low_ticks@1:
.DS (64)