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

📄 product.asm

📁 嵌入式系统基础课件
💻 ASM
字号:
		SECTION	.text
		ALIGN	16
		BITS	32

		GLOBAL	_Product
_Product:	

	; Function prototype:
	; -------------------
	;	long long Product64(long long A, long long B) ;
	;
	; Function description:
	; ---------------------
	;	Returns the product of integers "A" and "B".
	; 	The first byte of "A" is located at [ESP+4]
	;	The first byte of "B" is located at [ESP+12]
	;
	; Note:
	; -----
	;	You may use registers EAX, ECX, and EDX	without
	;	worrying about preserving their original contents.
	;	However, you must preserve and restore the contents
	;	of any other register you modify.
	;
	; Step 1:
	; -------
	;	Form the 64-bit unsigned product AL x BH, where
	;	"AL" refers to the "Least-Significant Word of A" and
	;	"BH" refers to the "Most-Significant Word of B".
	;	(Each 64-bit integer consists of two 32-bit "words".)
	;
	; Step 2:
	; -------
	;	Form the 64-bit unsigned product AH x BL.
	;
	; Step 3:
	; -------
	;	Form the 32-bit sum of the LSW's of the two products
	;	produced in steps 1 and 2.
	;
	; Step 4:
	; -------
	;	Form the 64-bit product AL x BL
	;
	; Step 5:
	; -------
	;	Add the 32-bit sum developed in Step 3 to the MSW of
	;	the 64-bit product developed in Step 4.
	;
	; The 64-bit result must be left in registers EDX.EAX,
	; with the MSW in EDX and the LSW in EAX.

		RET		; Return to calling program.

⌨️ 快捷键说明

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