Hi,
I'm going to guess a bit.
First,
Code: Select all
; Set the kernel as our data segment
mov ax, 0x1000
mov ds, ax
; Jump to the kernel
mov si,msg2
call print
call br
jmp 0x1000:0x0000
You're doing something wrong here. First you set ds to 0x1000, then you actually want to load msg2 from 0x0:0x7*** (assuming your BIOS loaded it to 0x0:0x7c00) ?
I suggest you should do this instead:
Code: Select all
; Jump to the kernel
mov si,msg2
call print
call br
; Set the kernel as our data segment
mov ax, 0x1000
mov ds, ax
jmp 0x1000:0x0000
Second; you said it crashed when you jumped to 0x1000:0x0? Maybe your kernel is wrong. AFAICT, your bootsector should work.
Oh, one tip; NEVER EVER ASSUME CS=0 AND IP=0x7C00. It is a classic fault. CS could be 0x7c0 and IP could be then 0x0. Guess what happens then
You never know with some BIOSes.
You can do this at the beginning of your bootsector:
Code: Select all
; Set this up as our bootloader
org 0x7C00
use16
jmp 0x0:begin ;jump to 0x0:0x7c00+begin
begin:
; Clear segment registers
mov ax,cs
mov ds,ax
mov es,ax
mov fs,ax
mov gs,ax
HTH a bit,
DennisCGc.
PS. As I indicated, your kernel might be wrong. Maybe you could post SOME snippits. (the first part is essential).