📄 _strncpy.asm
字号:
;--------------------------------------------------------; File Created by SDCC : FreeWare ANSI-C Compiler; Version 2.3.0 Thu Sep 20 10:57:52 2001;-------------------------------------------------------- .module _strncpy ;--------------------------------------------------------; Public variables in this module;-------------------------------------------------------- .globl _strncpy;--------------------------------------------------------; 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; _strncpy.c 27; genLabel; genFunction; ---------------------------------; Function strncpy; ---------------------------------___strncpy_start:_strncpy: lda sp,-4(sp); _strncpy.c 32; genAssign; AOP_STK for ; AOP_STK for _strncpy_d1_1_1 lda hl,6(sp) ld a,(hl+) ld e,(hl) lda hl,2(sp) ld (hl+),a ld (hl),e; _strncpy.c 34; genAssign; (operands are equal 3); genAssign; AOP_STK for _strncpy_d1_1_1; AOP_STK for dec hl ld a,(hl+) ld e,(hl) lda hl,6(sp) ld (hl+),a ld (hl),e; genAssign; AOP_STK for lda hl,10(sp) ld c,(hl) inc hl ld b,(hl); genLabel00101$:; genAssign; AOP_STK for _strncpy_sloc0_1_0 lda hl,0(sp) ld (hl),c inc hl ld (hl),b; genMinus dec bc; genIfx; AOP_STK for _strncpy_sloc0_1_0 dec hl ld a,(hl+); Rule 8: Removed redundent or for (ix) or a,(hl) jp z,00103$; _strncpy.c 35; genPointerGet; AOP_STK for lda hl,8(sp) ld e,(hl) inc hl ld d,(hl) ld a,(de); genPlus; AOP_STK for ; genPlusIncr dec hl inc (hl) jr nz,00108$ inc hl inc (hl)00108$:; genAssign (pointer); AOP_STK for lda hl,6(sp) ld e,(hl) inc hl ld d,(hl) ld (de),a; genPlus; AOP_STK for ; genPlusIncr dec hl inc (hl) jr nz,00109$ inc hl inc (hl)00109$:; genGoto jp 00101$; genLabel00103$:; _strncpy.c 36; genRet; AOP_STK for _strncpy_d1_1_1 lda hl,2(sp) ld e,(hl) inc hl ld d,(hl); genLabel00104$:; genEndFunction lda sp,4(sp) ret___strncpy_end: .area _CODE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -