flat assembler
Message board for the users of flat assembler.

flat assembler > Main > Fasmg for generation fasm text.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 476
Did can use fasmg for generation text ?

For example psevdo code:
Code:
t1 'Run'
t2 'Stop'
t3 'Pause'

c= 0
;this write like text in file
l1:
IDC_t1_c
c=c+1
t1=t1+1
if c>=4 then end loop
loop l1
    

Interesting see how this psevdo code look in fasmg ?

In out put file must have this text.
Code:
IDC_Run0
IDC_Stop1
IDC_Pause2
    

Then i simple include this text in fasm 1.73 my project.

Its simple example.
But this method can create big text files and generate more complex text.
Post 27 Feb 2019, 07:04
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 476
Or this.
For example psevdo code:
Code:
t1 'Run'
t2 'Stop'
t3 'Pause'
t10 'One'
t11 'Two'
t12 'Three'

c= 0

l1:
%out IDC_t1_t12   ;this write like text in file
c=c+1
t1=t1+1
t12=t12-1
if c>=4 then end loop
loop l1
    

Interesting see how this psevdo code look in fasmg ?

In out put file must have this text.
Code:
IDC_Run_Three
IDC_Stop_Two
IDC_Pause_One
    

Then i simple include this text in fasm 1.73 my project.
Post 27 Feb 2019, 07:24
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7300
Location: Kraków, Poland
Please take a look at fasmg as a preprocessor thread.

As for generation of purely synthetic sources, there is an example in my post about multi-pass assembly.
Post 27 Feb 2019, 07:53
View user's profile Send private message Visit poster's website 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-2019, Tomasz Grysztar.

Powered by rwasa.