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

📄 getarg.s

📁 Version 6 Unix 核心源代码 Version 6 Unix 核心源代码
💻 S
字号:
/ call getarg(n, array [, nword] )// fill in the array with the n-th argument to the routine./ array is integer./ n counts from 1 for the file name (first) arg/ if nword is specifies it gives the max number/ of words to fill in/ If no nword is given the array ends with at least one blank./ if nword is given the array is blank-padded to that length./ iargc(dummy) returns the number of arguments/ (1-origin).globl	getarg., iargc..globl	retrn, temp.comm	argp,2getarg.:	temp	.+2	mov	$512.,r2	cmp	*2(sp),$3	blt	1f	mov	6(r3),r2	mov	2(r2),r2	asl	r2	asl	r21:	mov	4(r3),r4	mov	2(r3),r1	mov	2(r1),r1	mov	argp,r0	cmp	r1,(r0)	bgt	1f	asl	r1	add	r0,r1	mov	(r1),r12:	tst	r2	ble	1f	movb	(r1)+,(r4)+	beq	2f	dec	r2	br	2b2:	dec	r41:	movb	$' ,(r4)+	dec	r2	bit	$3,r2	bne	1b	cmp	r2,$256.	bge	1f	tst	r2	bgt	1b1:	jmp	retrniargc.:	temp	.+2	clr	temp	mov	*argp,temp+2	jmp	retrn

⌨️ 快捷键说明

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