Home arrow Forums
OSDEV Forums  


The Architect
User

Fresh Osdever
Posts: 1
graphgraph
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.
  | | The administrator has disabled public write access.
OSDEV
Community
Advertisement
   
gaf
User

Platinum Osdever
Posts: 153
graph
Karma: 10  
Re: Loading the kernel - 2006/02/09 08:33 Have you already read the El Torito standard ? Also make sure that the program you mentioned really sets up everything corretly..

regards,
gaf
  | | The administrator has disabled public write access.
grasper
User

Junior Osdever
Posts: 11
graphgraph
Karma: 1  
Re: Loading the kernel - 2006/07/03 05:11 Error is in this line:
mov cl,0x01 ;starting sector : 1"
In first sector is your bootloader. But kernel starts in 2 sector

Sincerely,
grasper
  | | The administrator has disabled public write access.

A WebArticles site. Sponsored by Evoleto. Motorola V525 / Business Directory / Delaware Incorporation / Home Made Bazaar