News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

The Library

Started by PBrennick, July 15, 2006, 03:30:49 PM

Previous topic - Next topic

PBrennick

A link to the project is coming soon.  In the meantime, I am working on the Library portion of the project.  You can help.  Do you have a favorite subroutine that you find performs a function you have not seen in any other Library?  You can add it to the GeneSys Library by posting it here.

What I will need:
The name of the function (this may change but I will always discuss it with you, first).
The code for the function.
A documentation for the function (a brief discription of its purpose).
Your name as you would like it to appear in the source. (Usernames are acceptable for people who do not want their real name used).
You must allow me to include the source in the project, the source for ALL Library code will be listed in the project.

This is your opportunity to contribute to something that will be used around the world, isn't that exciting?
Paul

The GeneSys Project is available from:
The Repository or My crappy website

PBrennick

#1
The library has been updated.  Two functions have been added and three have been renamed.  The two versions have been moved to the repository and is no longer an attachment to this topic.  This makes things a whole lot simpler.

DLL Version
Library Version

This is the current list of functions:
        ClearConsole
        CompareStr
        ConsoleIn
        ConsoleOut
        CopyMem
        CopyString
        CreateBmpFromMem
        GetErrorMessage
        GetScreenHeight
        GetScreenWidth
        LowerCase
        StrLen
        UpperCase
        WriteToMemHeap

How does the list of names look?
Paul
The GeneSys Project is available from:
The Repository or My crappy website

Vortex

Good start Paul. I will send tomorrow my CreateBmpFromMem function to be a member of the library.

Paul, would you like to rename the library as GeneSys.lib ?

James Ladd


Wow, code already. You guys rock.

Can I ask for a DLL as well as a LIB? I prefer dynamic linking to static.

Rgs, James.

PBrennick

James,
Look in tomorrow, if you get the chance, I will have a DLL, then.  I will wait until after Erol makes his submission and then create it.  He is seven hours ahead of me so it will probably be there first thing in my morning which is [GMT-5]

Vortex,
Okay, I will rename the library and the DLL to GeneSys respectively.  Good idea.  The name of the folder in the project will have to have another name as the entire package will be installed into a GeneSys folder so I don't want a path like \GeneSys\GeneSys\GeneSys.lib, the one in the middle needs to change.  Any ideas, anyone?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

zooba

GSLIB?

I'm willing to contibute my StringFormat procedure, similar but IMHO cleaner and more appropriate for assembly than C's.

Cheers,

Zooba :U

PBrennick

Zooba,
Feel free to contribute.

What I will need:
The name of the function (this may change but I will always discuss it with you, first).
The code for the function.
A documentation for the function (a brief discription of its purpose).
Your name as you would like it to appear in the source. (Usernames are acceptable for people who do not want their real name used).
You must allow me to include the source in the project, the source for ALL Library code will be listed in the project.

Thank you for participating in this project.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

zooba

Paul,

Before I contribute it I'd prefer to get a feel for how the library will be structured. There is quite a lot of modification required to use it separately from ASM Runtime and I'd rather see the support functions required (quite a few) provided by others. I'd also prefer to be able to preserve the 'look-and-feel' of the library, rather than having a whole mish-mash of different interfaces, etc.

Cheers,

Zooba :U

James Ladd

Guys,

Can I suggest that you use my subversion repository and server for the source so you can work
on it between yourselves and not clobber each others work ?

Subversion is so simple to use and for what you are doing, source / version control is a must.

PM me if you want to know more.

Rgs, James.

PBrennick

There is a dll version of the library and a new lib version.  The zip at the start of the topic has been replaced with the new stuff.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Vortex

Hi Paul,

Why not to put GeneSys.lib in the lib folder? It should be together with the import libraries, in my modest opinion.

Vortex

Here is my CreateBmpFromMem procedure with a demo.

[attachment deleted by admin]

Vortex

There is an easy way to build the DLL. Paul, you can use a simple GeneSys main module without rewriting the library source code :

GeneSys.asm :
.386
.model flat,stdcall
option casemap:none

Include \GeneSys\include\windows.inc
Include \GeneSys\include\kernel32.inc
Include \GeneSys\include\gdi32.inc
Include \GeneSys\include\shell32.inc
Include \GeneSys\include\user32.inc
Include GeneSys.inc

IncludeLib \GeneSys\lib\kernel32.lib
Includelib \GeneSys\lib\gdi32.lib
Includelib \GeneSys\lib\shell32.lib
Includelib \GeneSys\lib\user32.lib

DLL_PROCESS_DETACH equ 0
DLL_PROCESS_ATTACH equ 1

.code

DllEntry proc hInst:HINSTANCE, dReason:DWORD, reserved1:DWORD
    mov eax, dReason
    .if eax == DLL_PROCESS_ATTACH
      xor eax, eax
      inc eax
    .elseif eax == DLL_PROCESS_DETACH
      xor eax, eax
      inc eax
    .endif
    ret
DllEntry Endp

End DllEntry


make.bat :
\GeneSys\bin\ml /c /coff @library.rsp
\GeneSys\bin\ml /c /coff GeneSys.asm
\GeneSys\bin\link /SUBSYSTEM:WINDOWS /DLL /DEF:GeneSys.def GeneSys.obj @library2.rsp


library2.rsp :
conin.obj
conout.obj
copymem.obj
lower.obj
ScreenDim.obj
strlen.obj
upper.obj



[attachment deleted by admin]

PBrennick

Vortex,
I will switch to your method,  Late last night, I tried something similar and kept getting export errors.  It was very frustrating and I was just too tired to figure it out.  What would happen is conin always exported correctly but the other seven always failed.  I was using the include command to put the various sources directly into GeneSys.asm, it just would not expand correctly.  Another one of those very frustrating failures of the assembler.  As soon as I manually added the procs, everything all of a sudden worked.  The method I used is not a problem right now but as the library grows, it will become a real problem.  So, once again, you have come to my rescue.  Thank you, my friend.

The lib 'is' copied to the lib directory, you can see this towards the end of make.bat, the dll is not.  I am not sure where to put the created DLL so for the moment, I am leaving it right where it was created.  Should I put the DLL in the root of the \GeneSys folder along with GeneSys.exe (the editor)?

Also, about the editor, Ultrano, elsewhere complained about the spash screen.  While it is true that the way I designed the editor allows the user to remove the splash screen if they don't like it by deleting the DLL (splash.dll) most will not realize this.  Should I just completely remove the spash screen code?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

PBrennick

There is a new dll version of the library and a new lib version.  The zip in the second posting at the start of the topic has been replaced with the new stuff.

I apologize for the frequent updates to these two modules.  I want to keep the library up-to-date.  I will try to limit this to only one update a day and once it comes up to speed things will slow down from there.  Thank you for understanding.

Paul
The GeneSys Project is available from:
The Repository or My crappy website