flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Fresh Programmer's Guide issues

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



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
So I will continue writing Fresh Guide. First I will describe whole macro library (IMO it's more important than library reference), and maybe StrLib (it's source is documented, so I will just have to copy and paste function descriptions).

And what about the documentation format? Maybe I could write it in HTML, so it would be easy to convert it to CHM...

regards
Post 17 Jan 2004, 22:18
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Though, maybe .txt is better? Confused
We may convert it to any other format later.
Post 17 Jan 2004, 22:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
OK I made some progress in the Guide - I wrote about whole Standard Macro Library. And I wrote about examples in \examples directory so it would be nice if you could put them there Smile (they are included in the attachment).
btw, I think that work package of Fresh should containg only necessary files (source+executable) - it would be smaller then Smile

outdated attachement removed - new version can be found below


Last edited by decard on 27 Jan 2004, 20:37; edited 1 time in total
Post 22 Jan 2004, 17:24
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Hi, Decard.
Very good work! Smile

Only one small addition:

4.4 - The "import" macro check whether the imported function is used and imports it only if it is used. So, the simplest way is to include coresponding include files from "%finc%/win32/apia/" directory in the import section and let FASM to determine what to import and what not. Actually it doesn't slow compilation more that 1..2 seconds even on slow computer. Fresh uses the same approach.

Regards.
Post 22 Jan 2004, 18:43
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Hi John,
I found great tool that can be helper for writing the Fresh documentation - makedoc.exe utility from Allegro Library package. The idea is that you write your doc in special format. Actually you write in a normal way, you just have to add some symbols (like @heading to divide the doc into sections). Then makedoc will generate the documentation in the format of your choice - it can create plain text files, html, chm (it uses hhc.exe to compile it), rtf, and more Smile. With CHM I had to adjust contents file, but anyway it was very easy to generate the doc with this utility. So we can use it Very Happy

I updated Fresh Guide, and attached it in both chm and txt formats.
What do you think about the CHM version? I used allegro.css file from that library (its gift-ware Smile ) and IMO it looks very nice.

regards

outdated attachement removed - new version can be found below


Last edited by decard on 27 Jan 2004, 20:38; edited 2 times in total
Post 25 Jan 2004, 17:48
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7718
Location: Kraków, Poland
Tomasz Grysztar
In the section about the "export" macro (4.5) you forgot that exported functions have to be sorted alphabetically, and therefore also your example is wrong. Also it's stated there that "It should be used in import section", while you mean the export section.
Post 25 Jan 2004, 18:01
View user's profile Send private message Visit poster's website Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Thanks, Privalov! I just updated the doc.
Post 25 Jan 2004, 18:17
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Hi Decard.
Really good work! I will include it in the Fresh package as soon as posible.
CHM format is IMHO OK. I only have to read something about API to attach it to Fresh.
BTW: What you think about including source text of the base examples in the CHM file. It will be good for user to have direct access to mentioned sources.

Regards.
Post 25 Jan 2004, 20:34
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I wanted to do it myself. I looked at Html Help documentation, and its API seems t obe similar to WinHelp - you just have to call HtmlHelp function with CHM filename etc. The only problem is that HtmlHelp must be imported from hhctrl.ocx file, and I have no idea how to do it Sad.

JohnFound wrote:
BTW: What you think about including source text of the base examples in the CHM file.

I was thinking about the same and I wanted to ask you about this Smile

regards
Post 25 Jan 2004, 20:45
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7718
Location: Kraków, Poland
Tomasz Grysztar
I have done it once for one of the early versions of FASMW, but I have removed it then, as I didn't like it. The idea is quite simple - you have to load hhctrl.ocx with LoadLibrary and get address of HtmlHelp function with GetProcAddress - but you have to set up at least 64K stack for your program to get it working at all.
Post 25 Jan 2004, 20:50
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
OK, I leave it to you. Smile About OCX - it seems to be normal DLL (at least PEBrowse Pro think so. Wink ), just try to import the function usual way, via import macroses.

Regards.
Post 25 Jan 2004, 20:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Quote:
it seems to be normal DLL

Well I already realized that but when I tried to link it statically my program didn't work. Now when I set the stack to 64k everything is OK. I just wonder why does it need so big stack Confused
Post 25 Jan 2004, 21:06
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Privalov wrote:
The idea is quite simple - you have to load hhctrl.ocx with LoadLibrary...


Well, I just make quick test and the importing via import section seems to work fine. (The OCX is loaded on start of Fresh) Do you think it is mandatory to load it via LoadLibrary?

Regards.

[EDIT] Well I write it too slow. Very Happy Look at previous post.[/EDIT]
Post 25 Jan 2004, 21:07
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7718
Location: Kraków, Poland
Tomasz Grysztar
If you load it by import section, Fresh won't start on any Win32 system where hhctrl.ocx is not present (like Win95 with no HtmlHelp extension installed).
Post 25 Jan 2004, 21:10
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Hm, about the stack. It seems that HTML help uses a lot of OS resources, you know MS - every new version needs more resources. Smile

BTW: What you think about old fashioned HLP files?
Post 25 Jan 2004, 21:11
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
CHM is better it is smaller (compression) and it is much easier to create (from HTML source). Some time ago I was trying to create a HLP and I found it very difficult. And now I have makedoc.exe that generates beautiful CHMs Wink And I don't like HLP format because for me its just ugly Smile

btw, there was already a discussinon about it and most remember? http://board.flatassembler.net/topic.php?t=780 Wink
Post 25 Jan 2004, 22:17
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Yea, I remember that discution. But I am still highly mixed-up and have no clear opinion. Sad I don't want to overbloat Fresh with such MS "inventions". And Privalov is right, I remember that he tryed to implement CHM in FASMW and he rejected it, because of similar to mine reasons. I don't like HLP format too (although there are some free tools for easy building) but it behaves not very good. And we have:

1. HLP - Bad behaviour and features, but good API
2. CHM - Better behaviour and features but overbloated implementation.

Confused Confused Confused
Post 25 Jan 2004, 22:26
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I don't think that CHM is just a "MS invention" - now it is a standard, most new applications use it. Its API seems to be really simple too - we will just have to add some 'LoadLibrary' code in the initialization part. Also, even my slow machine works fine with CHM (even with bigger ones). And, as somebody mention in that topic, CHM seems to be more portable (it is supported in Linux) than HLP.
Post 25 Jan 2004, 22:38
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
OK, Decard. Maybe you are right. At least when the one have no opinion ( I mean myself ) he have to listen the people that have. Wink
It's your part of Fresh, so make it and we will see what will happen.
If I can help with something, just call me. BTW: Do you think that LoadLibrary is better than simple import in import section?

Regards.
Post 25 Jan 2004, 22:43
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Yeah, because implementing it as LoadLibrary will be easy, and not having hhctrl.ocx can be a problem sometimes (maybe not too many people still use Win95, but I think that also Wine doesn't have this file as a standard Question), so IMO making Fresh dependend on this file isn't good.
Post 25 Jan 2004, 22:58
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-2020, Tomasz Grysztar.

Powered by rwasa.