FASM differences between Menuet and Windows versions
Well, I'm making progress on my Forth system!
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?
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.
Joined: 16 Jun 2003
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.
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).
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