flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Resolve fasm.dll symbols by myself? |
Author |
|
bitRAKE 17 Jul 2021, 14:29
Because of the speed (and complexity) of fasm - it's actually better to append symbolic definitions as plain text, imho. If there is a concern of size - like a large number of constants - then maybe inject through fasm FILE support as binary.
fasm core goes to the system support routines to request the file. If you designed a specific syntax that would reference memory directly. This could be completely accomplished with the system support without touching fasm core, imho. Within your pre-assembly code you'd access constants from the loaded 'file' in a VIRTUAL region with the LOAD directive. Hola! Yo hablo poquito Espanol. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
17 Jul 2021, 14:29 |
|
Yuki 18 Jul 2021, 16:50
That is a really smart idea, but when of FASM Macros it's about, i am a complety newie guy, i just used the standard fasm library macros and i don't know how those works.
i was awake tonight studying the source code of fasm, i found the section in wich i could invoke the callback with the name of undefined symbol. I think i'm going to return the undefined symbol name in the FASM_STATE structure and just append the symbol with its value over the plain text... i.e. i will recall fasm_Assemble every time that i get a new undefined symbol I tried to define a symbol by myself, but the fasm functions works under a very specific context that i can't replicate within a simple procedure. Well, at least was funny |
|||
18 Jul 2021, 16:50 |
|
bitRAKE 18 Jul 2021, 18:49
Code: virtual at 0 CheatEngine:: file '$CheatEngine$' ; custom file handling would: ; + intercept special '$CheatEngine$' name and return a psuedo-handle ; (note: values with high-bit set should not collide with real file handles) ; + intercept special psuedo-handle for read and copy data from memory end virtual struc CEConst offset { load . from CheatEngine:offset } const123 CEConst 123 Really, not that complex. I have created a more complex patch with a custom address space: https://board.flatassembler.net/topic.php?p=215013#215013 ...this shows the patch working... https://github.com/bitRAKE/fasm_playground/blob/reloc/TESTS/__reloc/t0.asm This would be another way to go - skipping the pseudo-file trickery. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
18 Jul 2021, 18:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.