test3.cpp

来自「一份MD5算法的C代码和优化后的MD5汇编代码.」· C++ 代码 · 共 38 行

CPP
38
字号
// test3.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#define a esi
#define b edi
#define c edx
#define d ebx
#define tmp1 eax
#define tmp2 ecx

#define FF(a, b, c, d, x, s, ac) \
	__asm mov tmp1,b \
	__asm and tmp1,c \
	__asm mov tmp2,b \
	__asm not tmp2 \
	__asm and tmp2,d \
	__asm or tmp2,tmp1 \
	__asm lea a,[tmp2+a+ac] \
	__asm add a,x \
	__asm rol a,s \
	__asm add a,b \

int main(int argc, char* argv[])
{
	unsigned int x=0;

	__asm mov a,0x1
	__asm mov b,0x2
	__asm mov c,0x3
	__asm mov d,0x4

	FF(a, b, c, d, x, 0, 0);

	return 0;
}

⌨️ 快捷键说明

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