flat assembler
Message board for the users of flat assembler.
Index
> Main > [fasmg] $ = $ - 123 |
Author |
|
Tomasz Grysztar 03 Aug 2017, 19:01
STORE is the only way to modify already assembled data. But you could use some nice wrapper macro to make this less clunky:
Code: macro at? address virtual at address macro end?.at? local buffer,size load buffer:$-$$ from $$ end virtual store buffer:lengthof buffer at address purge end?.at? end macro end macro Code: ; example of use: repeat 256 db %-1 end repeat at 30h db 'test' dd 0 end at Code: macro at? target local place,addr match space:address, target virtual at address else virtual at target end match macro end?.at? local buffer,size load buffer:$-$$ from $$ end virtual store buffer:lengthof buffer at target purge end?.at? end macro end macro Code: ; example of use: first:: repeat 128 db %-1 end repeat org 0 second:: repeat 128 db %-1 end repeat at first:30h db 'test' dd 0 end at |
|||
03 Aug 2017, 19:01 |
|
_shura 03 Aug 2017, 23:05
ohai,
thank you, but I solved it a bit different now. With virtuals too, but in a non-generic way. I do not overwrite existing data, I create data only if finally done. Anyway, I like your solution too^^, but it could be a nice-to-have if I just have to set another value to $/$% to change the position. |
|||
03 Aug 2017, 23:05 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.