Generally, there are 2 phases of the program - compiling and running.
Compile-time - compiler generates assembly of source program something like this -
MOV R1 R2
LOAD R2 1000
Run Time - program gets loaded to memory and execution starts.
Question: - How does the compiler know memory location such as 1000 in the above load instruction even though the program gets loaded in memory after the compilation phase?