flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 21 May 2005, 17:30
there isn't anything line inline macro in FASM.
But generally: eax = GetRValue(eax); -> and eax,0FFh eax = GetGValue(eax); -> shr eax,8; and eax,0FFh eax = GetBValue(eax); -> shr eax,16; and eax,0FFh eax = GetRValue([variable]); -> movzx eax,byte [variable] eax = GetGValue([variable]); -> movzx eax,byte [variable+1] eax = GetBValue([variable]); -> movzx eax,byte [variable+2] |
|||
![]() |
|
bogdanontanu 21 May 2005, 18:00
However in TASM it would look like this:
GetRValue MACRO aRGB mov eax,aRGB and eax,0ffh ENDM GetGValue MACRO aRGB mov eax,aRGB shr eax,8 and eax,0ffh ENDM GetBValue MACRO aRGB mov eax,aRGB shr eax,16 and eax,0ffh ENDM And if you do not need the return in EAX you could do the operations directly on aRGB argument. |
|||
![]() |
|
Nikolay Petrov 22 May 2005, 17:24
"<<" -> shl
">>" -> shr char -> byte short -> word .... basic C programing Prevision post take it details |
|||
![]() |
|
RedGhost 23 May 2005, 16:52
Nickolay wrote: "<<" -> shl just had never used >> or << in c, thanks guys! |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.