Im having problems locating avaiable memory for my 'os'.
When i boot up my code, i have no idea where is memory i can copy my code.
How do i find this memory? Is there any way, or i must list pci devices, get somehow ammount of memory, and find gaps?
How you do it? How it should be done?
Im using int 13h to access disk. (question 2: how do i do it without bios)
copying contents of drive into empty memory
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: copying contents of drive into empty memory
You don't - it's not safe. Your bootloader can however do the work for you, whether you use GRUB or write your own.a5498828 wrote:question 2: how do i do it without bios
Re: copying contents of drive into empty memory
Whats not safe about it? Do you mean i have direct access to metadata (sector numbers, ecc, ...) wich wich i can destroy? I though i can only send commands like to read/write given sector, and controller can only low-level format disk. Are you telling, its possible using direct mmio/pio interface?You don't - it's not safe.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: copying contents of drive into empty memory
Sorry, I was referring to memory detection.