flat assembler
Message board for the users of flat assembler.

flat assembler > IDE Development > [FASMW] Small bug inside the gui version

Author
Thread Post new topic Reply to topic
rohagymeg



Joined: 19 Aug 2011
Posts: 77
EDIT: With my huge assembly knowledge I managed to find out where the problem was, and I just added one line of code to the source of fasmw. It basically deletes the title data so it triggers the operating system's default one when next time it's called.

Where the pick help file menu item is called, just right after the "select file" dialog box call before it returns to the main window

Code:
mov  [ofn.lpstrTitle],NULL    

Below is my original bug report which I now personally resolved:)
-----------------------------------------------------------------------------------------
You all will probably shoot me in the head for this, but here it goes Very Happy

I tested it with the 0.95.09
To reproduce:

Click Help/Pick help file...
You can close the dialog, the point is to keep an eye on the open dialog's title, which is "Pick help file"

Now click File/New
Then Compile (it doesn't matter if you have any code or not)
The save as dialog's title should be the standard "Save as" but instead it's "Pick help file".
But when you restart the program and press Ctrl+F9 it shows save as (until you click the said menu again).

I always find bugs in every software immediately after I start to use them the first time lol

Ps.:I'm new to assembly and this forum and I trust FASM with this community and I think it's worth the time learning the specific syntax features in FASM. My main goal is to rewrite my work in progress C++ project in pure assembly with the help of fasmlib.
Code:
    


Last edited by rohagymeg on 19 Aug 2011, 09:09; edited 8 times in total
Post 19 Aug 2011, 00:46
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1389
Location: Toronto, Canada
Very ambitious! I like that!
Post 19 Aug 2011, 01:10
View user's profile Send private message Send e-mail Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
In the meantime I found another bug! The built-in calculator behaves unexpectedly!
There are so many usability problems with it that I can't count them. For example you can't convert a hex value that starts with a letter like F or what's the point of the switches and the evaluate button?. I think it should be coded neatly or removed from the program because what's the point of a buggy converter if you have a perfectly working one already(calc.exe)?

My second headshot Laughing
EDIT: Oh, now I know where to report bugs next time.


Last edited by rohagymeg on 19 Aug 2011, 02:44; edited 1 time in total
Post 19 Aug 2011, 02:37
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
rohagymeg wrote:
For example you can't convert a hex value that starts with a letter like F or what's the point of


NOT a BUG : Prefix it with a "$" : "FFFF" -> "$FFFF"

Quote:
it should be coded neatly or removed from the program because what's the point of a buggy converter if you have a perfectly working one already(calc.exe)?


NO.

1. FASM calculator works very well
2. "calc.exe" from Windaube is shitty and doesn't exist in DOS

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 19 Aug 2011, 02:42
View user's profile Send private message Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
Did you close this case as not a bug or is it just your signature? What about my first post? Next time I will write every problem in a separate thread.
EDIT: Yeah, not a bug, but a workaround. It's not much better!
Post 19 Aug 2011, 02:49
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2145
Location: Estonia
Most of the bugs you discovered are cosmetic ones and not very likely to cause any serious damage to an end user.

You are right on point that any feature that is there must prove to be useful.

The point of the IDE calculator is not to replace calc.exe, but to provide you the tool that behaves *exactly* like FASM, including the 0x, $ prefixes and h suffix.
It is not a HEX2DEC converter, but an evaluator. Try this for example: ((1234567890*234567890) SHL 2) * 7
Post 19 Aug 2011, 06:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
Madis731 wrote:
Most of the bugs you discovered are cosmetic ones and not very likely to cause any serious damage to an end user.

You are right on point that any feature that is there must prove to be useful.

The point of the IDE calculator is not to replace calc.exe, but to provide you the tool that behaves *exactly* like FASM, including the 0x, $ prefixes and h suffix.
It is not a HEX2DEC converter, but an evaluator. Try this for example: ((1234567890*234567890) SHL 2) * 7


I accept your view but the fact that writing D6fCh in the field does nothing even though i put an h sign at the end defeats the purpose of prefix and suffix. Fasm is famous because you can freely use most of the conventional pre/suffixes. But the calculator has this small but odd behaviour. And I didn't even search for bugs, I was just using the program normally! If it is a problem to point out all the cosmetic errors a person finds in a software then why have a gui? I mean if people don't need a reliable user interface why do they need UI at all? Command line all the way!
Post 19 Aug 2011, 07:16
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
rohagymeg wrote:
I accept your view but the fact that writing D6fCh in the field does nothing even though i put an h sign at the end defeats the purpose of prefix and suffix. Fasm is famous because you can freely use most of the conventional pre/suffixes. But the calculator has this small but odd behaviour.


Your D6fCh-vs-0D6fCh-issue is NOT a problem specific to FASM and even less to its calculator, it's just bad behavior cloned from MA$M. So please blame M$, or just use "$D6FC" and ignore the residual MA$M support in FASM Wink

Quote:
And I didn't even search for bugs, I was just using the program normally!


Confused

Quote:
if people don't need a reliable user interface why do they need UI at all? Command line all the way!


Confused

Quote:
Did you close this case as not a bug? What about my first post?


I didn't close anything. I just moved it where it belongs to. Also I sticked it ASS'uming your "bug" report would be valid. Maybe someone unsticks it occasionally Wink

Correct way:

Code:
    mov eax, ($8000+99+(beef-aaac)*3+$ff) ; Constant (< 64 KiB)
    ...
    ...
aaac: db "AAC", 0  ; Advanced Audio Cooling
beef: db "BEEF", 0 ; From cows ...
    


Your "superior" way:

Code:
    mov eax, (8000+99+(beef-aaac)*3+ff) ; Constant (< 64 KiB)
    ...
    ...
aaac: db "AAC", 0  ; Advanced Audio Cooling
beef: db "BEEF", 0 ; From cows ...
    


Now please reveal how FASM has to find out that "8000" and "FF" are HEX, "99" is DEC, and "beef" and "aaac" are labels. WtF ??? Shocked


Last edited by DOS386 on 19 Aug 2011, 07:48; edited 6 times in total
Post 19 Aug 2011, 07:34
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16586
Location: Earth 2.0 beta
D6fCh evaluates as a label or literal name because it starts with a non-numeric character. This is also how the assembler will evaluate it. And it was deliberately designed this way. If you wanted a hex number then you have to follow the same rules as the assembler and start with a numeric character, 0D6fCh or 0xD6fC, or as DOS386 mentions the $ also works $D6fC.
Code:
D6fCh: dd 0D6fCh ;label is D6fCh, value is 0D6fCh    
Post 19 Aug 2011, 07:36
View user's profile Send private message Visit poster's website Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
Thank you all for the clarifications. At least I learnt something Very Happy
And this thread should be unstickied. It's not so important to be stickied. It's just a "cosmetic bug". And it's easy to fix.
And I'm sorry that I made it off topic. Will never happen again Smile
Post 19 Aug 2011, 08:18
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16586
Location: Earth 2.0 beta
I don't want to unsticky it just yet. The first post still shows a bug, and your fix for it. Once Tomasz has updated and fixed it then it can be unstickied.
Post 19 Aug 2011, 09:41
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 754
Location: Massachusetts, USA
I peek at source and find GetSaveFileName missing param.

Code:
save_file_as:
        invoke  SendMessage,[hwnd_tabctrl],TCM_GETCURSEL,0,0
        mov     ebx,eax
        mov     [ei.header.mask],TCIF_PARAM
        invoke  SendMessage,[hwnd_tabctrl],TCM_GETITEM,ebx,ei
        mov     eax,[ei.pszpath]
        or      eax,eax
        jnz     alloc_ok
        invoke  VirtualAlloc,0,1000h,MEM_COMMIT,PAGE_READWRITE
        mov     [ei.pszpath],eax
      alloc_ok:
        mov     [lparam],eax
        mov     [ofn.lpstrFile],eax
        mov     [ofn.lpstrFilter],asm_filter
        mov     [ofn.Flags],OFN_EXPLORER+OFN_HIDEREADONLY+OFN_OVERWRITEPROMPT
   mov [ofn.lpstrTitle],NULL ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<
        invoke  GetSaveFileName,ofn
    

I think this is what you speak of?
Next time post snippet for us to eat.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 20 Aug 2011, 02:21
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7275
Location: Kraków, Poland
Yes, this is GetSaveFileName missing set-up for one parameter and that's how this should be fixed.
Post 20 Aug 2011, 07:51
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16586
Location: Earth 2.0 beta
A new version of 1.69.32 has been uploaded.
Post 20 Aug 2011, 15:48
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1904
> this should be fixed.

Could you look into the open DOS IDE problems too
please ?

> A new version of 1.69.32 has been uploaded.

Many silent updates of this 1.69.32 so far Smile
Post 21 Aug 2011, 02:17
View user's profile Send private message Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
DOS386 wrote:
> this should be fixed.

Could you look into the open DOS IDE problems too
please ?

> A new version of 1.69.32 has been uploaded.

Many silent updates of this 1.69.32 so far Smile


Not true, but it's not obvious because it's not written anywhere, except in the about menu item. The ide has a separate version number, and the version I wrote + 1 number is the corrected one Smile
Post 25 Aug 2011, 01:46
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2019, Tomasz Grysztar.

Powered by rwasa.