flat assembler
Message board for the users of flat assembler.

Index > Main > Feature Request: Error Catching, Pinpointing, & Descript

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
art_sands



Joined: 23 Oct 2003
Posts: 55
art_sands 29 Nov 2003, 18:52
Hi Privalov,

I know you're a busy man, and I'm kinda on your nerves right now, but can you improve some features of the error descriptions and error pinpointing.

For example:

Instead of this:

Code:
Flat Assembler 1.49.9.5
linebreaks.asm [24]:
DB  "What the heck, I have dreams all night", 13, 10,
error: invalid argument.
    


it should be able to pinpoint the error

Code:
Flat Assembler 1.49.9.5
  Error 1: Invalid argument (incorrect use of comma operator).
      linebreaks.asm [line 24, char 53]:
      DB  "What the heck, I have dreams all night", 13, 10,
                                                          ^
  Total Errors: 1
  Could not generate executable.
    



Regards,
Art Very Happy
Post 29 Nov 2003, 18:52
View user's profile Send private message Reply with quote
art_sands



Joined: 23 Oct 2003
Posts: 55
art_sands 29 Nov 2003, 19:21
you can also include Warnings, which allow the user to compile the program but notify him of possible logic bombs.

For example

INT 20

is not the same as

INT 20h

The user here surely must have aimed for the second option but ended up GPFing his system!

Regards,
Art
Post 29 Nov 2003, 19:21
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8268
Location: Kraków, Poland
Tomasz Grysztar 29 Nov 2003, 20:29
With current fasm's architecture it's impossible to display information about more that one error, as the most of errors when they happen completely prevent fasm from assembling the source further (this is generally done in order to avoid the avalanches of errors, also in case of preprocessor/parser errors there is simply no more source to process, as when something is broken at that stage, fasm cannot interprete the rest of source lines correctly).
And in the example you have provided fasm can't say that error is caused by wrong use of comma, as the comma was interpreted correctly and then "get_byte_value" procedure was invoked to get the value following that comma - and this one is invoking "invalid_argument" error, as it finds none.
Post 29 Nov 2003, 20:29
View user's profile Send private message Visit poster's website Reply with quote
art_sands



Joined: 23 Oct 2003
Posts: 55
art_sands 29 Nov 2003, 21:10
The major problem with single error detection shows when you have several errors in the source code. Suppose, for example, I had say 30 errors in code, i would have to correct and compile the code 30 times more to finally execute my program.

This is something that needs your URGENT attention. Solve this right now or later it will become one of the worst headaches you ever had.

Regards,
Art
Post 29 Nov 2003, 21:10
View user's profile Send private message Reply with quote
art_sands



Joined: 23 Oct 2003
Posts: 55
art_sands 29 Nov 2003, 21:15
Listen to me this is a severe problem that urgently needs your attention.

It can quickly become one of the major weaknesses of FASM.

BTW, since you've made this assembler, what books did you refer to when designing this compiler. I need to learn about compiler and assembler design. That will surely help me edge out structural flaws in FASM.

Regards,
Art
Post 29 Nov 2003, 21:15
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 29 Nov 2003, 21:53
Very Happy Well FASM is around for a years and this was not a big problem for nobody. But when art_sands found FASM, it becomes "a severe problem that urgently needs your attention"

Calm down art. If this will help you to sleep good: I am thinking on this problem these days. It will be solved some day.
And more, with the speed of FASM it is not big deal to compile source 30..40 times to find all errors. It is not slower than to scrolling list with error messages one by one.

Regards.
Post 29 Nov 2003, 21:53
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1140
Location: Russian Federation
comrade 29 Nov 2003, 22:25
If you have 40 errors in your source, you should not be programming in assembly in the first place.

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 29 Nov 2003, 22:25
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8268
Location: Kraków, Poland
Tomasz Grysztar 30 Nov 2003, 00:11
It would not help if FASM displayed all errors at once, just because not only your 10 or even 40 errors may get displayed, but also a hundreds of errors that came just from the dependency on earlier errors - that's what I've called the "error avalanche". I have chosen the "fix one error at a time" approach, and believe me, it really works.
Post 30 Nov 2003, 00:11
View user's profile Send private message Visit poster's website Reply with quote
art_sands



Joined: 23 Oct 2003
Posts: 55
art_sands 30 Nov 2003, 06:59
Alright. Privalov

Comrade: that was only an example. You don't get english, eh?

Guys,

I thought about it and there seems to be a solution.
Johnfound you could implement a pre-parser sort of thing in your IDE that checks for vulnerabilities instead of FASM doing it. That would be a good addition to Fresh.

Regards,
Art
Post 30 Nov 2003, 06:59
View user's profile Send private message Reply with quote
Joshua



Joined: 12 Jul 2003
Posts: 56
Location: Belgium
Joshua 30 Nov 2003, 10:51
i agree with Privalov on this one, first fix one error and then go to the next.

However maybe a instruction like:

Halt "Invalid register passed"

could be included. It would be great for use in macro's. Currently i already use this line and let fasm trap it with an illigal instruction, but it would be nice if you would be able to set the error message yourself from the macro.
Post 30 Nov 2003, 10:51
View user's profile Send private message Reply with quote
dickhead



Joined: 30 Nov 2003
Posts: 17
Location: Memory
dickhead 30 Nov 2003, 11:40
art_sands,

i agree with privvi coz i don't like too many errors lookin at my face. but tha pinpointing and line number and character number things are needed.

Wink
bla bla

_________________
teach me or i'll dick ya.
Post 30 Nov 2003, 11:40
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 30 Nov 2003, 11:42
joshua is right, i use such thing too. There is problem when 'halt' is defined as macro - should macro just display text, or should it stop compilation by inserting some undefined instruction? Both cases are not good, just displaying text wouldnt work when you compile in fasmw with F9, and undefined instruction cant be used with conditional assembly because it is catched in parsing, before assembling. Maybe it could be made by creating some assembly time error...
Post 30 Nov 2003, 11:42
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
dickhead



Joined: 30 Nov 2003
Posts: 17
Location: Memory
dickhead 30 Nov 2003, 11:43
hi vid and joshua

can you show me an example of what u spake?

Wink
bla bla

_________________
teach me or i'll dick ya.
Post 30 Nov 2003, 11:43
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 30 Nov 2003, 11:55
it could be sipmly:

Code:
macro halt text
{
  display text
  mov eax,ax ;i am not sure with this, i just have to 
                    ;generate assembly-time error
}
    


problem is that if generated error is not assembly time, then code like
Code:
if 0
  halt 'aa'
end if
    

would generate error too.
Post 30 Nov 2003, 11:55
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
dickhead



Joined: 30 Nov 2003
Posts: 17
Location: Memory
dickhead 30 Nov 2003, 12:01
docs contain very leass on macors if i am not wrong.

anybody have macros tutorials, pleas
?

silkodysey said macros are good while i read somewhere they are not?

Somebody tell me are they or are they not?

Wink
blabla

_________________
teach me or i'll dick ya.
Post 30 Nov 2003, 12:01
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 30 Nov 2003, 12:15
dickhead wrote:
silkodysey said macros are good while i read somewhere they are not?


Is the hammer good?... or bad?...
Post 30 Nov 2003, 12:15
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
dickhead



Joined: 30 Nov 2003
Posts: 17
Location: Memory
dickhead 30 Nov 2003, 12:21
never used it? Laughing Laughing


i'm no carpenter.


you tell me.

Wink
bla bla

_________________
teach me or i'll dick ya.
Post 30 Nov 2003, 12:21
View user's profile Send private message Reply with quote
dickhead



Joined: 30 Nov 2003
Posts: 17
Location: Memory
dickhead 30 Nov 2003, 12:35
johnny boy

i cud ask you same question for if.......else and for loops.

Wink
blabla

_________________
teach me or i'll dick ya.
Post 30 Nov 2003, 12:35
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 30 Nov 2003, 12:52
dickhead wrote:
i cud ask you same question for if.......else and for loops.


Yes, and the answer is the same. Only you have to find it yourself.

Regards
Post 30 Nov 2003, 12:52
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8268
Location: Kraków, Poland
Tomasz Grysztar 30 Nov 2003, 13:30
As for the "halt" thing, I was using it in some macro just in form like:

Code:
display "some error message"
halt ; as there is no such instruction, fasm will exit with "illegal instruction" error    
Post 30 Nov 2003, 13:30
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
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 cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.