📄 _strrchr.asm
字号:
;--------------------------------------------------------
; File Created by SDCC : FreeWare ANSI-C Compiler
; Version 2.3.1-pj3 Sun Jan 20 13:10:00 2002
;--------------------------------------------------------
.module _strrchr
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _strrchr_PARM_2
.globl _strrchr
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
.area DSEG (DATA)
;--------------------------------------------------------
; overlayable items in internal ram
;--------------------------------------------------------
.area OSEG (OVR,DATA)
_strrchr_PARM_2::
.ds 1
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
.area ISEG (DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
.area BSEG (BIT)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
.area XSEG (XDATA)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
.area XISEG (XDATA)
;--------------------------------------------------------
; 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 'strrchr'
;------------------------------------------------------------
; _strrchr.c 27
; -----------------------------------------
; function strrchr
; -----------------------------------------
_strrchr:
ar2 = 0x02
ar3 = 0x03
ar4 = 0x04
ar5 = 0x05
ar6 = 0x06
ar7 = 0x07
ar0 = 0x00
ar1 = 0x01
; _strrchr.c 0
; genReceive
mov r2,dpl
mov r3,dph
mov r4,b
; _strrchr.c 32
; genAssign
mov ar5,r2
mov ar6,r3
mov ar7,r4
; _strrchr.c 34
; genAssign
00101$:
; genPointerGet
; genGenPointerGet
mov dpl,r2
mov dph,r3
mov b,r4
lcall __gptrget
mov r0,a
; genPlus
; genPlusIncr
inc r2
cjne r2,#0x00,00116$
inc r3
00116$:
; genIfx
mov a,r0
; genIfxJump
; Peephole 109 removed ljmp by inverse jump logic
jnz 00101$
00117$:
; _strrchr.c 37
; genAssign
00105$:
; genMinus
; genMinusDec
dec r2
cjne r2,#0xff,00118$
dec r3
00118$:
; genCmpEq
mov a,r2
cjne a,ar5,00119$
mov a,r3
cjne a,ar6,00119$
mov a,r4
cjne a,ar7,00119$
; Peephole 132 changed ljmp to sjmp
sjmp 00107$
00119$:
; genPointerGet
; genGenPointerGet
mov dpl,r2
mov dph,r3
mov b,r4
lcall __gptrget
; genCmpEq
; Peephole 105 removed redundant mov
mov r0,a
; Peephole 132 changed ljmp to sjmp
; Peephole 199 optimized misc jump sequence
cjne a,_strrchr_PARM_2,00105$
;00120$:
; Peephole 200 removed redundant sjmp
00121$:
00107$:
; _strrchr.c 40
; genPointerGet
; genGenPointerGet
mov dpl,r2
mov dph,r3
mov b,r4
lcall __gptrget
; genCmpEq
; Peephole 105 removed redundant mov
mov r5,a
; Peephole 132 changed ljmp to sjmp
; Peephole 199 optimized misc jump sequence
cjne a,_strrchr_PARM_2,00109$
;00122$:
; Peephole 200 removed redundant sjmp
00123$:
; _strrchr.c 41
; genRet
mov dpl,r2
mov dph,r3
mov b,r4
; Peephole 132 changed ljmp to sjmp
sjmp 00110$
00109$:
; _strrchr.c 43
; genRet
; Peephole 181 used 16 bit load of dptr
mov dptr,#0x0000
mov b,#0x00
00110$:
ret
.area CSEG (CODE)
.area XINIT (CODE)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -