I'm developing a virtual CPU for fun and I am currently working on the assembly part.
Now I wonder if values in the .data
section should be mutable or not.
section .data
MyGlobalVar dw 10h
In the places where I reference MyGlobalVar, should I resolve the value at assembly time or runtime? Which would be the most appropriate way of doing it?
mov ra, 10h ; Assembly time resolved value
mov ra, [0x00000000] ; Address of MyGlobalVar dereferenced when executed