flat assembler
Message board for the users of flat assembler.
Index
> Main > MFASM: New Micro-FASM! Ultra Lightweight |
Author |
|
m3ntal 14 Jun 2014, 06:10
Micro-FASM is a minimal version of FASM.EXE (Win32 console) that consists of only the preprocessor+directives for Universal Assembler, dynamic translation and easier conversion to native ARM (example: Raspbian Linux).
FASM.EXE is only 51K (FASMW=140K). Fastest compilation: 0.1 second! Removed all instructions+registers so that any assembler/compiler can be defined. Includes \EXAMPLES\ for Intel, ARM, Java, 6502 and HTML * FASM.ASM - Main source. Use FASMW to assemble. No setup. Includes VERSION, VARIABLE. * \SOURCE\ - Only 5 files: * ASSEMBLE.INC - ASSEMBLE, ERRORS, MESSAGES * FORMATS.INC - Unedited * PARSER.INC - PREPROCE, PARSER, EXPRPARS, EXPRCALC, SYMBDUMP * SYSTEM.INC - Main entry, format, file I/O, display x, imports * TABLES.INC - Removed all CPU specifics Tomasz: Hope you like it!
Last edited by m3ntal on 14 Jun 2014, 23:28; edited 3 times in total |
|||||||||||
14 Jun 2014, 06:10 |
|
sid123 14 Jun 2014, 09:01
Cool!
Thanks man, I was looking for something with only the preprocessor for my Virtual machine. Nice Work. _________________ "Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X XD |
|||
14 Jun 2014, 09:01 |
|
shutdownall 14 Jun 2014, 09:21
Compilation time depends on size and structure of source.
|
|||
14 Jun 2014, 09:21 |
|
JohnFound 14 Jun 2014, 12:02
The idea is not bad at all, but I am not sure about the implementation. At first, if possible, the original FASM files must be used not changed in order to easy accept the future bug fixes, provided by Tomasz.
At second, the program identifies it as FASM, but it is not. The filename, strings and version numbers have to be changed in order to not confuse the user. |
|||
14 Jun 2014, 12:02 |
|
m3ntal 14 Jun 2014, 16:10
shutdownall: I mean, <0.1 second to compile FASM.ASM with FASMW on my outdated PC.
Quote: I think he removed the PREPROC.INC and also the EXPRCALC.INC / EXPRPARS.INC which will give significant restrictions during compilation. John: Quote: At first, if possible, the original FASM files must be used not changed in order to easy accept the future bug fixes, provided by Tomasz. Quote: At second, the program identifies it as FASM, but it is not. |
|||
14 Jun 2014, 16:10 |
|
m3ntal 14 Jun 2014, 23:30
Updated download: \EXAMPLES\ for Intel, ARM, Java, 6502 and HTML.
How to convert X86 to ARM? Examples: dec eax = subs r0, 1. rep movs byte [edi],[esi] = copy r1 # bytes to r7 from r6. If DF, negate n to decrement pointers. Universal assembler (Pseudo): Code: macro inc x { if CPU=X86 inc x else if CPU=ARM adds x, 1 else if CPU=MIPS addi x, x, 1 else if CPU=JAVA iinc x, 1 else if CPU=M68K add 1, x else if CPU=M6502 in#x end if } |
|||
14 Jun 2014, 23:30 |
|
JohnFound 15 Jun 2014, 18:19
m3ntal wrote: There are no changes to FASM language. You're just assuming there are changes when you haven't taken one look at it. Without changes, means, that when Tomasz release v1.71.22, you simply have to copy/paste some files to your project, compile and get the new Micto-FASM binary. It is not the case now. Quote: Micro-FASM is a version of FASM that has been reorganized and has no instructions or registers. Please take one look at the source before you prejudge it. I read the source before posting the first post. It is a fact that Micro-FASM writes: Code: flat assembler version 1.71.21 usage: fasm <source> [output] optional settings: -m <limit> set the limit in kilobytes for the available memory -p <limit> set the maximum allowed number of passes -s <file> dump symbolic information for debugging How the user will understand why his source hits "error:illegal instruction" on a simple "mov"? _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
15 Jun 2014, 18:19 |
|
shutdownall 15 Jun 2014, 21:21
m3ntal wrote:
I don't think it is very useful to move EXPRCALC.INC, EXPRPARS.INC and PREPROC.INC into PARSER.INC. So what is the advantage to have just one file containing at the end the contents of four files ? And if you do so - why don't you make just one big source file ? |
|||
15 Jun 2014, 21:21 |
|
m3ntal 15 Jun 2014, 21:45
John
Quote: It is a fact that Micro-FASM writes... Quote: How the user will understand why his source hits "error:illegal instruction" on a simple "mov"? Quote: Without changes, means, that when Tomasz release v1.71.22, you simply have to copy/paste some files to your project, compile and get the new Micto-FASM binary Note: In EXAMPLES\ARM, I didn't have time to remove the @ prefix - @mov, @ldr, @15 - but I will improve the examples later. It was only there to avoid conflict with the existing assembler and is no longer needed. |
|||
15 Jun 2014, 21:45 |
|
m3ntal 15 Jun 2014, 22:13
shutdownall
Quote: I don't think it is very useful to move EXPRCALC.INC, EXPRPARS.INC and PREPROC.INC into PARSER.INC. So what is the advantage to have just one file What about these files? VERSION, VARIABLE. Should they be separate or included in the main FASM.ASM for easy access? And what about ERRORS and MESSAGES? Should they be separate or in ASSEMBLE? Why not save 4 files? Quote: And if you do so - why don't you make just one big source file ? |
|||
15 Jun 2014, 22:13 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.