lmodt.s

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

S
59
字号
	.data|	.asciz	"@(#)lmodt.s 1.1 92/07/30 Copyr 1983 Sun Micro"	.even	.text|	Copyright (c) 1983 by Sun Microsystems, Inc.#include "PIC.h"#include "DEFS.h"	.globl	lmodt, ulmodtdiv_neg_a:	| the dividend is negative: make it positive;	| make sure the divisor is positive, too	| remainder takes sign of dividend	negl	d0	tstl	d1	bges	1$	    negl	d11$:	bsrs	div_recall	negl	d0	rtsdivide_by_zero:	| the divisor is zero. if we're going to dump core,	| lets put down a link, so that adb will grot our core image	link	a6,#0	divu	d1, d0	| BOOM!	unlk	a6	rtsulmodt:	| ENTRYPOINT FOR UNSIGNED REMAINDERING	| arguments in d0, d1	| return remainder in d0, garbage in d1	LINK	RTMCOUNT#ifdef PROF	unlk a6#endif PROF	tstl	d1	beqs	divide_by_zero	bras	div_recalllmodt:	| ENTRYPOINT FOR SIGNED REMAINDERING	| receive arguments in d0, d1	| return remainder in d0, garbage in d1	LINK	RTMCOUNT#ifdef PROF	unlk a6#endif PROF	tstl	d0	blts	div_neg_a	| dont't deal with signs here	tstl	d1	beqs	divide_by_zero	bges	div_recall	    negl	d1	| sign of divisor unimportantdiv_recall:#define REM 1#include "divide.include"

⌨️ 快捷键说明

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