Re: Announcing the RosAsm Library Project
- From: //\\\\o//\\\\annabee <w@xxxxx>
- Date: Fri, 05 Oct 2007 08:18:53 +0200
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).
.
- Follow-Ups:
- Re: Announcing the RosAsm Library Project
- From: rhyde@xxxxxxxxxx
- Re: Announcing the RosAsm Library Project
- References:
- Announcing the RosAsm Library Project
- From: rhyde@xxxxxxxxxx
- Re: Announcing the RosAsm Library Project
- From: hutch--
- Announcing the RosAsm Library Project
- Prev by Date: Re: RDTSC instruction question on core 2 duo CPU
- Next by Date: Re: Twelve Assembly Lessons
- Previous by thread: Re: Announcing the RosAsm Library Project
- Next by thread: Re: Announcing the RosAsm Library Project
- Index(es):
Relevant Pages
|