flat assembler
Message board for the users of flat assembler.
Index
> Windows > Using assembler in source code |
Author |
|
ShortCoder 28 Aug 2004, 06:45
In C, you can just do something like
Code: system("program"); Where program is replaced by the name of the program and command line you wish to call. You WANT the quotes;) For example, a common usage is Code: system("pause"); to use the shell pause command. So, to use fasm to assemble example.asm, you'd do Code: system("fasm example.asm"); Is this what you wanted? _________________ Boycott Symantec/Norton/PowerQuest whenever possible |
|||
28 Aug 2004, 06:45 |
|
Tommy 28 Aug 2004, 06:53
I think he mean including the source code of fasm in his own program and then call the assembler...? Do you Imagist?
|
|||
28 Aug 2004, 06:53 |
|
vid 28 Aug 2004, 09:45
is there some include binary code directive in C?
|
|||
28 Aug 2004, 09:45 |
|
crc 28 Aug 2004, 11:05
Quote: is there some include binary code directive in C? No. |
|||
28 Aug 2004, 11:05 |
|
JohnFound 28 Aug 2004, 13:05
Imagist wrote: Fresh does this, I think, and I would like to know how. Well, in Fresh, FASM is not external module, but built-in. You simply can download Fresh sources and see yourself. It is not too complex. In generally, you need to create one "interface" module to the core FASM modules. Read Privalov's documentation on FASM internals (it is included in Fresh sources also) - there are all requirements for the interface module functions. Fresh uses all core modules without any changes. Of course you can use FASM as external program as well. Regards |
|||
28 Aug 2004, 13:05 |
|
Imagist 28 Aug 2004, 15:49
ShortCoder had what I wanted, but I wanted to be able to do it in FASM, not C. I may use the method JohnFound described.
Basically, I am building an HLL compiler which will compile the source code into a .asm file. There would be an option then to edit the .asm file, or to assemble it automatically. |
|||
28 Aug 2004, 15:49 |
|
Imagist 29 Aug 2004, 20:15
This is really a Java question, but the problem might be with how I am calling FASM in the parentheses. Note that I am calling FASMW instead of FASM, since there is no file called FASM except a .ini in the source file.
Code: public class PreCompiler{ public static void compile(String filename){ //String output=ReadWriteFile.readFile(filename); Process p=Runtime.getRuntime().exec("C:\Program-Files\fasmw152\FASMW.EXE"); System.out.print(output); } } |
|||
29 Aug 2004, 20:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.