Mail Archives: djgpp/1996/06/20/19:08:37
Hi all, here SET from Argentine:
>> > > The code is "shrd edx, eax, 16". I don't know that much
>>
>> I believe he's trying the upper 16 bits of one register into the lower
>> 16 bits (having the rest of the bits shifting along with it)
>> of the second register.. I think this is a 386 instruction...
>Yes, it is. I'm not convinced that gas supports all 386/486 instructions.
>Am I right on this score? (the info pages don't provide a listing of those
>it copes with AFAIK)
I don't know if GAS suports SHRD but you can put the values inside the code:
from the i486 manual:
---------------------------------
SHLD = Shift Left Double TTT=100
SHRD = Shift Right Double TTT=101
---------------------------------
register with immediate [00001111][10TTT100][11 reg2 reg1][imm 8 bits]
(takes 2 cycles)
In a 32 bits segment is:
000 = EAX
010 = EDX
I supose that reg1 is the first (I could be wrong) then the sequence is:
[00001111][10101100][11010000][00010000]
0x0F 0xAC 0xD0 0x10
then i supose that you can put:
.db 0x0F,0xAC,0xD0,0x10
instead of "shrd edx,eax,16"
bye SET
********************************************************************************
Salvador Eduardo Tropea (SET) - salvador AT inti DOT edu DOT ar
Work: INTI (National Institute of Industrial Technology) Sector: ICE
(Electronic Control & Instrumentation)
Post (Home): Curapaligue 2124 - Caseros (1678)- Buenos Aires - Argentina
- Raw text -