flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
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 |
|||
![]() |
|
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. |
|||
![]() |
|
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 |
|||
![]() |
|
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 |
|||
![]() |
|
JohnFound 29 Nov 2003, 21:53
![]() 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. |
|||
![]() |
|
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.
|
|||
![]() |
|
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.
|
|||
![]() |
|
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 |
|||
![]() |
|
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. |
|||
![]() |
|
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. ![]() bla bla _________________ teach me or i'll dick ya. |
|||
![]() |
|
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...
|
|||
![]() |
|
dickhead 30 Nov 2003, 11:43
hi vid and joshua
can you show me an example of what u spake? ![]() bla bla _________________ teach me or i'll dick ya. |
|||
![]() |
|
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. |
|||
![]() |
|
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? ![]() blabla _________________ teach me or i'll dick ya. |
|||
![]() |
|
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?... |
|||
![]() |
|
dickhead 30 Nov 2003, 12:21
never used it?
![]() ![]() i'm no carpenter. you tell me. ![]() bla bla _________________ teach me or i'll dick ya. |
|||
![]() |
|
dickhead 30 Nov 2003, 12:35
johnny boy
i cud ask you same question for if.......else and for loops. ![]() blabla _________________ teach me or i'll dick ya. |
|||
![]() |
|
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 |
|||
![]() |
|
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 |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.