flat assembler
Message board for the users of flat assembler.

Index > Main > fasm standard library

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



Joined: 26 Jun 2003
Posts: 48
Location: USA - NV
jInuQ 08 Jan 2004, 01:47
Hello,
I know that fasm doesn't have a standard library ,but would it be worth the effort to implement something like the C stdlib? If anyone is interested you can email me, post here or hit me up on GAIM(AIM).

_________________
jInuQ

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint Exupery
Post 08 Jan 2004, 01:47
View user's profile Send private message Visit poster's website AIM Address Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 08 Jan 2004, 05:40
Fresh have standard library. (Still in developement, but it works)
Of course you can use it with every other version of FASM too.

Regards.
Post 08 Jan 2004, 05:40
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
jInuQ



Joined: 26 Jun 2003
Posts: 48
Location: USA - NV
jInuQ 08 Jan 2004, 06:28
Is there a function reference for the fresh stdlib?
Also is there any current planning on what the stdlib will provide?

Is there any objective to the stdlib?

_________________
jInuQ

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint Exupery
Post 08 Jan 2004, 06:28
View user's profile Send private message Visit poster's website AIM Address Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 08 Jan 2004, 08:16
jInuQ wrote:
Is there a function reference for the fresh stdlib?
Also is there any current planning on what the stdlib will provide?
Is there any objective to the stdlib?


Well, there are already many files in Fresh library (I mean the files in the directory: include/libs/ of the Fresh). They was written to provide Fresh developement, but they are very common and will be used for Fresh written application too. Some of them are almost finished and standard now, others maybe will be changed. Unfortunately there is still no functions reference, but sources are commented pretty good. (BTW: Creating of some standard library refernce will be very good contribution for Fresh project. Smile )

Here is the list of main library files with short description:

1. StrLib - library for dynamic strings handling.
2. gui - library for handling owner draw menus, toolbar and so called "actions", providing common interface between menus and toolbars
3. winalign - library providing autoalignment of the windows and subclassing of every window in the application - you can attach in standard way custom message handlers to controls.
4. trees (from next release) - library for handling dynamic arrays and trees - not finished yet.
5. qsort (from next release) - custom QuickSort function for different types of data.

All these libraries require StdCallEx.inc macro library from include/macro/ directory, instead of StdCall.inc

Regards.
Post 08 Jan 2004, 08:16
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
jInuQ



Joined: 26 Jun 2003
Posts: 48
Location: USA - NV
jInuQ 08 Jan 2004, 09:17
Okay, Will have to take a look.

The gui and winalign stuff are of no value to me in a standard library( Can't quite think of how to say that so it does not come across mean. ). I am thinking cross platform not just windows.
I am also think self contained. Not sure how you have the file tree layed out .

_________________
jInuQ

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint Exupery
Post 08 Jan 2004, 09:17
View user's profile Send private message Visit poster's website AIM Address Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 08 Jan 2004, 10:37
jInuQ wrote:
I am thinking cross platform not just windows.


Well, in this case it is not for you. Fresh libraries are especially for Windows programming and they provide functions that are not very easy to implement in assembler and that everyone rewrites again and again: Specific window handling (ownerdraw, alignment), dialog windows, dynamic data structures. Almost all of them uses Windows memory management functions. So, maybe it is possible to be ported to other platforms, but it is not easy IMHO.

Maybe in the future there will be Fresh libraries for other platforms (Especialy I think about no-platform, OS-developement libraries), but at first we need to release at least one complete Fresh version. Smile

Regards.
Post 08 Jan 2004, 10:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde 08 Jan 2004, 18:28
jInuQ wrote:
Hello,
I know that fasm doesn't have a standard library ,but would it be worth the effort to implement something like the C stdlib? If anyone is interested you can email me, post here or hit me up on GAIM(AIM).


The HLA (High-Level Assembler) standard library has been partially ported for use by FASM programmers. The HLA Standard Library *is* cross platform (Linux and Windows) and, in fact, well-written HLA programs compile and run under either OS without change. In theory, the same should be possible with FASM. Note, however, that the binary images at the URL below have only been compiled under Windows, so you'll have to grab the Linux version of HLA to get the Linux binaries for the stdlib, as well.

There are, literally, hundreds of functions available in the HLA stdlib. Many of the routines were inspired by the C standard library, though HLA has a lot of functionality you won't find in the C stdlib.

HLA stdlib for FASM users:
http://webster.cs.ucr.edu/Page_AdvAsm/0_HLA4FASM.html

Documentation for HLA and the HLA stdlib:
http://webster.cs.ucr.edu/Page_hla/0_Page_hla.html

Note that the HLA Standard Library routines are all public domain. Source code can be found at the URL immediately above. Feel free to adopt and adapt these functions as you see fit.
Cheers,
Randy Hyde
Post 08 Jan 2004, 18:28
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 08 Jan 2004, 18:36
For friends who are interested in using Fasm with static libraries:Polink from Pelle's C package is free MS COFF linker which is able to process static libraries.

_________________
Code it... That's all...
Post 08 Jan 2004, 18:36
View user's profile Send private message Visit poster's website Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde 03 Feb 2004, 21:17
Has there been any more interest in a formal "FASM Standard Library"? I'm currently putting together a web page for FASM on Webster and if such a library is available I'd like to reference it.
Cheers,
Randy Hyde
Post 03 Feb 2004, 21:17
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 03 Feb 2004, 21:22
What kind of stuff do you plan to put on that page? Do you need some help with it?
Also, do you plan do update that article on assemblers? It contains many information about fasm that are either not up to date or even not true at all.
Post 03 Feb 2004, 21:22
View user's profile Send private message Visit poster's website Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde 04 Feb 2004, 16:56
Privalov wrote:
What kind of stuff do you plan to put on that page? Do you need some help with it?
Also, do you plan do update that article on assemblers? It contains many information about fasm that are either not up to date or even not true at all.


http://webster.cs.ucr.edu/AsmTools/FASM/index.html

Which Assembler? is next on my list of things to take care of.
So if you'd send me an email with the FASM issues, I will certainly update it within the next few days.

Ditto for any other assembler out there (if anyone has any comments to make). Also, if anyone has ever used NBASM, I'd appreciate comments on that.

One thing I am looking for, for the FASM support page, is sample programs, converted Iczelion tutorials, and any FASM-related documentation that I can put up on Webster.

When FRESH reaches a point of stability, I'll be more than happy to make the binaries available on the FASM page.

I'm also planning on sticking a bunch of FASM-related links on the FASM page, so if anyone out there has a FASM-related web site and would like me to add a link to the FASM page, please email the URL to rhyde@cs.ucr.edu (I will add the URL to Webster's general links page as well as put it on the FASM page).

Obviously, if anyone finds any problems on Webster (it has recently gone through a *massive* reorganization and, undoubtedly, some things have broken), I'd appreciate a quick note.

Cheers,
Randy Hyde
Post 04 Feb 2004, 16:56
View user's profile Send private message Visit poster's website Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde 04 Feb 2004, 16:58
Privalov wrote:
What kind of stuff do you plan to put on that page? Do you need some help with it?


One item I would like to put on Webster is a side-by-side comparison of assembly source files. My thought is to use the Iczelion tutorials (which seem to have been translated to just about every Win32-capable assembler these days. If someone has a link to a set of converted tuts for FASM, that would save me the time of searching for it (no doubt, they're probably on this very board, but I've not looked at all yet).
Cheers,
Randy Hyde
Post 04 Feb 2004, 16:58
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 04 Feb 2004, 19:34
Randall Hyde wrote:

If someone has a link to a set of converted tuts for FASM, that would save me the time of searching for it (no doubt, they're probably on this very board


Hi Randall,

Here are some links.

From Privalov,Iczelion's tutorials 2-7 converted to Fasm:

http://board.win32asmcommunity.net/attachment.php?s=&postid=54074

Imagineer's conversion works:

http://board.flatassembler.net/topic.php?t=180&highlight=
http://board.flatassembler.net/topic.php?t=200&highlight=
http://board.flatassembler.net/topic.php?t=187&highlight=
http://board.flatassembler.net/topic.php?t=174&highlight=
http://board.flatassembler.net/topic.php?t=169&highlight=
http://board.flatassembler.net/topic.php?t=164&highlight=

_________________
Code it... That's all...
Post 04 Feb 2004, 19:34
View user's profile Send private message Visit poster's website Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde 05 Feb 2004, 04:47
Vortex wrote:
Randall Hyde wrote:

If someone has a link to a set of converted tuts for FASM, that would save me the time of searching for it (no doubt, they're probably on this very board


Hi Randall,

Here are some links.



Thanks,
I'll grab these as soon as I get the chance.
Cheers,
Randy Hyde
Post 05 Feb 2004, 04:47
View user's profile Send private message Visit poster's website Reply with quote
jInuQ



Joined: 26 Jun 2003
Posts: 48
Location: USA - NV
jInuQ 05 Feb 2004, 06:22
As far as I know the only one that was interested in helping was gorshing and he is currently unable to help. As how it stands now I am tinkering with the code. I was thinking something like a std c library ,but if no one seems interested I am not much for working on it, as I have other coding projects that would do well with the add time.

_________________
jInuQ

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint Exupery
Post 05 Feb 2004, 06:22
View user's profile Send private message Visit poster's website AIM Address Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 05 Feb 2004, 19:07
i like idea of standard library, i would also help when i can (altough i am in 2 projects now and i dont have time). But i think you should create some plans how should it look and post them for comments.
Post 05 Feb 2004, 19:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 06 Feb 2004, 11:18
Hi jInuQ,

Why not to convert Hutch's masm32 library to Fasm? That lib contains a lof to usefull and optimized algos.

_________________
Code it... That's all...
Post 06 Feb 2004, 11:18
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 06 Feb 2004, 12:50
include IMHO
Neither the C std lib not the masm32 are good starting points for a fasm std lib.
And I don´t see a need to translate them as they already exists and are easily usable.
They are in general terms a bunch of some-usable some-not-so-usable functions, without structure and penalized for backward compatibilities with old code styles and paradigms.

I think it is time to reengineer the concept, in order to take advantage of the assembly language, the fasm capabilities and new developement directions/needs.

The core of the new fasm stdlib should be as portable as the fasm itself, in order to change only the interface no matters what operating system you will be using next month Wink
Post 06 Feb 2004, 12:50
View user's profile Send private message Yahoo Messenger Reply with quote
Randall Hyde



Joined: 03 Dec 2003
Posts: 57
Randall Hyde 06 Feb 2004, 17:17
pelaillo wrote:
include IMHO
Neither the C std lib not the masm32 are good starting points for a fasm std lib.

They are good starting points insofar as people use them and know how to use them. They also provide good examples of library routines people already use, so they're known to be useful to *somebody*.

Quote:

And I don´t see a need to translate them as they already exists and are easily usable.

True, but what would be useful are FASM header files that provide the prototypes, constants, structs, etc., that would be needed to conveniently call those routines. One of the benefits of a "standard library" is that you can include a pre-written header file and have access to all of the library routines without any additional work. Having to create all your own external definitions and constant definitions in order to call an existing routine is a bit of a pain. Having the FASM stdlib header files (even if they call existing MASM32 library functions) is a *big* help.

Quote:

They are in general terms a bunch of some-usable some-not-so-usable functions, without structure and penalized for backward compatibilities with old code styles and paradigms.

Some yes, others no.
What would *you* suggest as a set of routines to have?

Quote:

I think it is time to reengineer the concept, in order to take advantage of the assembly language, the fasm capabilities and new developement directions/needs.

Sounds good. What do you propose?

Quote:

The core of the new fasm stdlib should be as portable as the fasm itself, in order to change only the interface no matters what operating system you will be using next month Wink

Yep. That, for example, is one of the advantages of the C stdlib and the HLA stdlib. There is no reason at all, for example, that you should have to call different routines with different semantics to do file I/O under Linux vs. Windows vs. whatever. The C stdlib proved this 30 years ago.

The next step is to determine which routines average FASM users would find useful in a standard library. Then people could contribute those routines that *they* immediately need (and, therefore, are willing to write or have written already). The only important thing is to have someone in charge of the whole project to enforce styles and interfaces (e.g., you'd like the same generic calling sequence for routines throughout the library to keep things consistent and easy to use).
Cheers,
Randy Hyde
Post 06 Feb 2004, 17:17
View user's profile Send private message Visit poster's website Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 06 Feb 2004, 18:52
Providing headers for other libraries is useful. I have provided those I have produced so far. Translating old-good existing libraries is not so useful as they do the work well and fasm syntax permit an easy tie with them.
That's the meaning of my post.

Randall Hyde wrote:
The next step is to determine which routines average FASM users would find useful in a standard library.


That's the point I am trying to avoid: a large list of functions that need to remember and with a poor connection or logical relation between them. I think this is the reason that none of the assembly standard libraries are widely used. Maybe I'm wrong Confused but I know several good assembly standard libraries with source code and not used for one reason or another. Maybe we (asm coders) like reinventing the wheel Shocked

I wish I have the solution to this. All I can do is to start a brainstorming here, before someone starts coding with a lot of effort to produce good code that people simply won't use.

30 years ago, C stdlib provided that advantage to C programmers and thus become widely adopted. But using C stdlib in assembly is like using a computer exclusively to read emails. This is easy but there are a lot of unused resources.

The problem is that "standard" means that you give away performance to obtain portability or reusability. That's the reason we need to focus on one single task to produce a good compromise.

The task will be better accomplished by teams:
People united by interests as they are doing here in the 2D graphic lib: http://board.flatassembler.net/topic.php?t=599
Other example is the libraries in Fresh: growing and evolving as they are needed. If more projects use them, they will become smarter, better.

Actually we are biased by C and existing OSes but I think assembly is more than that. We need to take advantage of it and superseed the coding style invented 30 years ago Smile
Post 06 Feb 2004, 18:52
View user's profile Send private message Yahoo Messenger 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.