And Aimless' response is what YOU would have easily found if you had done what I suggested, and put "Delta Offset Routine" (without the quotes) into your favorite search engine and actually read some of the information you would have found. These are just two of the first listed:
http://vx.netlux.org/lib/static/vdat/tudelta1.htm
http://www.codebreakers-journal.com/content/view/174/27/
This latter contains the following information, easily accessible to YOU:
"When you're programming a virus that will always be placed at a fixed location, like overwriting and prepending viruses, you won't have to worry about any of this, but
if you're writing a virus that relocates part of its code to a random location, such as appending and midfile infectors, you'll have to account for the displacement. This doesn't affect most jumps and calls, since they are relative, but data on the other hand is refered by an absolute offset. Things would work fine the first time you assembled and run the virus, but not after the first infection when all memory addresses would then be changed.
To account for this all one has to do is:
--8<---------------------------------------------------------------------------
Delta_Offset:
call Find_Displacement
Find_Displacement:
pop bp
sub bp, offset Find_Displacement
---------------------------------------------------------------------------8<--
"What this piece of code does is, first issue a CALL to the next instruction, so the IP (Instruction Pointer) for it will (be) pushed into the stack, next we POP it to the register BP (it is good programming to use BP, which stands for Base Pointer), and finally we SUBtract the original OFFSET determined when the virus was compiled. Of course the first time the virus is run, the displacement will be zero, only on subsequent runs will it change according to the host size."
..........................
Those who are simply too lazy to "think for themselves" often engage in sophistry in a useless effort to attempt to conceal their own inadequacies.
Regards,