flat assembler
Message board for the users of flat assembler.

flat assembler > IDE Development > Fresh 1.0.0A pre-alpha

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
OK, here is next release of Fresh 1.0.0A - pre-alpha.

Now there are mass changes to the source files, because of new macro: proc/endp. So, better read "history.inc" and look at the sources.

You should recompile, because exe file is not included.

Any comments are highly recomended. Smile

Regards.

[edit] Outdated attachement removed. Look for thread with 1.0.0C version.[/edit]


Last edited by JohnFound on 12 Oct 2003, 15:05; edited 1 time in total
Post 27 Sep 2003, 16:39
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
Quick look: no problems.
Just one detail, GeneralStructure.inc, the procedures there sitll use enter, return Wink

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 27 Sep 2003, 18:22
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
scientica wrote:
Quick look: no problems.
Just one detail, GeneralStructure.inc, the procedures there sitll use enter, return Wink


Very Happy Yea, and in whole designtime directory. Smile

BTW: Little addition to history.inc:
Code:
- Introduced procedure "JumpTo" for size optimized message handling. Look at sources of some window procedure for example: MainWindow.asm|MainWindowProc
    


Regards.
Post 27 Sep 2003, 19:02
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
Dear John,

Your conversion of strlib to your macroses introduced one bug: you have changed some functions to use "macro" parameters, and the rest of them not, which made them not pop parameters from stack.
It wasn't very clear explanation, so I'll show it on example:
Code:
proc StrDup         ; proc StrDup [hBaseStr]
        begin
        mov     eax,[esp+4]             ; mov eax,[esp+4]
        or      eax,eax
        jz      .exit
        stdcall StrNew,0
        stdcall StrCopy, eax,dword[esp+4]    ; stdcall StrCopy, [hBaseStr]
.exit:
        return
endp 'StrDup'    

It doesn't pop it's argument because 'ret 4' were changed to 'return'...

fortunatelly your macroses allow this contsruction:
Code:
proc some_proc    ; proc some_proc [arg1], [arg2]
    begin
    ; (some code)
    ret 8
endp 'some_proc'    

Now I'm fixing it Smile

Another problem is that 'proc' macro uses ..TotalProc variable, which is declared in fresh.asm file. IMO it should be moved to stdcallex.inc file, so people that will use StrLib in other projects won't have to declare ..TotalProc in their source files.

btw, why do you still use 'begin' instead of 'enter' as there are no name conflicts now?

regards,
decard
Post 28 Sep 2003, 17:43
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
decard wrote:
Dear John,
Your conversion of strlib to your macroses introduced one bug: you have changed some functions to use "macro" parameters, and the rest of them not, which made them not pop parameters from stack.
It wasn't very clear explanation, so I'll show it on example:
Code:
proc StrDup         ; proc StrDup [hBaseStr]
        begin
        mov     eax,[esp+4]             ; mov eax,[esp+4]
        or      eax,eax
        jz      .exit
        stdcall StrNew,0
        stdcall StrCopy, eax,dword[esp+4]    ; stdcall StrCopy, [hBaseStr]
.exit:
        return
endp 'StrDup'    

It doesn't pop it's argument because 'ret 4' were changed to 'return'...

Sorry, my fault. Sad BTW: I changed some other procedures to use ebp as argument pointer, check and you will see how compact they become, because of no need of registers. I still think that using [esp] is not very good idea from strategic point of view. Now I even sorry, that I begin strlib with register parameter passing instead stdcall.

Quote:
Another problem is that 'proc' macro uses ..TotalProc variable, which is declared in fresh.asm file. IMO it should be moved to stdcallex.inc file, so people that will use StrLib in other projects won't have to declare ..TotalProc in their source files.


My fault again. Smile ..TotalProc is debug variable I used on convertion the project to new macroses. Symply remove it from "proc" definition and everything will be OK.

Quote:
btw, why do you still use 'begin' instead of 'enter' as there are no name conflicts now?

There are name conflicts: "enter" is a name of instruction and using it as name of macro is not good idea. For example, Fresh editor highlights it like instruction instead as macro. Paste some assembler source in the editor and you will see. Smile

Regards.
Post 28 Sep 2003, 18:44
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
JohnFound wrote:
BTW: I changed some other procedures to use ebp as argument pointer, check and you will see how compact they become, because of no need of registers. I still think that using [esp] is not very good idea from strategic point of view. Now I even sorry, that I begin strlib with register parameter passing instead stdcall.


Hmmm.... generally I agree.... but IMO it's good to keep at least 'critical' functions like StrPtr and StrLen without ebp as argument pointer... It will be a good compromise IMO Smile. But the way functions are handling parameters is not so important. It is important that they are the same from user point of view Smile

I have a little suggestion about the source docs: maybe you should add a file that fill shortly describe the purpose of each source file...
Post 28 Sep 2003, 19:39
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
Hi Decard.
I am 100% agree with you. Smile
The doc file with description will be in the next release.

Regards.
Post 28 Sep 2003, 19:44
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
decard wrote:
I have a little suggestion about the source docs: maybe you should add a file that fill shortly describe the purpose of each source file...

What about this solution? (when checking this post one last time before posting I see - but anyway harsyra should be able to interprent them, as they might/do contain important info about (/the procs in/) the file).
Code:
;***[anything]
; File name/Descriptive name (eg: "FASM dynamic string library.")
; this comment block is considered to be the file comment.
; the basic "formula"/pattern i pseudoBasicPro:
; IF the first line/{dword of file} contains ";***" THEN
;  next line is file/descriptive name.
;  UNTIL next ";***" everything is a description comment
; FI;
;***[anything] 
    

I'm not sure I've described it good, but basically one possible out put is:
Quote:
File: Dummy.asm - File name/Descriptive name (eg: "FASM dynamic string library.")
Code:
 this comment block is considered to be the file comment.
 the basic "formula"/pattern i pseudoBasicPro:
 IF the first line/{dword of file} contains ";***" THEN
  next line is file/descriptive name.
  UNTIL next ";***" everything is a description comment
 FI;    


And one more detail, note "the first line/{dword of file}", means that It must be the very first dword in the file, typing:
Code:
format PE
;***
...    

wouldn't be recognised as a file comment/description
and
Code:
;***
format PE
;... comment    

will cause the "format PE" to be included in the outout.

(Just ask me if you don't understand my jibberish Wink)
Here is how strlib would be interprented:
Code:
;************************************************************
; FASM dynamic string library.
;
; (c)2003 John Found
; (c)2003 Mateusz Tymek (aka decard)
; (c)2003 Victor Loh (aka roticv)
;
; You can use and modify this library, as long as modifyed
; versions are clearly marked (author of the modification
; and what is changed), copyright notice is not
; removed and the library remains free.
; Copyright for the library concept and parts written by
; me, remains to me, John Found
; Copyright for the modifyed/new parts remains to their
; authors.
;
; Versions:
;   dd.mm.yyyy  version   author of modification
;     - description
;--------------------------------------------------------
;   09.07.2003  v1.0    John Found
;     - the first public version.
;   15.07.2003  v1.0.1  John Found
;     - minor bug with string table expand. Look in NewStr
;   17.09.2003  v1.1.0  Mateusz Tymek
;     - made all functions stdcall
;     - added StrCat and StrPos, and modified StrLen
;   25.09.2003  v1.1.2  Mateusz Tymek, Victor Loh
;     - added StrLCase, StrUCase, StrCopyMMX, StrInsert
;     - added new NumToStr, old version renamed to _NumStr
;     - some small optimizations & bugfixes
;   26.09.2003 v1.1.3 JohnFound Some bug fixes and style corections.
;************************************************************  
    

Quote:
File: strlib.asm - FASM dynamic string library.
Code:
 (c)2003 John Found
 (c)2003 Mateusz Tymek (aka decard)
 (c)2003 Victor Loh (aka roticv)

 You can use and modify this library, as long as modifyed
 versions are clearly marked (author of the modification
 and what is changed), copyright notice is not
 removed and the library remains free.
 Copyright for the library concept and parts written by
 me, remains to me, John Found
 Copyright for the modifyed/new parts remains to their
 authors.

 Versions:
   dd.mm.yyyy  version   author of modification
     - description
--------------------------------------------------------
   09.07.2003  v1.0    John Found
     - the first public version.
   15.07.2003  v1.0.1  John Found
     - minor bug with string table expand. Look in NewStr
   17.09.2003  v1.1.0  Mateusz Tymek
     - made all functions stdcall
     - added StrCat and StrPos, and modified StrLen
   25.09.2003  v1.1.2  Mateusz Tymek, Victor Loh
     - added StrLCase, StrUCase, StrCopyMMX, StrInsert
     - added new NumToStr, old version renamed to _NumStr
     - some small optimizations & bugfixes
   26.09.2003 v1.1.3 JohnFound Some bug fixes and style corections.    

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 28 Sep 2003, 21:17
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
Hi, scientica.
It's a good idea to make harsyra to support comments about whole file not only some parts. Only I think that to it is a little bit uncomfortably to force file comments on the first line of the file. Maybe some another header will be more usefull, because ;*** is too common comment:
Code:
        .....
        .....  ; user code
        .....  ; the next line begins with ;<<< - dword.
;<<< FILE: Descriptive name >>>>>>>>>>>>>>>>>>>>>>>>
; Every comment line following is interpreted as file description.
;  bla bla
; bla bla
      mov eax, ebx ; the first line that is not comment only is interpretted as end of the file description.
        .....  ; user code
    


Note, that harsyra have to work with files written by people that may know nothing about formats of the comments. In this cases it may show nothing but it should not show nonsence information.

Regards.
Post 29 Sep 2003, 07:05
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
Hi JohnFound.
JohnFound wrote:
Code:
        .....
        .....  ; user code
        .....  ; the next line begins with ;<<< - dword.
;<<< FILE: Descriptive name >>>>>>>>>>>>>>>>>>>>>>>>
; Every comment line following is interpreted as file description.
;  bla bla
; bla bla
      mov eax, ebx ; the first line that is not comment only is interpretted as end of the file description.
        .....  ; user code
    


Ok, then maybe thisis a better way:
Code:
;<<< Descriptive name <<<<[<<<...<<<]
;  file description
;>>>[>>>...>>>]
    

Where the "key-dword" is ";<<<", and anyting after it untill a "<<<<" is read as the descriptive name (leading and trailing spaces ignored).
Everything from the next line untill the line that starts with the key-dword ";>>>" is the description.
/me bashes head in /dev/wall -- I've made my self more work than needed - of course it easier to use the first non comment line be the end of acomment block.

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 29 Sep 2003, 13:14
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1095
Location: Poland
Hi All!

I tried to change MiniPad example to work with AsmEdit, and it didn't work properly... Then I realized that it requires some more setup (adding some data to data section, creating and setting it's font, etc). IMO some of this initialization should be done by AsmEdit itself, and some 'how to use' information should be included in asmedit.txt file... What do you think?
Post 29 Sep 2003, 18:25
View user's profile Send private message Visit poster's website Reply with quote
GuyonAsm



Joined: 27 Sep 2003
Posts: 45
No offense to you guys and your work but i like the way fasm is now which its plain and simple syntax highlighted editor. Perhaps you guys could add onto that, but creating a whole new standonlone is a little overboard, but i must admit i am impressed with you guys work. Surprised
Post 04 Oct 2003, 02:27
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
GuyonAsm wrote:
No offense to you guys and your work but i like the way fasm is now which its plain and simple syntax highlighted editor. Perhaps you guys could add onto that, but creating a whole new standonlone is a little overboard, but i must admit i am impressed with you guys work. Surprised


Thank you. I like FASMW very much, but it is too feature poor, when we talk about big projects. I know it now why we try to make really big project with FASMW (AFAIK, for now Fresh is biggest Windows application written fully in FASM.) So, the idea of Fresh is to make Windows developement really very fast. Fresh will be more than "Source editor/Resource editor" combination. The Idea is to make source creation tool, that will generate source for you, very rapidly. This is the main reason why Fresh still can't open/save/compile files - simply this is not the first priority.

Regards.
Post 04 Oct 2003, 07:49
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
One "detail" that I think we shuld add to the editor is a splitter, it's become more and more: type-scroll-look-scroll-type-scroll-type-scroll-look-scroll... And a splitter would ease things.

Btw, I just noticed that debug code takes place (at least the way I've implemented it in harsyra), thakes 1.0 secs, 5 passes and brings a 11776 B exe with debug info/code, and without it only takes 0.8 secs, still 5 passes, and only 4096 B.

g2g got guest comming now, bye. Smile

[EDIT]Just rembered reading about the .bss/unitialized data, they must be in the en of the section to be "unitialized". So I move some debug data around and voilá own to 6144 B w/ dbg code[/EDIT]

_________________
... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself.
- Bradley Kuhn
Post 04 Oct 2003, 10:30
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
GuyonAsm



Joined: 27 Sep 2003
Posts: 45
When you guys produce a nice fully funtional version for the public i'll be sure to test it. =)
Post 04 Oct 2003, 15:03
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.