flat assembler
Message board for the users of flat assembler.
Index
> Linux > Cross-platform ASM Goto page 1, 2 Next |
Author |
|
ronware 08 Jan 2004, 19:02
I am interested in writing code which will compile for Windows as well as Linux.
Does anyone have experience doing this with FASM? Any hints appreciated. |
|||
08 Jan 2004, 19:02 |
|
ronware 09 Jan 2004, 17:17
decard wrote: FASM itself is an example of cross-platform app - take a look at the source. System.inc and fasm.asm files contain platform-dependent code, while all other sources are platform-independent. Ah, yes - but I was hoping to be able to do something like define a constant in my main file and have FASM compile that main source into one or the other version. I guess it is just as good to have two different start files and include the common components. |
|||
09 Jan 2004, 17:17 |
|
pelaillo 09 Jan 2004, 20:17
See "Conditional assembly" on FASM.TXT
|
|||
09 Jan 2004, 20:17 |
|
ronware 09 Jan 2004, 21:04
pelaillo wrote: See "Conditional assembly" on FASM.TXT Much?simas gracias. I'll play with it a little. (it seems UTF8 encoding is not supported in messages ) |
|||
09 Jan 2004, 21:04 |
|
scientica 09 Jan 2004, 23:59
ronware wrote: (it seems UTF8 encoding is not supported in messages ) Maybe this can be helpfull: http://board.flatassembler.net/topic.php?t=307&highlight=utf8 _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
09 Jan 2004, 23:59 |
|
ronware 11 Jan 2004, 02:23
scientica wrote:
Heh. That's interesting, but I meant messages on the board, not message strings inside my code. |
|||
11 Jan 2004, 02:23 |
|
scientica 11 Jan 2004, 11:55
ronware wrote: Heh. That's interesting, but I meant messages on the board, not message strings inside my code. You mean that you can't use UTF8 in a post here? (I think this should be UTF8 encoded text:) åäöÅÄÖあい 人 (shloud be lowercase, a+ring, a+umlat, o+umlat, then the three in uppercase, then in hiragana 'ai', and finally a space and then the kanji hito (or rén)) If you don't see it change the Character Coding in your browser to Unicopde/UTF8 _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
11 Jan 2004, 11:55 |
|
ronware 12 Jan 2004, 00:20
scientica wrote:
The kana showed up fine. The following text should be Hebrew: ???? I do have the browser set to utf8, and the Hebrew is showing up in the composer window |
|||
12 Jan 2004, 00:20 |
|
scientica 12 Jan 2004, 05:45
Hmm, all I see is "????" (even in the quoted text)
btw, what browser do you use? (I use Mozilla Firebird, on linux, I cut&paste the UTF8 code from emacs) one little note, the UTF8 text was converted to "&# (number) ;"-format after I had chosen previev. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
12 Jan 2004, 05:45 |
|
ronware 12 Jan 2004, 05:58
scientica wrote: Hmm, all I see is "????" (even in the quoted text) All I see now is ????, too. I was using Opera on Linux. Now I'm using Opera on Windows ... let me retry: ????! |
|||
12 Jan 2004, 05:58 |
|
ronware 12 Jan 2004, 06:00
ronware wrote:
OK, that sucks. Now here's using IE -- on Windows ... שלום! |
|||
12 Jan 2004, 06:00 |
|
ronware 12 Jan 2004, 06:02
ronware wrote: OK, that sucks. Now here's using IE -- on Windows ... שלום! Well, it appears IE works ok and Opera doesn't |
|||
12 Jan 2004, 06:02 |
|
ronware 12 Jan 2004, 06:21
ronware wrote:
I notice you are using phpBB2. I also am running a board with it, and I modified the template pages to have charset="utf-8" in my setup so my pages all work with utf8 properly. |
|||
12 Jan 2004, 06:21 |
|
jInuQ 12 Jan 2004, 19:09
I can see שלום! and åäöÅÄÖあい 人 but not the the hebrew from ronware's first post. Using Mozilla Firebird 0.7.
_________________ jInuQ "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery |
|||
12 Jan 2004, 19:09 |
|
ronware 14 Jan 2004, 19:57
ronware wrote:
So I can do what I want like this: Code: LINUX=0 WINDOWS=1 BUILD=LINUX if BUILD=LINUX display 'Building LINUX' include 'fl.asm' else if BUILD=WINDOWS display 'Building WINDOWS' include 'fw.asm' end if Which is pretty cool. I have a makefile which does this: Code: f: f.asm fl.asm sed -e "/^BUILD=/s/=.*/=LINUX/" < f.asm > ftop.asm fasm ftop.asm f f.exe: f.asm fw.asm sed -e "/^BUILD=/s/=.*/=WINDOWS/" < f.asm > ftop.asm fasm ftop.asm f.exe It would be more elegant if I could tell FASM to define a macro from the command-line, but this works OK. |
|||
14 Jan 2004, 19:57 |
|
ronware 14 Jan 2004, 20:06
ARRGH.
The 'conditional compilation' is not really true. In my example, 'fl.asm' gets read in even if the WINDOWS compilation is selected. How does one prevent this? It cannot be the desired effect, I think. |
|||
14 Jan 2004, 20:06 |
|
decard 14 Jan 2004, 21:43
Actually conditianal assembly is true, but conditional preprocessing - not. Preprocessor directives like include are processed before if's. Partially this problem was solved in following thread: http://board.flatassembler.net/topic.php?t=492
regards |
|||
14 Jan 2004, 21:43 |
|
ronware 14 Jan 2004, 22:57
Wow, that's cool (albeit funky). So I do have real preprocessed includes now, though they are anything but intuitively done...
Thanks a lot! |
|||
14 Jan 2004, 22:57 |
|
rob.rice 15 Jan 2004, 03:50
I don't know where to find it BUT there is an example of what you want to do It's called e3 its an editor for linux or windows BUT the source code is writen for nasm and would be veary hard to port to FASM
|
|||
15 Jan 2004, 03:50 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.