Author Topic: How reliable is MOV reg, [reg]?  (Read 17297 times)

Offline Mol_Bolom

  • Jr. Member
  • *
  • Posts: 4
How reliable is MOV reg, [reg]?
« on: July 26, 2018, 05:10:45 AM »
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)

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: How reliable is MOV reg, [reg]?
« Reply #1 on: July 26, 2018, 06:13:53 AM »
I sympathize with the "issues" of growing older... but consider the alternative! I'm 73. You?

Anyway...
Code: [Select]
mov reg, [reg]
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


Offline Mol_Bolom

  • Jr. Member
  • *
  • Posts: 4
Re: How reliable is MOV reg, [reg]?
« Reply #2 on: July 26, 2018, 07:01:38 AM »
I sympathize with the "issues" of growing older... but consider the alternative! I'm 73. You?
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: [Select]
mov reg, [reg]
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

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!

Offline Georgeson

  • Jr. Member
  • *
  • Posts: 3
Re: How reliable is MOV reg, [reg]?
« Reply #3 on: November 30, 2018, 04:28:51 PM »
thanks for that.