Hi,

I have a question regarding finding the address of the next instruction and making an intersegment jump to it.

Binary FILE 1 (loaded at 0x1000:0x0000)
_____________

1. first instruction
.
.
100. load a binary FILE 2 from floppy disk to 0x0500:0x0 and pass control to it

101. remaining instructions
.
.
200
_____________________________

Binary file 1 and file2 are in two different segments.

After the file2, which is loaded from the floppy, is executed, how can I pass the control back to file1 to execute the remaining instructions?

As of now, I am doing a 'blunt' jump in file 2 by manually finding the address of the instruction at line 101 of file1. However, this isn't flexible as I have to change the jump address in file2 everytime I add more instructions to file 1. As adding more instructions to file1 would transpose the address of the instructions following the line 100.

Could anyone enlighten me with a generic way.

Thanks in advance.