flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > MenuetOS > FASM differences between Menuet and Windows versions

Thread Post new topic Reply to topic
Hugh Aguilar

Joined: 15 Nov 2011
Posts: 62
Location: Arizona
FASM differences between Menuet and Windows versions
Well, I'm making progress on my Forth system! Smile

I'm writing it in FASM for Windows. I switched from HLA to FASM in order to get 64-bit x86 support.

What is the difference between the FASM used for Windows and the FASM used for Menuet? Would it be possible for me to make my program compile for either OS with a compiler directive? Of course, the libraries will all be different, but is it possible to make the program the same? I am using macros a lot, so if there is a difference in how they work, then I may not be able to do this. If I know what the differences are ahead of time though, I may be able to write my program using a subset of FASM that is common to both versions of FASM, and thus avoid the incompatibilities.

My Windows system is called HostForth. It will only be used to run a single program, which is TargForth --- TargForth is a cross-compiler for micro-controllers (the PIC24 is my first target).

It may be fun to provide a Menuet version of HostForth however, which I will call ToyForth. This would primarily be a framework for assembly-language programming --- the user would still be programming mostly in FASM, but would restrict himself to the Forth parameter-passing convention. ToyForth could also be used for writing utility programs that aren't speed-critical and don't require assembly-language --- somewhat like Python is used under Linux, but a lot simpler (and a lot faster).

I can appreciate that you Menuet guys prefer assembly-language to HLLs. It seems to me though, that it is still a good idea to have an HLL available for light-weight programming --- especially if it is:
1.) assembly-language friendly (a simple parameter-passing convention)
2.) simple (doesn't use any kind of OOP)
3.) interactive (functions can be tested at the command-line immediately after writing them)
Is there any such language currently available for Menuet? Or do you write everything in FASM?
Post 11 Dec 2012, 04:55
View user's profile Send private message Send e-mail Reply with quote

Joined: 17 Jun 2003
Posts: 194
Menuet and Windows fasm versions generate same code from source. Only difference might be with source code paths. So start by using the same directory for included files. And yes, so far, everything is written with fasm-assembly.
Post 13 Dec 2012, 09:15
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist

Joined: 16 Jun 2003
Posts: 6192
Location: Kraków, Poland
One of the fasm's principles is the "same source - same output" rule, which means that fasm will produce exactly the same output from a given source text no matter what environment (in particular: what OS) it is run in. The only difference between running fasm on different systems lies in the way in which they provide the source text - the standards for providing file paths may differ, for example. So if your file includes some other files, on different OS it may be necessary to adjust the file paths - and no other differences should arise.
Post 17 Dec 2012, 11:35
View user's profile Send private message Visit poster's website Reply with quote

Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
What if outside function calls are implemented differently in different os-s or for example data is implemented differently. it is possible to create source where the programcode will differ. perhaps in lenght of jumps.. longer jumps used by the compiler automatically, because for example it jumps over something wich would be just fit enough in one os, to have short jump, while other os would recquire there more data. But function calls themselves are different so you cant produce the same thing for different os-es. and since they are different their size might differ so blah blah.
I would replace all the official instruction to 1-to -1 machine code associations (but im lazy so im asking you).
Post 03 Feb 2013, 23:05
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.