"rep movsd es:[di], fs:[si]" WOAT?
category: code [glöplog]
Guys, I found a funny thing here:
db 064h
rep movsd
after compilation, we get the machine code: 64F3A5
which QVIEW decodes as: repe movsd es:[edi], fs:[esi]
But I never saw in the x86 assembler documentation that movsd can have operands. Trying to find something about it in Google does not give results.
Somebody knows? Is it legal at all? :)
db 064h
rep movsd
after compilation, we get the machine code: 64F3A5
which QVIEW decodes as: repe movsd es:[edi], fs:[esi]
But I never saw in the x86 assembler documentation that movsd can have operands. Trying to find something about it in Google does not give results.
Somebody knows? Is it legal at all? :)
It's not an operand per se, but a "section override prefix" which overrides the default segment of the instruction, which would be DS in this case.
I have not seen this anywhere in the x86 asm documentation. I must have been looking in the wrong place :)
And the feature is very useful :)
Does this prefix work on a real 80386 processor?
And is it the same for stos, lods?
And the feature is very useful :)
Does this prefix work on a real 80386 processor?
And is it the same for stos, lods?
Quote:
Does this prefix work on a real 80386 processor?
And is it the same for stos, lods?
Yes and yes: http://ref.x86asm.net/geek.html#x64
See "proc" column (03+ = 386+).
You have other segment override prefixes that were introduced with the 8086 even. And they work on stos/lods/even non-string instructions, e.g. "move byte[es:di+3], imm".
uh, "mov byte[es:di+3], ..." ;) exact syntax depends on assembler.
AFAICT the target segment is always es:, i'e. you can code ds:stosw but it wont work.
es:movsw is good for moving stuff around the screen.
Oh and hi to all; I'm a newbie here; but I'm really interested in small x86 asm programs.
My 1st post was last week to Sensthals (sp?) Collider prog; I reduced it to 128 bytes.
His room1007 I'm working on and have a revamped version at 222 at present.
es:movsw is good for moving stuff around the screen.
Oh and hi to all; I'm a newbie here; but I'm really interested in small x86 asm programs.
My 1st post was last week to Sensthals (sp?) Collider prog; I reduced it to 128 bytes.
His room1007 I'm working on and have a revamped version at 222 at present.