Page 1 of 1

strange ASM

Posted: Mon May 30, 2016 4:25 pm
by callroot
c0.s="456"

c1.s="789"

!mov [v_c1],[v_c0]


Debug c1

Re: strange ASM

Posted: Mon May 30, 2016 5:35 pm
by Little John
In the «Tricks 'n' Tips» subforum, callroot wrote:c0.s="456"

c1.s="789"

!mov [v_c1],[v_c0]


Debug c1
[u]infratec[/u] wrote:callroot should be renamed to spamroot ;-)
I agree.

Re: strange ASM

Posted: Mon May 30, 2016 5:43 pm
by Keya
i didnt think you could "mov [mem], [mem]" in the one go (and this is a CPU thing not a PB thing) - you have to "mov reg, [mem]" then "mov [mem], reg". Please correct me if im wrong!

Re: strange ASM

Posted: Mon May 30, 2016 5:59 pm
by DontTalkToMe
Keya wrote:i didnt think you could "mov [mem], [mem]" in the one go (and this is a CPU thing not a PB thing) - you have to "mov reg, [mem]" then "mov [mem], reg". Please correct me if im wrong!
You are not wrong.

Amazing tip btw :D

Re: strange ASM

Posted: Tue May 31, 2016 4:56 am
by callroot
Keya wrote:i didnt think you could "mov [mem], [mem]" in the one go (and this is a CPU thing not a PB thing) - you have to "mov reg, [mem]" then "mov [mem], reg". Please correct me if im wrong!

Code: Select all


c0.s = " 456 "

c1.s = " 789 "

! mov eax,[v_c0]

! mov [v_c1],eax


debug c1


Re: strange ASM

Posted: Tue May 31, 2016 5:35 am
by Demivec
callroot wrote:
Keya wrote:i didnt think you could "mov [mem], [mem]" in the one go (and this is a CPU thing not a PB thing) - you have to "mov reg, [mem]" then "mov [mem], reg". Please correct me if im wrong!

Code: Select all

c0.s = " 456 "

c1.s = " 789 "

! mov eax,[v_c0]

! mov [v_c1],eax


debug c1
Code works fine. What's so strange?

Re: strange ASM

Posted: Tue May 31, 2016 5:49 am
by callroot
Demivec wrote:
callroot wrote:
Keya wrote:i didnt think you could "mov [mem], [mem]" in the one go (and this is a CPU thing not a PB thing) - you have to "mov reg, [mem]" then "mov [mem], reg". Please correct me if im wrong!

Code: Select all

c0.s = " 456 "

c1.s = " 789 "

! mov eax,[v_c0]

! mov [v_c1],eax


debug c1
Code works fine. What's so strange?
! mov [v_c1],[v_c0]


Can't write this way.

Re: strange ASM

Posted: Tue May 31, 2016 6:10 am
by wilbert
callroot wrote:! mov [v_c1],[v_c0]


Can't write this way.
That's right and you will never be able to write it this way because asm doesn't support this.

Re: strange ASM

Posted: Tue May 31, 2016 12:50 pm
by DontTalkToMe
There are tables with the possible operands sizes and types you can use with each instruction.

http://x86.renejeschke.de/html/file_mod ... d_176.html

Look there and you'll see you can't move from memory to memory.

Re: strange ASM

Posted: Tue May 31, 2016 1:01 pm
by Rings
topic moved...

Re: strange ASM

Posted: Tue May 31, 2016 4:05 pm
by Keya

Re: strange ASM

Posted: Sun Jan 21, 2018 10:50 pm
by Psychophanta