⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strncat.s

📁 ICCAVR中所有的库函数源码
💻 S
字号:
.area text
;
; char *strncat(char *dst, char *src, size_t bytes)
;
_strncat::
	ldd	R24,Y+0	; load length
	ldd	R25,Y+1
	cpi	R24,0
	cpc	R25,R24
	 breq	strncatx	; length == 0
	mov	R27,R17	; move pointers
	mov	R26,R16
	mov	R31,R19
	mov	R30,R18
strncat1:			; find end of dst
	ld	R18,X+
	tst	R18
	 brne	strncat1	; dst has more ...
	sbiw	R26,1		; let X point to 0-byte
strncat2:			; copy
	ld	R18,Z+
	st	X+,R18
	tst	R18
	 breq	strncatx	; no more ...
	sbiw	R24,1
	 brne	strncat2	; there is more ...
	ldi	R18,0		; or not
	st	X,R18		;
strncatx:
	ret
;
;<eof; 2003-07-31 ja>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -