Thursday 2 May 2019

Is the "MOV" instruction in Assembly to allocate memory?

I notice that MOV is supposed to copy and overwrite data to and from registers, but if there's no present data in any other register, does MOV move a certain sized byte(s) from RAM to the register to temporarily hold it, or how does this work exactly?



To clarify my question, say I use:




MOV AL, 0x10;


In such a case, where is the "10" digit data that is moved to the 8-bit register?



Is this moved from RAM to AL as eight bits to hold, or is the "10" byte just a scratchpad number that is not in memory?



I don't understand this, and it would be amazing if someone could straighten this out.




My problem is that I need to know where and how much memory is used, and how and what exactly is addressing it(and tutorials don't make clear of this).

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...