
汇编代码
文章平均质量分 67
alphabuilder
体验优雅编程之美...
展开
-
TAlpha::Negative 部分汇编
Width *= 3; register const int ld = iLineAdd + Width; Width >>= 1; Width--; for (register int i = Height - 1; i >= 0; i--) { register unsigned short int *p原创 2012-05-28 10:39:56 · 410 阅读 · 0 评论 -
TAlpha::FillSolidColor 部分汇编
for (i = Width - 1; i >= 0; i--) { *((unsigned short int *)ptrDest) = *((unsigned short int *)b原创 2012-05-28 10:38:53 · 425 阅读 · 0 评论 -
内联汇编优化的TAlpha::FillSolidColor 部分汇编
if ((lr & 1) == 1) { asm { cld } lr >>= 1; for (; i >= 0; i--) { //memcpy(ptrDest, ptrBuffer, lr); asm { mov ecx, 1 mov esi, ptrB原创 2012-06-09 15:24:04 · 490 阅读 · 0 评论 -
内联汇编优化的TAlpha::Mask 部分汇编
内联汇编优化版 #ifdef _calpha_using_inlineasm_ i = Height - 1; if (i < 0) return; __asm { mov ecx, Width mov eax, ptrDest mov edx, ptrSrc mov esi, i原创 2012-06-14 13:21:15 · 758 阅读 · 0 评论 -
void Mask_1 - gcc汇编
void Mask_1(unsigned char * const ptrDestBuffer, const unsigned char * const ptrSrcBuffer, int Width, int Height, int idLineAdd, int isLineAdd, int idPixelAdd, int isPixelAdd, int MaskColor){ cons原创 2012-06-17 19:41:04 · 542 阅读 · 0 评论 -
gcc内联汇编将结构体成员清零
typedef struct tagstru{ int a; int b; int c;}stru; stru sa; sa.a = 0x123; sa.b = 0x456; sa.c = 0x789; printf("stru: a=%d b=%d c=%d\n", sa.a, sa.b, sa.c); __asm__ __volati原创 2012-06-26 17:49:49 · 1037 阅读 · 0 评论 -
__declspec(naked) int add(int a, int b)
__declspec(naked) int add(int a, int b){ _asm { mov eax, dword ptr [esp + 0x4] add eax, dword ptr [esp + 0x8] ret }}因为函数开头没有push ebp mov ebp, espebp没有入栈,所以函数参数原创 2013-08-12 10:45:35 · 536 阅读 · 0 评论