flat assembler
Message board for the users of flat assembler.
Index
> Windows > trouble converting C to ASM |
Author |
|
DJ Mauretto 30 Mar 2008, 18:13
Code: push 0 ; RGB = 0,0,0 push gImg call CreateMask If you Have RGB struct in bytes movzx eax,byte [Red] shl eax,16 movzx ebx,byte [Green] shl ebx,8 or eax,ebx movzx ecx,byte [Blu] or eax,ecx push eax ; EAX = 0x00RRGGBB push gImg call CreateMask |
|||
30 Mar 2008, 18:13 |
|
itsnobody 30 Mar 2008, 18:34
Just use 0x00RRGGBB instead of the RGB macro
|
|||
30 Mar 2008, 18:34 |
|
edfed 30 Mar 2008, 20:20
Code: movzx eax,[green] mov ah,[red] shl eax,8 mov al,[blue] push eax push gimg call createmask 7 lines instead of 10. are rgb encoded on bytes or dwords? cause C convention is to pass params by the stack. then, you build some equates to access them via the esp or ebp pointer. |
|||
30 Mar 2008, 20:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.