flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 19 Jun 2015, 14:04
When using "local" in macros they are not declaring variables, instead they are just label names that are local to the macro context.
fasm does not support ror in the expression parser. You would have to simulate it with "shl", "shr" and "or". Code: macro rotr addr { mov eax,((addr shr 0x1d) and 0xffffffff) or ((addr shl (0x20 - 0x1d)) and 0xffffffff) } |
|||
![]() |
|
blh42 19 Jun 2015, 15:11
Ah right. So then what am I doing wrong with the rotl?
Code: macro rotr dst,src,shift { mov dst,((src shr shift) and 0xffffffff) or ((src shl (0x20 - shift)) and 0xffffffff) } macro rotl dst,src,shift { mov dst,((src shl shift) and 0xffffffff) or ((src shr (0x20 - shift)) and 0xffffffff) } It doesnt seem to produce the result im expecting :S blh |
|||
![]() |
|
revolution 19 Jun 2015, 17:26
What values and results did you get? I can't see anything obviously wrong.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.