Page 1 of 1

Relocating memory

Posted: Thu Jan 23, 2003 12:00 am
by Mius
I'm writing a memory manager for my own os. I have some problems with the relocating. How can i load a program into the memory and jump to it without crash the system? Can you give me some assembler source code (i use Nasm) ?
Thx

RE:Relocating memory

Posted: Fri Jan 24, 2003 12:00 am
by Adek336
rm or pm?

RE:Relocating memory

Posted: Thu Feb 20, 2003 12:00 am
by Mius
rm

RE:Relocating memory

Posted: Fri Feb 21, 2003 12:00 am
by Adek336
Trusting there is some code at 0x1234:0x5678 the code looks so:

MOV AX, 0x1234
MOV ES, AX
MOV DS, AX
PUSH AX

MOV AX, 0x5678
PUSH AX

RETF

Damn perhaps it'll jump at 5678:1234, I'm not sure..

Adrian