flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Examples and Tutorials > BASELIB: General purpose libs for beginners

Goto page Previous  1, 2, 3, 4, 5, 6
Author
Thread Post new topic Reply to topic
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
I updated the library (revision 1.1.18 ).

+ Minor corrections to Linux's version of "delay" routine (32 and 64-bit)

+ I am suspending all release of DLLs, SO and .O until further notice.

+ Now core files and stack32 files are combined under "core.zip" downloadable at the first post. These are the main source for the library.

As this is the 100th post, I hope no more bugs after this xD
Post 23 Mar 2016, 14:36
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: 14469
Location: ?                               Posts: 6699

fasmnewbie wrote:
I hope no more bugs after this

There are always more bugs to fix. Razz
Post 23 Mar 2016, 14:39
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358

revolution wrote:

fasmnewbie wrote:
I hope no more bugs after this

There are always more bugs to fix. Razz

And that's the price I have to pay to maintain just a simple library. I can't imagine Tomasz and you maintaining even more difficult things.
Post 23 Mar 2016, 15:13
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
I added the MZ version library so now you have 2 library (flat COM and segmented MZ) for 16-bit. They've been included in the first post's attachment (revision 1.1.19).

Note:

1. MZ routines support only single segment for data. That means all your data should reside inside the same segment designated for data. If you are not using any of the routine, you can use as many segments for data as you want.

2. These routines both (libcom.asm and libmz.asm) use BIOS services for default I/O. If you want to use int 21h instead, you can find the equivalent routines that use int 21h disabled at the end of the source. Replace or disable the BIOS-based routines and use / enable these instead.

3. Not fully tested. hihi xD
Post 28 Mar 2016, 00:38
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Since the server speed is back to normal, I re-uploaded the .o, .so and DLL version of the library. If in doubt, just use the source version at post #1. But once you got annoyed by the source following u everywhere xD, you can switch to their object counterparts. I am done here and enjoy learning FASM.
Post 30 Mar 2016, 06:02
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Fixed fatal bugs to mem_alloc (linux32 versions).

At the same time, I also added file handling routines to all 32-bit sources that were missing in previous releases. Also added "mem_load" to all 32-bit sources. So now both 64-bit and 32-bit sources are almost even in terms of total routines.

A little improvement here and there. I trimmed the doc size to help reduce site load.

I hope no more bugs after this because that would tempt me to add more routines... and eventually lead to potential new bugs and this thing can go on forever xD
Post 07 Apr 2016, 15:19
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: 14469
Location: ?                               Posts: 6699

fasmnewbie wrote:
I hope no more bugs ...

There are always more bugs to fix. Razz

fasmnewbie wrote:
... after this because that would tempt me to add more routines... and eventually lead to potential new bugs and this thing can go on forever

Software is never finished. Razz
Post 07 Apr 2016, 15:56
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Added AVX support via prnymm, dumpymm and clearymm to all 320bit and 64-bit libraries. cpuid is done at the beginning of each routines to check whether you have AVX on your system.

If there's no fatal bug then take this as the final additions and edit.
Post 15 Apr 2016, 13:57
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Just updated the libs.
Post 07 Aug 2016, 23:31
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Updated the lib with these changes;

[+] rand - get one unsigned random int of range 0 to N
[+] randq- Generate unique random integers (unsigned) of range 0 to N-1
and save to an array
[-] rndigit - deleted
[+] int2str
[+] file_copy
Post 17 Sep 2016, 18:45
View user's profile Send private message Visit poster's website Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Just uploaded new updates. Refer to first post. Future updates / uploads maybe hosted on Google+ page. Or you can download directly from BASELIB folder
Post 02 Dec 2016, 16:47
View user's profile Send private message Visit poster's website Reply with quote
filox



Joined: 13 Feb 2013
Posts: 9
Small improvement
Hi fasmnebie,
very cool and needed lib; only a little improvement over your examples:

using native fasm object linking, you could specify also local libs to be linked to your binary files; these libs could also be in any directory, example:

- your file core_5.asm

needed 'base3.so.1.0' --> needed './base3.so.1.0'

in this way you don't need to put your libs in folders like /lib/i386-linux-gnu

Am i wrong?


Very Happy
Post 10 Mar 2017, 09:33
View user's profile Send private message Reply with quote
fasmnewbie



Joined: 01 Mar 2011
Posts: 358
Hi filox. It's a useful suggestion. Users of this lib should take note.

There is a catch though. If you took it out of the system folder and place it under a user folder, the feedback from RIP is off by one or two bytes (I can't remember which). It's not wrong for users who don't really mind about the value of RIP but it does matter in 64-bit setting where code / segment should be aligned to their natural boundary. You can verify that by calling dumpreg for both versions.


Code:
segment readable executable
main:
        call [dumpreg

;Pay attention to RIP for both versions.

Anyway, appreciate your suggestion. I am always open to suggestions.
Post 11 Mar 2017, 15:39
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 Previous  1, 2, 3, 4, 5, 6

< 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.