Hi!
I'm writting some library in include file for Windows apps.
This include will contain code, data and bss section contents.
In
NASM I can wtite:
[section .data]
MyStr db 'Hello World',0
[section .bss]
MyData resb 100
[section .text]
mov eax,MyStr
mov edx,MyData
ret
__SECT__ ; return to original section
Then I can include this file almost at any line of main source file (before entry point or after main code).
But if I want to write something like this for
fasm I don't see any tools to do this quite easily
I see only these ways:
1. Make 2 of 3 include files like 'MyLib_code.inc', 'MyLib_data.inc', 'MyLib_bss.inc' and include them at different lines of main source code:
include 'win32axp.inc'
.code
; here my code
include 'MyLib_code.inc'
.data
; here my data
include 'MyLib_data.inc'
include 'MyLib_bss.inc'
2. Place code, data and bss into macroses and call them in main source code:
include 'win32axp.inc'
include 'MyLib.inc'
.code
; here my code
MyLib_Code
.data
; here my data
MyLib_Data
MyLib_BSS
I can't use
.data and
.code macroses multiple times in fasm
Is there more convenient way to do this in
fasm ???