📄 _strspn.asm
字号:
;--------------------------------------------------------; File Created by SDCC : FreeWare ANSI-C Compiler; Version 2.3.0 Thu Sep 20 10:57:28 2001;-------------------------------------------------------- .module _strspn ;--------------------------------------------------------; Public variables in this module;-------------------------------------------------------- .globl _strspn_PARM_2 .globl _strspn;--------------------------------------------------------; special function registers;--------------------------------------------------------;--------------------------------------------------------; special function bits ;--------------------------------------------------------;--------------------------------------------------------; internal ram data;-------------------------------------------------------- .area DSEG (DATA)_strspn_sloc0_1_0:: .ds 1_strspn_sloc1_1_0:: .ds 3;--------------------------------------------------------; overlayable items in internal ram ;-------------------------------------------------------- .area OSEG (OVR,DATA);--------------------------------------------------------; indirectly addressable internal ram data;-------------------------------------------------------- .area ISEG (DATA);--------------------------------------------------------; bit data;-------------------------------------------------------- .area BSEG (BIT);--------------------------------------------------------; external ram data;-------------------------------------------------------- .area XSEG (XDATA)_strspn_PARM_2:: .ds 3_strspn_string_1_1:: .ds 3;--------------------------------------------------------; 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 'strspn';------------------------------------------------------------;sloc0 Allocated to in memory with name '_strspn_sloc0_1_0';sloc1 Allocated to in memory with name '_strspn_sloc1_1_0';control Allocated to in memory with name '_strspn_PARM_2';string Allocated to in memory with name '_strspn_string_1_1';count Allocated to in memory with name '_strspn_count_1_1';ch Allocated to in memory with name '_strspn_ch_1_1'; _strspn.c 27; -----------------------------------------; function strspn; -----------------------------------------_strspn: ar2 = 0x02 ar3 = 0x03 ar4 = 0x04 ar5 = 0x05 ar6 = 0x06 ar7 = 0x07 ar0 = 0x00 ar1 = 0x01; _strspn.c 43 push b push dph push dpl mov dptr,#_strspn_string_1_1 pop acc movx @dptr,a pop acc inc dptr movx @dptr,a pop acc inc dptr movx @dptr,a; _strspn.c 35 mov dptr,#_strspn_PARM_2 movx a,@dptr mov r2,a inc dptr movx a,@dptr mov r3,a inc dptr movx a,@dptr mov r4,a mov r5,#0x00 mov r6,#0x00 mov dptr,#_strspn_string_1_1 movx a,@dptr mov r7,a inc dptr movx a,@dptr mov r0,a inc dptr movx a,@dptr mov r1,a00104$: mov dpl,r7 mov dph,r0 mov b,r1 lcall __gptrget mov _strspn_sloc0_1_0,a inc dptr mov r7,dpl mov r0,dph mov a,_strspn_sloc0_1_0 jnz 00112$ ljmp 00106$00112$:; _strspn.c 36 mov dptr,#_strchr_PARM_2 mov a,_strspn_sloc0_1_0 movx @dptr,a mov dpl,r2 mov dph,r3 mov b,r4 push ar2 push ar3 push ar4 push ar5 push ar6 push ar7 push ar0 push ar1 lcall _strchr mov _strspn_sloc1_1_0,dpl mov (_strspn_sloc1_1_0 + 1),dph mov (_strspn_sloc1_1_0 + 2),b pop ar1 pop ar0 pop ar7 pop ar6 pop ar5 pop ar4 pop ar3 pop ar2 mov a,_strspn_sloc1_1_0 orl a,(_strspn_sloc1_1_0 + 1) orl a,(_strspn_sloc1_1_0 + 2); Peephole 110 removed ljmp by inverse jump logic jz 00106$00113$:; _strspn.c 37 inc r5 cjne r5,#0x00,00114$ inc r600114$:; _strspn.c 40 mov dptr,#_strspn_string_1_1 mov a,r7 movx @dptr,a inc dptr mov a,r0 movx @dptr,a inc dptr mov a,r1 movx @dptr,a ljmp 00104$00106$:; _strspn.c 43 mov dptr,#_strspn_string_1_1 mov a,r7 movx @dptr,a inc dptr mov a,r0 movx @dptr,a inc dptr mov a,r1 movx @dptr,a mov dpl,r5 mov dph,r600107$: ret .area CSEG (CODE)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -