The Architect
User
 Fresh Osdever
| Posts: 1 |   | Karma: 0
|
Loading the kernel - 2006/02/07 16:20
I've written a bootloader and, thanks to a great program I found which emulates a floppy disk on a cd rom, have got it onto a cd. I boot it, and when it trys to load the kernel from the disk, it just kinda stalls, and does nothing.
heres to code that loads my kernel
| Code: |
mov bx,0x5000 ;load kernel to 0x5000
mov es,bx
mov bx,0 ;set offset to 0
mov ah,0x02 ;bios function 2
mov al,0x01 ;number of sectors to read
mov ch,0x00 ;track 0
mov cl,0x01 ;starting sector : 1
mov dh,0x01 ;head number 1
mov dl,0x00 ;drive 0
int 0x13
|
This is running from a cd, and i think the drive is right, ive tryed it as 2, but read somewhere that a bootable cd is given the drive # 0. I think the issue is with the sectors, drives etc., but have had no luck experimenting with them.
This is my try at an os, any help is appreciated. Thanks.
|