give an example of one instruction
store 42 into <address>
the code will ask to be assigned the address. So your code doesn't know about the address beforehand If it wants a very specific address, the program will need to have that in the code.
That doesn't matter, let's say: store 42 into 0x1000
it won't have same problem as the instructions are finite.
wdym? It has the same problem that it's not possible to run this in reverse and restore the previous value stored in 0x1000
it is possible let's take example of following simple dumb instructions mov r1, 4 mov r2, 5 add sum, r1, r2 // add r1 & r2 and store it in sum If you are given the value of memory address of sum and immediate previous instructions executed, it should be easy to come up with same exact code. Because even if there is a memory overwrite, the instructions are not appearing out of nowhere.
Обсуждают сегодня