flat assembler
Message board for the users of flat assembler.
Index
> Main > FASM as compiler backend through pipe, patch for |
Author |
|
Minas 02 Apr 2010, 10:13
Hello, I have written such mail to Tomas, regarding to subject, But haven't received any answer. Later I read somewhere from 3rd persons, that Tomas is not accepting patches, I don't know is it really so.
Anyway, now I doubling that mail here, with patches, may be it would be interesting to somebody, and he/she will finish the work. I'm thinking it is shame for such a powerful asm not to able to handle source code fed into stdin. Regards. === Hello, I am trying to use fasm as backend for my tiny home-brew compiler (hoping it become big, stable and useful one) and collide with problem that it is impossible to give assembler source code to the fasm through stdin, using pipe. Compiler now is pretty fast, so I wanted to attach a fast assembler to it. Well, I've tried to solve the problem, modifing fasm source. And even did, but somehow undecidable for me now problemsa was arised. *What I did: Modified source code of fasm to add '--' switch, which will mean "take asm source file from stdin" added for that special boolean flag. *What I get: Without includes, and without using macros - it works. But it is necessary it work normally. I don't know why it didn't include now files *What is a problem now: I don't know where to look, and what to correct to make "include" working, so through that - get working macros, for generating dlls (or exes) Particularly, my test file, x2dll.asm in fasm\Source\Win32\ can not be built into x2.dll Will you assist in solving this problem? Honestly, I would like eventually, to see this patch incorporated in fasm. Sources I'm now attaching: fasm-.tar.gz, and separately, the full directory of modified fasm (renamed .exe files to .ex# for gmail antivirus). And all I did was for Win32 platform, now yet, although others are important too, but well, now win32 was first Modified fasm version I called "fasm-exe" to distinguish with original version and so do other files, thay all have '-' suffix', by name of '--' switch. Original fasm version was 1.68 Changed files are: Source\variable-.inc' Source\preproce-.inc' Source\Win32\FASM-.ASM (replaces FASM.ASM for fasm-.exe) I hope it is interesting to you add new features to fasm. Thanks, Minas Abrahamyan
|
|||||||||||||||||||||
02 Apr 2010, 10:13 |
|
revolution 02 Apr 2010, 19:59
I don't understand why you need to use pipes. Can you please explain why saving the source to a disk file first isn't good for you?
|
|||
02 Apr 2010, 19:59 |
|
revolution 04 Apr 2010, 12:18
Well so far no response from the OP. Maybe you are right, those pesky .asm files are taking up too much space on my HDD. Perhaps I should delete them and just leave the binaries. That way if I ever need to change anything I can always disassemble/edit/recompile (all with using pipes of course).
|
|||
04 Apr 2010, 12:18 |
|
edfed 04 Apr 2010, 13:15
Quote: I'm thinking it is shame for such a powerful asm not to able to handle source code fed into stdin. me too, I think sometimes, yeah, it happens, i think, i have a brain. it is a shame that so much HLL are develloped to let poor coders make money with poor programs. asm powaaa, on all CPU/GPU/DSP. then, no bad code made by laxist coders, only code made by people who are able to code with Assembly. and the coputing world will feel better. that's all. |
|||
04 Apr 2010, 13:15 |
|
Frank 04 Apr 2010, 14:56
Hello Minas, welcome to the message board. And thank you for sharing your work! I did not have the time for a closer look yet, but from your description, it seems that it can be very useful to many.
|
|||
04 Apr 2010, 14:56 |
|
f0dder 04 Apr 2010, 15:08
revolution wrote: Well so far no response from the OP. Maybe you are right, those pesky .asm files are taking up too much space on my HDD. Perhaps I should delete them and just leave the binaries. That way if I ever need to change anything I can always disassemble/edit/recompile (all with using pipes of course). _________________ - carpe noctem |
|||
04 Apr 2010, 15:08 |
|
Minas 04 Apr 2010, 17:49
Frank wrote: Hello Minas, welcome to the message board. And thank you for sharing your work! I did not have the time for a closer look yet, but from your description, it seems that it can be very useful to many. Thank you for kind words Well, this could be of use for everyone, who are using other assemblers through pipe (nasm, gas, yasm) and wants to give fasm a try. revolution wrote: I don't understand why you need to use pipes. Can you please explain why saving the source to a disk file first isn't good for you? That's not matter of disk space, but simplicity, performance, modularity. f0dder wrote:
Yes, you're right. Compiler I am building pretend to have fast compilation speed, and will run compiled code immediately, without producing asm code, although asm output will remain as debugging option, but, anyway linking (in sense of data flow channel) these programs, frontend and backend, through pipe is most sensible option. Also programming in Unix way. When researching previous similar work I saw as HLA author tried to convert fasm to library callable by C (cFASM), but he replaces asm with his own non-compatible low-level compiler, and thus breaks asm-compatibility. Also it is not much supportable, as I could guess. Well, such project as fasm, isn't too, as it was criticized by same Randall Hyde. Best feature of fasm, from my point of view, is its macros system, which allows to build output files and binaries without use of linker. I would call this performance, if I wouldn't know that there is multi-pass interpreter inside of fasm, written in assembler, and as such and as present implementation is not much maintainable. But, since I didn't find any other supportable assembler with dll/exe output and x86_64 instructions support, I've took the fasm and sawed it Initially I didn't know that Tomasz is not accepting patches, and read about it recently. My original mail was sent to him roughly a month ago. Regards. |
|||
04 Apr 2010, 17:49 |
|
edfed 05 Apr 2010, 08:35
you can maybe see the version or famos. the "memory" operating system.
it will use source from a memory place, without any file saving. it is like a pipe, you will just have to write a pipe for the ram zone used as source code. and another pipe from the ram zone used as binary code. and it will compile to another ram zone. its name is fasmf, written by Neville Watkin. Code: ;-- ------------------------------------------------------------------------- ; W A T K I N T E C H N O L O G Y S o f t w a r e D i v i s i o n ;--------------------------------------------------------------------------- ; PROGRAM: Flat Assembler port to FAMOS - Preliminary DOS tests ; VERSION: 1.0 PLATFORM: IBM PC ; PROJECT: FAMOS Memory Operating System FILE: FASMF .ASM ; AUTHOR: Neville Watkin DATE: 11 Sep 2008 ;--------------------------------------------------------------------------- ; Revision History ; ;11.09.08 Preliminary DOS tests ;--------------------------------------------------------------------------- ; based on: ; flat assembler interface for DOS ; Copyright (c) 1999-2003, Tomasz Grysztar. ; All rights reserved. ;init_flatrm deleted ;reads source code from fixed address 0:800000H ;writes pre-processed source to 0:400000H, writes code to 0:600000H ;(intended to produce flat binary code only) i think it can be a good start for you pipe project. |
|||
05 Apr 2010, 08:35 |
|
kalambong 08 Apr 2010, 05:03
Wow, didn't know about the existence of such a thing !!
|
|||
08 Apr 2010, 05:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.