flat assembler
Message board for the users of flat assembler.
Index
> Main > cygwin |
Author |
|
decard 06 Aug 2004, 15:34
just generate your output in COFF format, and link it with your game
|
|||
06 Aug 2004, 15:34 |
|
triglav 06 Aug 2004, 15:56
decard wrote: just generate your output in COFF format, and link it with your game I'm using GNU Auto-tools system for building the whole project (source, scripts, documentation, etc.), have you any idea, how to solve the checking for extern (non Cygwin) application (FASM[W].exe)? is there any common used %FASM% like enviroment variable under win32? |
|||
06 Aug 2004, 15:56 |
|
vid 08 Aug 2004, 17:33
only FASM's environment variable is %FASMINC% pointing to FASM's include directory. This directory is usually (99%) located inside directiry that contains compiler, so you can use "%FASMINC%\..\fasm.exe". Not general, but usually should work.
|
|||
08 Aug 2004, 17:33 |
|
triglav 09 Aug 2004, 21:07
"usually" is philosophy of micro$oft, not mine . another idea?
|
|||
09 Aug 2004, 21:07 |
|
ShortCoder 28 Aug 2004, 09:37
Shame Cygwin can't run direct Linux binaries. Also, since the fasm assembler is, itself, written in fasm, you are at a sort of "chicken and the egg" case here.
The only solution I can see, if you want fasm to work from within cygwin, is to port the fasm sourcecode to gas syntax, and then assemble the fasm executable from gas. Then you may proceed to code using fasm under cygwin. Ugly, I know, but it's all I could come up with. Better yet, once you have done that, then use the fasm executable generated from gas source to assemble another fasm executable, this time from the fasm source, and then use that final executable from then on? (and contribute it to these boards, maybe;)) _________________ Boycott Symantec/Norton/PowerQuest whenever possible |
|||
28 Aug 2004, 09:37 |
|
proveren 28 Aug 2004, 10:06
Since you would do it only for some optimization, try to find a doc with the right syntax of the gcc _asm() directive(or function how should i name it?). It is very confusing indeed, but there is.
By the way avoid M$ and micro$oft notation. I got laughed at in the GameDev.Net forum when using it in a post. |
|||
28 Aug 2004, 10:06 |
|
triglav 28 Aug 2004, 10:16
what do you think about NASM? Vid told me that it's dead however on linux platforms it's widely spread.
|
|||
28 Aug 2004, 10:16 |
|
crc 28 Aug 2004, 11:12
Quote: what do you think about NASM? Vid told me that it's dead however on linux platforms it's widely spread. It is still a good assembler. I used it for years (I didn't fully switch to FASM until this July). It has bugs, is updated infrequently, but the documentation that exists is good. Personally, I now prefer FASM though. (oh, other than some of the directives, and macro facilities, NASM and FASM are nearly compatible. For example, the FASM source for RetroForth can be converted to NASM by changing the macros and five or six lines of source code. (rb -> resb, file -> incbin, include -> %include, and so on) |
|||
28 Aug 2004, 11:12 |
|
Tomasz Grysztar 28 Aug 2004, 11:24
It would be possible to create some headers allowing FASM to assemble some of the NASM syntax, something like:
Code: %include fix include resb equ rb resw equ rw resd equ rd incbin equ file You can even try to emulate the simplest variants of NASM macros: Code: macro %macro count { 0 fix 1 fix %1 2 fix %1,%2 3 fix %1,%2,%3 4 fix %1,%2,%3,%4 5 fix %1,%2,%3,%4,%5 6 fix %1,%2,%3,%4,%5,%6 7 fix %1,%2,%3,%4,%5,%6,%7 8 fix %1,%2,%3,%4,%5,%6,%7,%8 def fix count 0 fix _0 1 fix _1 2 fix _2 3 fix _3 4 fix _4 5 fix _5 6 fix _6 7 fix _7 8 fix _8 macro def { } _0 fix 0 _1 fix 1 _2 fix 2 _3 fix 3 _4 fix 4 _5 fix 5 _6 fix 6 _7 fix 7 _8 fix 8 %endmacro fix } ; Now some of the simplest macros from NASM documentation: %macro prologue 1 push ebp mov ebp,esp sub esp,%1 %endmacro %macro silly 2 %2: db %1 %endmacro |
|||
28 Aug 2004, 11:24 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.