From: chnorik on
Hello :)
I was using gas for a while with a syntax like that
imull $5, %edx
However, HLA does not accept the second operand
imul (5, edx)
as far as I understood from IntegerArithmetic.html i wants second
operand as eax
There is a description of intel cpu's limitation, where destination
register is alweays eax/ax/al in case of multiplication
However, in "Programming from Ground Up" which teaches asm programming
with gas there is no word about this limiataion of intel processors,
but, however a similar note about div instructions.
So... Is that limitation of very old cpu's and HLA tries to be
compatible with them?
Or... I really do not understand what is the reason HLA do not accept
that?
May be there is a workaround? Because I do not want to change my
existing code (which was originally written for gas) so much.

Thank you

Norayr

From: Frank Kotler on
chnorik(a)gmail.com wrote:
> Hello :)
> I was using gas for a while with a syntax like that
> imull $5, %edx
> However, HLA does not accept the second operand
> imul (5, edx)

Try "intmul (5, edx);"

Alien syntax, y'know...

Best,
Frank


From: chnorik on
On Mar 31, 11:03 pm, Frank Kotler <fbkot...(a)verizon.net> wrote:
> chno...(a)gmail.com wrote:
> > Hello :)
> > I was using gas for a while with a syntax like that
> > imull $5, %edx
> > However, HLA does not accept the second operand
> > imul (5, edx)
>
> Try "intmul (5, edx);"
>
> Alien syntax, y'know...
>
> Best,
> Frank

Thank you very much! It works!
If anyone has a clue why imul in hla is different from normal imul,
please, let me know :)
From: chnorik on
On Apr 1, 12:13 am, chno...(a)gmail.com wrote:
> On Mar 31, 11:03 pm, Frank Kotler <fbkot...(a)verizon.net> wrote:
>
> > chno...(a)gmail.com wrote:
> > > Hello :)
> > > I was using gas for a while with a syntax like that
> > > imull $5, %edx
> > > However, HLA does not accept the second operand
> > > imul (5, edx)
>
> > Try "intmul (5, edx);"
>
> > Alien syntax, y'know...
>
> > Best,
> > Frank
>
> Thank you very much! It works!
> If anyone has a clue why imul in hla is different from normal imul,
> please, let me know :)

Or may be gas automatically translates imull to something else?
From: Evenbit on
On Mar 31, 8:17 pm, chno...(a)gmail.com wrote:
> On Apr 1, 12:13 am, chno...(a)gmail.com wrote:
>
>
>
> > On Mar 31, 11:03 pm, Frank Kotler <fbkot...(a)verizon.net> wrote:
>
> > > chno...(a)gmail.com wrote:
> > > > Hello :)
> > > > I was using gas for a while with a syntax like that
> > > > imull $5, %edx
> > > > However, HLA does not accept the second operand
> > > > imul (5, edx)
>
> > > Try "intmul (5, edx);"
>
> > > Alien syntax, y'know...
>
> > > Best,
> > > Frank
>
> > Thank you very much! It works!
> > If anyone has a clue why imul in hla is different from normal imul,
> > please, let me know :)
>
> Or may be gas automatically translates imull to something else?

No. HLA is the oddball. It is not your "everyday, run-of-the-mill"
assembler; it is, instead, a teaching tool.

Nathan.
 |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Directly Reading/Writing to Disk
Next: remplace Ascii