Relocating memory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Mius

Relocating memory

Post 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
Adek336

RE:Relocating memory

Post by Adek336 »

rm or pm?
Mius

RE:Relocating memory

Post by Mius »

rm
Adek336

RE:Relocating memory

Post 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
Post Reply