Page 1 of 1
How to specify certain location in memory
Posted: Sun Jul 14, 2013 6:30 pm
by gabemaiberger
Hello, I would like to know how to specify a certain location in memory in my disk address packet so it will load my kernel at the address 0x100000 above the first megabyte of memory. Here is my disk address packet:
Code: Select all
dap:
dapsize db 0x10
db 0
numsectors dw 64
memory dd end
startsector dq 3
I am using extended read int 0x13 ah=0x42. Also, how would I specify that location in memory using db in order to jump to my kernel.
Re: How to specify certain location in memory
Posted: Sun Jul 14, 2013 6:45 pm
by Nessphoro
You can't load above 1 megabyte in real mode.
Re: How to specify certain location in memory
Posted: Sun Jul 14, 2013 6:50 pm
by gabemaiberger
Thanks for the help. However, I have a dilemma. If I cannot load my kernel above 1mb in realmode and I can't use interrupts in protected mode what do I do?
Re: How to specify certain location in memory
Posted: Sun Jul 14, 2013 8:11 pm
by Mikemk
Load it in real mode, then move it in protected mode; or switch to unreal mode, load it, move it and switch to pmode.
The first method is easier if you're only loading one file, or multiple files that fit within 640k. otherwise, the second method is easier.