
first, bx shouldnt be 0x1. your kernel should be loaded to some safe location, not es:0001 (es = 0x0000 i think, so that makes it copy the kernel to the IVT).
this is the "standard" code for doing it

- - - - - - - - - - - - - - - - - - - - - - -
load_os:
xor ax, ax
int 0x13 ; reset floppy
jc load_os ; if something goes wrong, try again :p
xor ax, ax
mov es,ax
mov bx, 0x1000 ; read them to es:bx (0000:1000)
mov ax,0x0201 ; read one sector
mov cx,0x0002 ; cylinder = 0, sector 2+
mov dx,0x0000 ; head = 0, drive=0 (A:)
int 0x13
jc load_os ; try until it works (may hang)
ret
- - - - - - - - - - - - - - - - - - - - - - -
maybe the jmp dword codesel:0x1 is wrong. try to change that to:
0xEA ; far jump
dw your_function
dw codesel
but your code should work

you may need to write the first code that is executed in your kernel in asm. i dont think c code is too stupid for being jumped to like that.
make a small entry code in asm and place it first in the kernel (so that the jmp from mbr actually jumps into a resonable code that dosnt crash the very first thing it does.. and compile your kernel into raw binary (not elf or exe or whatever))
check the other operating systems, and see how they did it!

//smaffy
http://home.swipnet.se/smaffy