i want write bootloader use nasm,i enter pmode,then write a char 'a',but when kernel offset is 500h,it 's ok,then i modifty 500h to 1000h,it's wrong and restart machine,the snipe code is bellow:
;boot.asm
...
;read driver a
mov ax, 1000h ;
mov es, ax ;
mov bx, 0 ;
mov dl, 0 ;
mov dh, 0 ;
mov ch, 0 ;
mov cl, 2 ;
mov al, 2 ;
mov ah, 2 ;
int 13h

mov ax, 1000h ;
mov es, ax
mov ds, ax

push word 1000h
push word 00h
retf
...
;kernel.asm
org 10000h
...
lgdt ; Load GDT
mov eax,cr0 ; The lsb of cr0 is the protected mode bit
or al,0x01 ; Set protected mode bit
mov cr0,eax ; Mov modified word to the control register
jmp codesel:go_pm
...
then i replace 1000h to 500h,then it 's ok,can you help me?
Posted on 2004-04-21 02:25:13 by bgcq
I hate to do this, but your recent posts are starting to reak of the "spoon-feed me" syndrome.

CLICK ON THIS LINK and start reading up on how things are done.
Posted on 2004-04-21 06:27:08 by SpooK
sorry,i learn myself first.
Posted on 2004-04-21 23:13:38 by bgcq