strcat.s

来自「操作系统SunOS 4.1.3版本的源码」· S 代码 · 共 31 行

S
31
字号
	.data/*	.asciz "@(#)strcat.s 1.1 92/07/30 SMI"	*/	.text#include "DEFS.h"| Usage: strcat(s1, s2)| Concatenate s2 on the end of s1.  S1's space must be large enough.| Return s1.ENTRY(strcat)	movl	PARAM,a0	| s1	movl	PARAM2,a1	| s2	movl	a0,d0		| return s1 at the end	moveq	#-1,d1		| count of 65535| The following loop runs in loop mode on 680101$:	tstb	a0@+		| find the terminating null for s1	dbeq	d1,1$	bne	1$		| not zero yet - keep going	subql	#1,a0		| point to the null	moveq	#-1,d1		| count of 65535| The following loop runs in loop mode on 680102$:	movb	a1@+,a0@+	| move byte from s2 to s1	dbeq	d1,2$	bne	2$		| if zero byte not seen, continue	RET

⌨️ 快捷键说明

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