_strlen.asm
来自「很少见的源码公开的msc51和z80的c编译器。」· 汇编 代码 · 共 113 行
ASM
113 行
;--------------------------------------------------------; File Created by SDCC : FreeWare ANSI-C Compiler; Version 2.3.0 Thu Sep 20 10:57:52 2001;-------------------------------------------------------- .module _strlen ;--------------------------------------------------------; Public variables in this module;-------------------------------------------------------- .globl _strlen;--------------------------------------------------------; special function registers;--------------------------------------------------------;--------------------------------------------------------; special function bits ;--------------------------------------------------------;--------------------------------------------------------; internal ram data;-------------------------------------------------------- .area _DATA;--------------------------------------------------------; overlayable items in internal ram ;-------------------------------------------------------- .area _OVERLAY;--------------------------------------------------------; indirectly addressable internal ram data;-------------------------------------------------------- .area _ISEG;--------------------------------------------------------; bit data;-------------------------------------------------------- .area _BSEG;--------------------------------------------------------; external ram data;-------------------------------------------------------- .area _XSEG;--------------------------------------------------------; global & static initialisations;-------------------------------------------------------- .area _GSINIT .area _GSFINAL .area _GSINIT;--------------------------------------------------------; Home;-------------------------------------------------------- .area _HOME .area _CODE;--------------------------------------------------------; code;-------------------------------------------------------- .area _CODE; _strlen.c 27; genLabel; genFunction; ---------------------------------; Function strlen; ---------------------------------___strlen_start:_strlen: lda sp,-2(sp); _strlen.c 31; genAssign; AOP_STK for _strlen_i_1_1 lda hl,0(sp) ld (hl),#0x00 inc hl ld (hl),#0x00; genAssign; AOP_STK for lda hl,4(sp) ld c,(hl) inc hl ld b,(hl); genLabel00101$:; genPointerGet ld a,(bc); genPlus; genPlusIncr inc bc; genIfx or a,a jp z,00103$; _strlen.c 32; genPlus; AOP_STK for _strlen_i_1_1; genPlusIncr lda hl,0(sp) inc (hl) jr nz,00108$ inc hl inc (hl)00108$:; genGoto jp 00101$; genLabel00103$:; _strlen.c 34; genRet; AOP_STK for _strlen_i_1_1 lda hl,0(sp) ld e,(hl) inc hl ld d,(hl); genLabel00104$:; genEndFunction lda sp,2(sp) ret___strlen_end: .area _CODE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?