flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
mike768 29 Dec 2006, 02:42
It would be GREAT for those MSVC users to have FASM output error messages in the format recognized by Visual Studio:
See this post at the MSBuild Tem Blog for more information. Now I realize FASM is designed to not need command-line options, although as this affects the STDOUT output rather than the binary output I think it doesn't violate the fasm philosopy. [edit] I hacked the source myself to produce the proper error message, but it is an all-or-nothing fix: either it uses MSVC-style output or it doesn't. Also useful would be a -q option which would print only the error messages - ie. no FASM banner. Similar to the Microsoft /nologo option. I am trying to script a long build and want to get just the error messages in the output. Or else output errors to STDERR and the startup banner to STDOUT. [/edit] (I tried searching the fora beforehand, but didn't get any results. My apologies if this is an old question.) Mike |
|||
![]() |
|
scientica 01 Jan 2007, 19:06
Sounds like a god idea, I like the idea, but, I think this option might be a bit even better:
2 flags: -q and -v (I'll get to "the" problem later) -q (Quiet) - supresses the banner as above -v (Verbose) - prints errors in the present more detailed way "the" problem would be that -q and -v could be used at the same time, basically 'breaking' the semantics, quiet and verbose usually are mutually exclusive. (the solution could be to rename -q to -n (No-logo), but it feels like looking up '-n' for the wrong option). here's some examples of how it could look: Code: ;# present: $ fasm /tmp/illegal.asm flat assembler version 1.67.15 (16384 kilobytes memory) /tmp/illegal.asm [1]: mup_ins error: illegal instruction. ;# proposed: $ fasm /tmp/illegal.asm flat assembler version 1.67.15 (16384 kilobytes memory) /tmp/illegal.asm(1): error #UD: illegal instruction. $ fasm -q /tmp/illegal.asm /tmp/illegal.asm(1): error #UD: illegal instruction. $ fasm -v /tmp/illegal.asm flat assembler version 1.67.15 (16384 kilobytes memory) /tmp/illegal.asm [1]: mup_ins error: illegal instruction. $ fasm -q -v /tmp/illegal.asm /tmp/illegal.asm [1]: mup_ins error: illegal instruction. |
|||
![]() |
|
mike768 02 Jan 2007, 20:39
There's even an option to have VS print out multiple lines - so the VS format could maintain all the 'verbosity' of the original output.
Although now that I think about it, that would just be redundant. The fact that one is using the VS-format output probably indicates it is being run from VS, in which case a simple double-click or F8 will bring you right to the line of code. The way I added the error numbers (without which VS fails to recognize it) was in the error include file (whatever it was - I don't have the source on this computer so I can't make any intelligent details...) like so: Code: error_jump_target: call assembler_error dw 1001 db "error description", 0 I probably butchered that excample but it gets the point across. Furthermore, I think FASM should not use the VS format by default - to avoid breaking any scripts that parse the output - if any should exist. I would suggest -m for Microsoft (but that's taken) or -v for Visual Studio, but -v is by convention verbose. Mike |
|||
![]() |
|
tantrikwizard 02 Jan 2007, 23:49
Though I'm not a FASM developer, it would seem to be a large undertaking to accomidate the multitude of IDEs out there. One could easily do this in a batch file or script if you're using windows (or linux for that matter):
Code: build.bat: @echo off fasm myfile.asm >> asmerrfile.txt cscript parseouterror.cs parseouterrors.cs: ofs = CreateObject("FileSystemObject") ofile = ofs.OpenFile("asmerrfile.txt") ...skip the fasm header... while not oFile.EOF ...parse the error line for what VS is looking for... console.print(strStudioRecognizedErrorFormat) loop This code will (obviously) need to be modified, but is much easier than modifying the FASM source. I use UltraEdit studio which has built in fasm support, it works great, no need to modify FASM. |
|||
![]() |
|
dazzit 08 Jan 2007, 10:29
I think the whole point of FASM is that it is a quick and easy all in one solution. I find the concept of an external helper program to process error messages personally a messy solution.
I've found error messages a problem when using FASM with CodeBlocks and TinyCC which has quite configurable and powerful regular expression matching to parse error lines. Unfortunately on only one line I can either get the line or the error. Not both. I modified TCC to stop it padding out the start of pure binary builds so as I could build a boot loader but kind of baulked at modifying CodeBlocks. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.