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

📄 cksum.s

📁 一款类linux的操作系统源码
💻 S
字号:
/* *  Roadrunner/pk *    Copyright (C) 1989-2001  Cornfed Systems, Inc. * *  The Roadrunner/pk operating system is free software; you can *  redistribute and/or modify it under the terms of the GNU General *  Public License, version 2, as published by the Free Software *  Foundation. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public *  License along with this program; if not, write to the Free *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *  MA 02111-1307 USA * *  More information about the Roadrunner/pk operating system of *  which this file is a part is available on the World-Wide Web *  at: http://www.cornfed.com. * */	.file		"cksum.s"	.text	.align		2	.globl		cksumcksum:	pushl		%ebp	movl		%esp,%ebp	movl		8(%ebp),%edx	movl		12(%ebp),%ecx	xorl		%eax,%eax /* Clear sum */	testl		%ecx,%ecx			jle		L4	sarl		$6,%ecx	je		L5L7:	clc	addl		(%edx),%eax	adcl		4(%edx),%eax	adcl		8(%edx),%eax	adcl		12(%edx),%eax	adcl		16(%edx),%eax	adcl		20(%edx),%eax	adcl		24(%edx),%eax	adcl		28(%edx),%eax	adcl		32(%edx),%eax	adcl		36(%edx),%eax	adcl		40(%edx),%eax	adcl		44(%edx),%eax	adcl		48(%edx),%eax	adcl		52(%edx),%eax	adcl		56(%edx),%eax	adcl		60(%edx),%eax	adcl		$0,%eax	addl		$64,%edx	decl		%ecx	ja		L7L5:	movl		12(%ebp),%ecx	andl		$0x3f,%ecx	sarl		$2,%ecx		jle		L4L3:	clc	addl		(%edx),%eax	adcl		$0,%eax	addl		$4,%edx	decl		%ecx	ja		L3L4:	movl		12(%ebp),%ecx	andl		$2,%ecx	jz		L1	movzwl		(%edx),%ecx	addl		%ecx,%eax	addl		$2,%edxL1:	movl		12(%ebp),%ecx	andl		$1,%ecx	jz		L2	xorl		%ecx,%ecx	movb		(%edx),%cl	addl		%ecx,%eaxL2:	movl		%eax,%ecx	shrl		$16,%eax	andl		$0xffff,%eax	andl		$0xffff,%ecx	addl		%ecx,%eax	movl		%eax,%ecx	shrl		$16,%eax	addl		%ecx,%eax	notw		%ax	movzwl		%ax,%eax	leave	ret

⌨️ 快捷键说明

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