I believe that the primary memory of your device / machine is RAM. Thus, basically your application will exist there at runtime (for example, after starting this application from the hard drive, it will load into the device’s memory). By the way, all binary commands executed for the processor are now in RAM.
To simplify this, say, the processor will start reading memory from the very first cells, for example, 0, try to figure out what to do with it, and after completion will go to the next one, which is 1 in this case, etc.
Now let's say mov al, 0x10 is 0xAABB in our imaginary processor. In physical memory, 0xAA stored at cell number 20 and 0xBB at 21 . Our processor is still busy reading the stream. When it reaches memory at 20 , in this case the binary value 0xAA will be loaded. By the way, in our processor documentation, this means Fill AL with the following data . The following data in our case is 0xBB , so the processor will do this.
As you can see:
- here, in our example, everything exists in RAM (at runtime), including executable instructions, data, etc.
- The CPU reads it from RAM and will try to do everything that is supposed / necessary to do so that
- As you noticed,
mov al, 0x10 not allocated at runtime , but everything was hard-coded by the compiler and stored in an executable file (for example) - So, this imaginary
0xBB exists in RAM, but you cannot change it at runtime. Again, keep in mind that it was also not created at run time, it was just loaded into RAM at run time
Hope this helps you figure out which is better.
user1960660
source share