News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

is OR really two MOV?

Started by BurnWithMe, July 25, 2013, 12:39:23 AM

Previous topic - Next topic

BurnWithMe

I read somewhere that a computer can only access a whole byte at a time. It cannot in reality flip single bits. So does this not mean that "OR EAX 1" would need to become

"mov HiddenRegCPU, eax" +
"or HiddenRegCPU 1" +
"mov eax HiddenRegCPU" ? 

inside the CPU?
If not, why not?

dedndave

it moves it into the CPU "temporary" register, alters it, and writes it back
this is done a little faster than 2 moves, however, as the hardware allows "read-modify-write"