flat assembler
Message board for the users of flat assembler.

Index > Windows > My question about section.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1618
Roman 19 Aug 2020, 08:58
How do right ?
My question is this normal to do that ?
Code:
format PE GUI 4.0
entry Start
section data
section code
Start:
   macro Ar  { ... }
   struc Bear { ... }
 Ar 
    


Last edited by Roman on 19 Aug 2020, 09:19; edited 1 time in total
Post 19 Aug 2020, 08:58
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19876
Location: In your JS exploiting you and your system
revolution 19 Aug 2020, 09:03
What do you mean by "normal"?

In Windows you will likely need an imports table. That appears to be missing in your example.
Post 19 Aug 2020, 09:03
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1618
Roman 19 Aug 2020, 09:20
My parse write in file InitAll.asm. In this file might be macro or struc and Call !
After i want do this:
Code:
format PE GUI 4.0
entry Start
section data
section code
Start:
   include 'InitAll.asm'
 Ar 
    

I interesting will it create any problems for the compiler ?

I know macro not defined if write:
Code:
 Ar
macro Ar { ... }
    

But struc work fine:
Code:
struc aaa { dd 0 }
mov dword [zip],11
some code
zip aaa
    
Post 19 Aug 2020, 09:20
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3892
Location: vpcmipstrm
bitRAKE 19 Aug 2020, 23:33
The order of sections is not important. Defining data before use by code would only save a single pass of the assembler in most cases. If you are creating an automated process there is no reason not to order by definition/use.
Post 19 Aug 2020, 23:33
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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.