Re: Announcing the RosAsm Library Project



On Fri, 05 Oct 2007 01:50:15 +0200, hutch-- <hutch@xxxxxxxxx> wrote:

This is in fact a very good point. For any code base to be useful it
must have a basic set of components that can be used for the simple
hacky stuff and this is of course what static libraries provide among
many other things. Another factor that is missed by people who are not
familiar with the power and flexibility of libraries is that with a
common object module format "COFF" in the instance of Windows code is
fully portable across different assemblers in the form of object
modules.

You can write an object module in GAS and use it in a FASM
application, a POASM module in MASM, a HLA module in GAS and so on
which makes the object module capacity a very powerful and flexible
one.
>
It is in fact easy enough to have a snippet collection that can be cut
and pasted into a program being developed but in that form its limited
to a single depth call tree where libraries and linkers can calculate
and depth of dependency and get it right without any dulication of
code whatsoever.

For languages that don't have a static library / linker capacity they
need to have a very good equate and conditional assembly capacity and
then provide a matching capacity by the use of conditional includes.

It is not a big deal technically to have to do either, if you have a
reasonable hash table procedure available you just set a non
executable flag (usually an equate) in the text code module if it
needs another text module as a dependency and when all of the initial
calls are processed there will also be a list of dependencies which
can be included as well.

This is not as simple to create at the user end but it is a viable
mechanism for people like Betov who simply don't know how to create an
object module or a linker. It would simply mean that if a RotAsm user
called a procedure from this text based library, she would
automatically get the dependencies that are required and the program
would build without any missing components.

Seems like a good idea. However there is no need for having this in RosAsm. Having all written code in the monosource, enables the rightclick functionality that is instant. And the finishing touch at the end of the project to cut uneeded code. You must also understand that in asm it is _impossible_ to know where a routine begins or ends. Assembly does not have a consept like routines.

Example:

StringToInteger:
or eax eax | jne L0>
ret

L0:
mov eax D$eax + String.Pchar

PcharToInteger:

cmp b$eax '%' | jmp L0>
........

ret


L0:
call AnotherRoutine
jne L0>
ret

Routine100:
L0:
call D$edx + ecx
ret

If the user only called StringToInteger, how can the parser know for sure what to include below? See? In asm we do not have consepts like "routine" or "Procedure" or "Function".
It is all just addresses (symbolic labels), and an asm programmer is free todo whatever he wants, and the assembler cannot guess at what he ment, unless you implement a "sand box", to run every possible code path, which you must understand is utterly impossible. (well, it wount me me trying it for sure).


.



Relevant Pages

  • Re: Announcing the RosAsm Library Project
    ... hacky stuff and this is of course what static libraries provide among ... You can write an object module in GAS and use it in a FASM ... For languages that don't have a static library / linker capacity they ... needs another text module as a dependency and when all of the initial ...
    (alt.lang.asm)
  • Re: Strange build problem
    ... I am building an exe, this exe links to a number of static libraries ... another library from the object module thus losing all other objects from ...
    (microsoft.public.vc.language)
  • Re: Another SMP/E question
    ... my first thought is SMP/E does not know in ... what library to put the object module. ... For usermods, I seem to remember ... putting the object into one of the SMPWRK* libraries and let the BINDER ...
    (bit.listserv.ibm-main)
  • Re: removing an object module from a library
    ... > required by the third party SDK) ... > Is there any way to remove an object module from a library? ... > As odd as it sounds, that is what we are trying to do. ... such as other libraries which depend on the original ...
    (microsoft.public.vc.language)
  • Re: Standalone VB exe
    ... libraries or components and so that it uses nothing other than the ... standard Dependency File and it tells me that my program requires a ... The exe does run fine as a "stand alone exe" on all ... standard VB6 project with just a few bits of code and create a Dependency ...
    (microsoft.public.vb.general.discussion)