NASM Forum > Other Discussion

How reliable is MOV reg, [reg]?

(1/1)

Mol_Bolom:
As I get older, the more difficult it is to concentrate, so I've decided that when I can't come to a conclusion from reading the documentation, I'll ask...Yeesh!

Anyhoo, as the title states, how reliable (safe/universal/etc) would that kind of code be? (Basically input = output, dest = source, so on and so forth). I know it works just dandy on my AMD 3800+, but if I'm going to bother using it and utilizing it, I best make sure it's worth my time implementing it. O_o...

(Oh, if you want to get technical after a generalized answer, too. Go for it. Make this addled brain think)

Frank Kotler:
I sympathize with the "issues" of growing older... but consider the alternative! I'm 73. You?

Anyway...

--- Code: ---mov reg, [reg]

--- End code ---
is completely reliable, as far as I know. I suppose you're concerned about the case where source and destination are the same register? Not a problem, that I've ever seen.  Unless you have some reason to doubt it (or I misunderstand the question) I think you can use it without problem.

Best,
Frank

Mol_Bolom:

--- Quote from: Frank Kotler on July 26, 2018, 06:13:53 AM ---I sympathize with the "issues" of growing older... but consider the alternative! I'm 73. You?

--- End quote ---
Heh, about 30 years away. Though, the males in my family usually start having mental issues around my age, dun DUN dunnnn! (Although, not that funny, O_o). Either way, I'm hoping that it's because I've had terrible sleep patterns for the past five to ten years.


--- Quote ---Anyway...

--- Code: ---mov reg, [reg]

--- End code ---
is completely reliable, as far as I know. I suppose you're concerned about the case where source and destination are the same register? Not a problem, that I've ever seen.  Unless you have some reason to doubt it (or I misunderstand the question) I think you can use it without problem.

Best,
Frank

--- End quote ---

From everything I "think" I could understand, it's sort of like FIFO, basically, similar to how bitshifts, stack, etc work.  Erm! Not sure how to explain that...Maybe, as the CPU reads the register from lower to upper bits it "forgets" the lower bits as it reads. Thus, a one to one reading writing? If that makes sense?  Anyway, I presumed it was similar to that, and I couldn't see why there would be a problem, but I still felt compelled to at least ask, just to make sure.

Thanks!

Georgeson:
thanks for that.

Navigation

[0] Message Index

Go to full version