Re: Linux, X, ld, gcc, linking, shared libraries and stuff

From: Herbert Kleebauer (klee_at_unibwm.de)
Date: 03/29/05


Date: Tue, 29 Mar 2005 10:27:41 +0200

Frank Kotler wrote:
> Herbert Kleebauer wrote:
>
> ...
> > but only shows, that RosAsm (in opposite to NASM) isn't able
> > to solve the problem with the two different push instructions.
>
> To be fair, lets say that RosAsm "doesn't" do this, rather

But then the answer is: RosAsm "doesn't" do it by intention

> than "isn't able to".

But here the answer maybe is: I will show you that RosAsm
also can do it (just wait for the next release).

> it). The only thing RosAsm doesn't do is provide a way for
> the user to say "no, I really want the stupid long form", if
> the operand will fit in a signed byte (other than db ...).

I have given other examples for different encoding for
the same instruction where RosAsm doesn't select the
shortest encoding. This shows, that it isn't done by intention
but because there is a problem with the same name for
different instructions.

> RosAsm's users may be "missing something" from the lack of
> this "feature", but they aren't missing *much*! Arguably,

I don't think RosAsm users are missing something, RosAsm itself
is missing something. It's like as with modern cameras. No
professional photographer would buy a camera which doesn't
allow a manual setting of all the parameters even if he just
always use the automatic mode. It is not because you want to
use it but because you want to be able to use it.

> they have to know to ask for it. With a default to the
> signed byte form, and the ability to specify the dword form,
> Nasm would have had it right (IMO), but it's an imperfect
> world...

I think NASM had it right, if it would use different names
for the different instructions. It's like the short and long
branches. Use a "br.b" for a byte offset and a "br.l" for
a 32 bit offset or simple a "br" if the assembler should decide.
This would be a "PUSH" for the assembler optimized form,
a "PUSH.B" for the sign extended byte push and a "PUSH.L"
for a 32 bit push. (And when implementing this, move also
the size information for all the other instructions from
the operand to the opcode).

> In an ideal world... we would all be very lost and confused,
> because it would be *nothing* like what we're used to!

We don't need an ideal world, it would be sufficient to
get rid of the Intel syntax (as far as assembly programming
is concerned).



Relevant Pages

  • Re: Why I stop attacking HLA
    ... To me using instructions like cmp and the basic jcc is pure logic, ... You can always *push* one subject ... You should not explain so many instructions without giving students the ... > past when using MASM or some other x86 assembler. ...
    (alt.lang.asm)
  • Re: Will HLA2.0 Support rosasm?
    ... > can handle all CPU instructions. ... RosAsm the linker's fault though, and not the assembler. ... HLA is a textconverter that converts ...
    (alt.lang.asm)
  • Re: Will HLA2.0 Support rosasm?
    ... > handle all CPU instructions. ... I said that RosAsm cannot handle the semantics HLA requires. ... > assembler. ...
    (alt.lang.asm)
  • Re: Rosasm support
    ... > a new Programming Tool has... ... > another fellow of the RosAsm team could not answer). ... Suppose you've started to use an assembler... ... project would benefit from some SSE2 instructions... ...
    (alt.lang.asm)
  • Re: HAY Herbert, wanna write a legal PE executable ?
    ... LINK.EXE at about 462k then there is any binary libraries that masm ... push offset szDlgTitle ... ; "invoke" syntax. ... I don't give a fuck if Wannabee does a RosAsm version or not - although "lots of examples" is good for RosAsm. ...
    (alt.lang.asm)