📄 mcasm.cpp
字号:
#include "stdafx.h"
#include "color.h"
int AddMB(BYTE *Curr,int Pixel)
{
_asm {
xor eax,eax
xor ebx,ebx
xor ecx,ecx
mov esi,Curr
mov ecx,MB_SIZE
SUM:
mov bl,[esi]
add eax,ebx
mov bl,1[esi]
add eax,ebx
mov bl,2[esi]
add eax,ebx
mov bl,3[esi]
add eax,ebx
mov bl,4[esi]
add eax,ebx
mov bl,5[esi]
add eax,ebx
mov bl,6[esi]
add eax,ebx
mov bl,7[esi]
add eax,ebx
mov bl,8[esi]
add eax,ebx
mov bl,9[esi]
add eax,ebx
mov bl,10[esi]
add eax,ebx
mov bl,11[esi]
add eax,ebx
mov bl,12[esi]
add eax,ebx
mov bl,13[esi]
add eax,ebx
mov bl,14[esi]
add eax,ebx
mov bl,15[esi]
add eax,ebx
add esi,Pixel
loop SUM
}
}
int AddACMB(BYTE *Curr,int Pixel,int MB_aver)
{ _asm {
mov edx,MB_aver
xor eax,eax
xor ebx,ebx
xor ecx,ecx
mov esi,Curr
mov ecx,MB_SIZE
ACSUM:
mov bl,[esi]
sub ebx,edx
jns ACSUM1
neg ebx
ACSUM1:
add eax,ebx
mov bl,1[esi]
sub ebx,edx
jns ACSUM2
neg ebx
ACSUM2:
add eax,ebx
mov bl,2[esi]
sub ebx,edx
jns ACSUM3
neg ebx
ACSUM3:
add eax,ebx
mov bl,3[esi]
sub ebx,edx
jns ACSUM4
neg ebx
ACSUM4:
add eax,ebx
mov bl,4[esi]
sub ebx,edx
jns ACSUM5
neg ebx
ACSUM5:
add eax,ebx
mov bl,5[esi]
sub ebx,edx
jns ACSUM6
neg ebx
ACSUM6:
add eax,ebx
mov bl,6[esi]
sub ebx,edx
jns ACSUM7
neg ebx
ACSUM7:
add eax,ebx
mov bl,7[esi]
sub ebx,edx
jns ACSUM8
neg ebx
ACSUM8:
add eax,ebx
mov bl,8[esi]
sub ebx,edx
jns ACSUM9
neg ebx
ACSUM9:
add eax,ebx
mov bl,9[esi]
sub ebx,edx
jns ACSUM10
neg ebx
ACSUM10:
add eax,ebx
mov bl,10[esi]
sub ebx,edx
jns ACSUM11
neg ebx
ACSUM11:
add eax,ebx
mov bl,11[esi]
sub ebx,edx
jns ACSUM12
neg ebx
ACSUM12:
add eax,ebx
mov bl,12[esi]
sub ebx,edx
jns ACSUM13
neg ebx
ACSUM13:
add eax,ebx
mov bl,13[esi]
sub ebx,edx
jns ACSUM14
neg ebx
ACSUM14:
add eax,ebx
mov bl,14[esi]
sub ebx,edx
jns ACSUM15
neg ebx
ACSUM15:
add eax,ebx
mov bl,15[esi]
sub ebx,edx
jns ACSUM16
neg ebx
ACSUM16:
add eax,ebx
add esi,Pixel
dec ecx
jnz ACSUM
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -