flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
If you work through the string backwards then you won't need to copy the string to a temporary buffer.
|
|||
![]() |
|
l_inc
redsock
As for your first issue, I totally support the revolution's suggestion. As for the second one, just put brackets around val* in your macro header. Almost forgot: and put the directive common in front of the local directive. _________________ Faith is a superposition of knowledge and fallacy |
|||
![]() |
|
redsock
Hah! Sometimes the simplest and most obvious ways to solve problems are the most elusive... haha, thx very kindly to both of you...
Here is the revised macro, much nicer: Code: macro cleartext name*, [val*] { common local .DAT,CC,I,Si,J align 16 name: dq CC .DAT: db val CC = ($ - .DAT) ; create filler for the diff db ((CC shl 2) - CC) dup 0 ; next up: walk backward through the string and promote it to 32bits I = CC - 1 J = I shl 2 repeat CC load Si byte from .DAT+I store dword Si at .DAT+J I = I - 1 J = J - 4 end repeat } ![]() ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.