flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
ronware
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. |
|||
![]() |
|
ronware
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. |
|||
![]() |
|
pelaillo
See "Conditional assembly" on FASM.TXT
|
|||
![]() |
|
ronware
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 ![]() |
|||
![]() |
|
scientica
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 |
|||
![]() |
|
ronware
scientica wrote:
Heh. That's interesting, but I meant messages on the board, not message strings inside my code. |
|||
![]() |
|
scientica
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 |
|||
![]() |
|
ronware
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 |
|||
![]() |
|
scientica
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 |
|||
![]() |
|
ronware
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: ????! |
|||
![]() |
|
ronware
ronware wrote:
OK, that sucks. Now here's using IE -- on Windows ... שלום! |
|||
![]() |
|
ronware
ronware wrote: OK, that sucks. Now here's using IE -- on Windows ... שלום! Well, it appears IE works ok and Opera doesn't ![]() |
|||
![]() |
|
ronware
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. |
|||
![]() |
|
jInuQ
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 |
|||
![]() |
|
ronware
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. |
|||
![]() |
|
ronware
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. |
|||
![]() |
|
decard
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 |
|||
![]() |
|
ronware
Wow, that's cool (albeit funky). So I do have real preprocessed includes now, though they are anything but intuitively done...
Thanks a lot! |
|||
![]() |
|
rob.rice
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
|
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.