flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Imagist 27 Jul 2004, 03:52
Here's what I would like to do, if I can (I may have to completely abandon this). The features:
-Compile directly from a .txt (so you can code in notepad or whatever). -Compile directly to a .exe, with the option of compiling into a .asm source file (FASM syntax, of course). -Allow inline FASM. -Have functions for input and output. -Have control structures (if statements, while, do-while loops). -Variable creation and manipulation. Basically, that's all I need. I could probably get away with doing even less. _________________ Many things are possible. Few things are likely. |
|||
![]() |
|
pelaillo 27 Jul 2004, 04:04
You have half of the work done with hll macros shipped on standard win32 fasm package. Decide which syntax you want and start from there.
Use fasm as the compiler and your txt will show the language you create. Writing a parser is somehow more complex and time consumming. Deadline is imminent so doing it with macros will permit you to concentrate on the language and not on bugfixing. Post your macros as you develop them and you will find here people that could help you in the process. |
|||
![]() |
|
S.T.A.S. 27 Jul 2004, 05:08
I have to agree with pelaillo, writting a parser is too complex to be finished in one month.
AFAIK, the best "tutorial" is Dragon Book - Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, USA, 1986 And again pelaillo is right, FASM has very strong macro capabilities, so it's easier to write some "envelope" macro for each statement of your HLL. E.g. it's possible to write C-like "printf" macro, which will call in turn wvsprintf, GetStdHandle & WriteFile to write something to concole. Though I have no ideas haw to implement "A=B+C" stuff ![]() |
|||
![]() |
|
Imagist 27 Jul 2004, 15:46
Thank you for your help. I will probably need a lot of help, since I am new to this, and ASM is very different from the previous languages I have learned.
|
|||
![]() |
|
Imagist 29 Jul 2004, 11:24
Wait, I'm a bit confused. Are you saying that I should modify the FASM compiler to allow HLL-type macros?
|
|||
![]() |
|
crc 29 Jul 2004, 11:37
Given the timetable involved, I'd say just write HLL macros in FASM and use 'include' to include them with your programs. It'd be similar to the way C is built up from a small core set of functions. In this case, FASM would be the core, and your macros+library would replace LIBC.
![]() |
|||
![]() |
|
Imagist 29 Jul 2004, 14:40
Oh, I see.
In the last three days I wrote a sort of "precompiler" in Java that takes code written in the Spoon Language (the language I created) and "compiles" it into FASM source code. I still plan to write a compiler in FASM, but if all else fails, I can hand in the piece of junk I created in Java. When I'm done tweaking the Java code, I might toss it up here. Even though it is written in Java (and therefore is unbearably slow) it does cut down on some of the more tedious coding, and could be a really helpful coding tool if rewritten in FASM. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.