flat assembler
Message board for the users of flat assembler.
Index
> High Level Languages > btool |
Author |
|
AsmGuru62 19 Oct 2011, 19:57
So, if I have say a 1000 files - I must bundle all these files into one HUGE ASS text file?! Isn't it better to have a small make file (!), which will refer to a separate files and a compiler on the same line, like so:
[FASM]C:\MyFASM\Module1.Asm [FASM]C:\MyFASM\Module2.Asm [FASM]C:\MyFASM\Module3.Asm [MASM]C:\MyMASM32\Module1.Asm [MASM]C:\MyMASM32\Module2.Asm [MASM]C:\MyMASM32\Module3.Asm [C]C:\MySphinx\Module1.c [C]C:\MySphinx\Module2.c [C]C:\MySphinx\Module3.c ... etc. |
|||
19 Oct 2011, 19:57 |
|
emil 20 Oct 2011, 05:03
even if you have 1000 files and have a make tool , you will put all 1000 files names in the text file that
will be proccessed by make tool or directly put them in make tool. you still do it with my test text file , by using include statement , so you can collect all Fasm modules in one FasmInc.inc file and all Masm ,HLAasm Mingw the same way then include all those inc file in my text example and compile them by btool. not well , you can consider my test file as a main project file and include your modules as i explained. you can alos edit the link proccess in link section while you make yor source code. |
|||
20 Oct 2011, 05:03 |
|
typedef 20 Oct 2011, 13:06
AsmGuru62
Are you jealous because the 100 year old man beat you in the Marathon, on your own soil ? |
|||
20 Oct 2011, 13:06 |
|
AsmGuru62 20 Oct 2011, 15:55
Oh, so 'include' statement is there.
Then it is valuable tool! |
|||
20 Oct 2011, 15:55 |
|
emil 20 Oct 2011, 17:38
ok ,
i have changed the 'include' statement to 'AddModule'. so here is the test program . Code: [ MinGW ] extern "C" int get_int() { return 30; } [ end MinGW] [ HLAasm] #include("\HIDE\hlainc\w.hhf") procedure MyFunc; @stdcall; @external; procedure MyFunc; @nodisplay; begin MyFunc; w.MessageBox(NULL,"Hello From HLAasm","From HLAasm",w.MB_OK); end MyFunc; [ end HLAasm ] [ MASM ] $ CmpPath = "\masm32\bin" $ IncPath = "\masm32\include" $ AddIncPath = "\masm32\macros" $ AddModule FileMasm1.asm,FileMasm2.asm include windows.inc ; always first include macros.asm ; MASM support macros ; ----------------------------------------------------------------- ; include files that have MASM format prototypes for function calls ; ----------------------------------------------------------------- include masm32.inc include gdi32.inc include user32.inc include kernel32.inc ; EXTERNDEF main:PTR ;get_size PROTO ;_start: ; jmp main get_size proc mov eax, 10 ret get_size endp ;end _start [END MASM ] [ Fasm ] public get_Eax ; public start as '_start' ;extrn '_c_stdcall_display@8' as c_stdcall_display ;extrn '_c_ccall_display' as c_ccall_display ;extrn '_printf' as printf extrn 'main' as main ;start: ; jmp main get_Eax: mov eax, 20 ret [ end Fasm ] [ Link ] $ CONSOLE program $ ENTRY = start $ LibPath = "\C--\LIBS" $ AddLibPath = "Libs" $ COFF object File kernel32.lib,user32.dll,msvcrt.dll Myuser32.lib //file.obj $ OMF object File //gp.obj [ end Link ] #stack 0 #pragma option w //enable warning. #pragma option 3 //386 CPU. #include <windows.h> //#include <msvcrt.h--> #pragma option ia // allow inline asm extern stdcall get_size(); extern stdcall get_Eax(); extern stdcall MyFunc(); extern stdcall _get_int(); extern cdecl _cprintf(); #define printf _cprintf void main() { _start: EBX = get_Eax(); get_size(); printf("eax = %d\nebx = %d\n",EAX, EBX); printf("mingw = %d", _get_int()); MyFunc(); ExitProcess(0); } |
|||
20 Oct 2011, 17:38 |
|
emil 21 Oct 2011, 13:51
hi all
i have add Msvc++2003 support , when it will be solid i will post btool.exe alse btool ueses undecor.exe to undecorate symbols in object file for simplefy linking proccess. here is the link of undecor.exe http://www.masm32.com/board/index.php?topic=6518.0 here is the test program Code: [ MSVC ] extern "C" int get_Msvc() { return 900; } [ end MSVC ] [ MinGW ] $ AddModule filemingw1.cpp extern "C" int get_int() { return 30; } [ end MinGW] [ HLAasm] $ AddModule FileHLAasm1.hla #include("\HIDE\hlainc\w.hhf") procedure MyFunc; @stdcall; @external; procedure MyFunc; @nodisplay; begin MyFunc; w.MessageBox(NULL,"Hello From HLAasm","From HLAasm",w.MB_OK); end MyFunc; [ end HLAasm ] [ MASM ] $ CmpPath = "\masm32\bin" $ IncPath = "\masm32\include" $ AddIncPath = "\masm32\macros" $ AddModule FileMasm1.asm,FileMasm2.asm include windows.inc ; always first include macros.asm ; MASM support macros ; ----------------------------------------------------------------- ; include files that have MASM format prototypes for function calls ; ----------------------------------------------------------------- include masm32.inc include gdi32.inc include user32.inc include kernel32.inc ; EXTERNDEF main:PTR ;get_size PROTO ;_start: ; jmp main get_size proc mov eax, 10 ret get_size endp ;end _start [END MASM ] [ Fasm ] $ AddModule FileFasm1.asm public get_Eax ; public start as '_start' ;extrn '_c_stdcall_display@8' as c_stdcall_display ;extrn '_c_ccall_display' as c_ccall_display ;extrn '_printf' as printf extrn 'main' as main ;start: ; jmp main get_Eax: mov eax, 20 ret [ end Fasm ] [ Link ] $ CONSOLE program $ ENTRY = start $ LibPath = "\C--\LIBS" $ AddLibPath = "Libs" $ COFF object File kernel32.lib,user32.dll,msvcrt.dll //file.obj $ OMF object File //gp.obj [ end Link ] #stack 0 #pragma option w //enable warning. #pragma option 3 //386 CPU. #include <windows.h> //#include <msvcrt.h--> #pragma option ia // allow inline asm extern stdcall get_size(); extern stdcall get_Eax(); extern stdcall MyFunc(); extern stdcall get_int(); extern stdcall get_size1(); extern stdcall get_size2(); extern stdcall get_Eax1(); extern stdcall MyFunc1(); extern stdcall get_int1(); extern stdcall get_Msvc(); extern cdecl _cprintf(); #define printf _cprintf void main() { _start: EBX = get_Eax(); get_size(); printf("eax = %d\nebx = %d\n",EAX, EBX); printf("mingw = %d\n", get_int()); printf("masm_module1 = %d\nmasm_module2 = %d\n",get_size1(),get_size2()); printf("fasm_module1 = %d\n",get_Eax1()); printf("minGw_module1 = %d\n",get_int1()); printf("Msvc = %d\n", get_Msvc()); MyFunc(); MyFunc1(); ExitProcess(0); } |
|||
21 Oct 2011, 13:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.