flat assembler
Message board for the users of flat assembler.

Index > Main > Whear is fasm out asm text ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1718
Roman 23 Dec 2022, 06:32
When Fasmw 1.73 work with EQU, macros, Text and replaced this, then how fasm out text?
I mean memory address Whear is I taked this text, changing and gived back fasm to continue compiling to code.

Idea write in fasm mechanism give User text.
User modified text(replaced User tokens, words) and gived back fasm to continue compile text to code.
Code:
b equ 5
c equ esi
Mov %usrreg, b
Mov %usrreg, c
    

Fasm get error undefined %usrreg.
If fasm gived this text User, or put in fasm compile pipeline User code.
Then %usrreg replaced eax(for example)
Next %usrreg replaced add ebx, eax and add c(esi) .
And after fasm continue compile text to code.

This gived User do more complicated and cool stuff, after macros and preprocessing done work.

User must gived fasm code for replacing.
Code:
;in User file
%usrreg2 (Inc eax) 
%usrreg ( eax;ebx;edi)
%usrmm (mov eax, esi\\call procA;call procB)
    

First %usrreg replaced eax
Second %usrreg replaced ebx
All %usrreg2 replaced Inc eax

First %usrmm replaced mov eax, esi and call procA
Second %usrmm replaced call procB
Post 23 Dec 2022, 06:32
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.