flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 12 Jul 2014, 08:12
fasm automatically sets this flag when you put only the uninitialized data into your section, i.e. the definitions like "rb 100", "db ?", etc.
|
|||
![]() |
|
sometimes 12 Jul 2014, 08:15
thx for answer
but I can not manage sections directly, simply by writing the desired value in Hex (like 0C0000040h) more controllability is good idea ![]() |
|||
![]() |
|
DOS386 12 Jul 2014, 09:29
> more controllability is good idea
use format binary for ultimate controllability (check out 2014 files) |
|||
![]() |
|
sometimes 12 Jul 2014, 09:55
DOS386, it's a really good idea, thank you.
But I'm still interested to understand the FASM source code, could you show where is FASM writing IMAGE_SECTION_HEDER.Characteristics? I think that somewhere inside FORMATS.INC ![]() |
|||
![]() |
|
DOS386 12 Jul 2014, 10:10
> I think that somewhere inside FORMATS.INC
YES Code: pe_entry_init_ok: and [number_of_sections],0 movzx ebx,word [edx+14h] lea ebx,[edx+18h+ebx] mov [current_section],ebx mov dword [ebx],'.fla' mov dword [ebx+4],'t' mov [ebx+14h],edi mov [ebx+0Ch],eax mov dword [ebx+24h],0E0000060h ; <<<--- HERE Poke in hardcoded value and later patch it as needed :-\ |
|||
![]() |
|
sometimes 12 Jul 2014, 10:18
No, I plan normal modes, without repeated FASM rebuilding, and add some commands to the parser
Code: mov dword [ebx+24h],0E0001060h Аnd as I understand it's about ".flat" section only, it is not suitable if I write.. Code: section 'some' code executable writeable |
|||
![]() |
|
Tomasz Grysztar 12 Jul 2014, 12:21
In TABLES.INC, in the symbols data structure you can find entries for "code" and "data" flags:
Code: db 'code',19h,5 Code: db 'data',19h,6 The byte 19h is fasm's internal code for PE section flags, the second byte is the number of bit corresponding to the flag. So you could define the new "udata" flag by inserting this new line into "symbols_5" table: Code: db 'udata',19h,7 |
|||
![]() |
|
sometimes 12 Jul 2014, 13:52
Tomasz Grysztar, this is what I need. thx twice
|
|||
![]() |
|
SokilOff 13 Jul 2014, 01:01
Tomasz Grysztar wrote: So you could define the new "udata" flag by inserting this new line into "symbols_5" table: Maybe it's even worth to be added in the next FASM version. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.