Pelles C forum

C language => Beginner questions => Topic started by: PabloMack on March 14, 2019, 11:17:31 PM

Title: Can I force PoAsm to generate the abs addressing forms of mov al,ax,eax,rax?
Post by: PabloMack on March 14, 2019, 11:17:31 PM
When I try to assemble

mov     al,[0123456789h]

PoAsm complains: warning: Integer value too large for 32 bits.

Supposedly, the special forms mentioned above can use 64-bit absolute addresses.
PoAsm is apparently not using them.
Title: Re: Can I force PoAsm to generate the abs addressing forms of mov al,ax,eax,rax?
Post by: TimoVJL on March 15, 2019, 06:32:31 AM
Code: [Select]
mov rax, 0123456789h
mov al, [rax]
Title: Re: Can I force PoAsm to generate the abs addressing forms of mov al,ax,eax,rax?
Post by: PabloMack on March 15, 2019, 01:41:00 PM
The instructions I am talking about have opcodes A0 ~ A3. You used
different instructions that generate different opcodes:

00000002 48 B8 89 67 45 23 01 00 |            mov     rax, 0123456789h
0000000A 00 00                   |
0000000C 8A 00                   |            mov     al, [rax]

As you can see from the output, the opcodes for the instructions you used
are 48 and 8A. Those are not the instructions I am talking about.  Perhaps
you are meaning to say: "You are right. PoAsm does not support those
instructions and you have to use an alternative way to accomplish the same
thing." What I am trying to do is to understand these instructions with
opcodes A0 ~ A3 as I am writing an assembler to support them. I was
wanting to use PoAsm to verify the correctness of my assembler's output.
Title: Re: Can I force PoAsm to generate the abs addressing forms of mov al,ax,eax,rax?
Post by: TimoVJL on March 15, 2019, 06:13:50 PM
Quote
Can I force PoAsm to generate the abs addressing forms of mov al,ax,eax,rax?
I just gave another way to do that with poasm.
I know just a little about assemblers, but TLPEView with Zydis plugin need some attention from me.