remove reallocation in mbr init
also reenable interupts in the init block
This commit is contained in:
@@ -34,11 +34,7 @@ init:
|
|||||||
|
|
||||||
mov ss, ax ; Set Stack Segment to 0
|
mov ss, ax ; Set Stack Segment to 0
|
||||||
mov sp, STACK_START
|
mov sp, STACK_START
|
||||||
|
sti
|
||||||
mov ch, 0x01 ; 256 WORDs in MBR (512 bytes), 0x0100 in cx
|
|
||||||
mov si, 0x7C00 ; Current MBR Address (loaded here by BIOS)
|
|
||||||
mov di, MBR_ENTRY ; New MBR Address (our new relocation address)
|
|
||||||
rep movsw ; copy 512 bytes from 0x0000:7c00 to 0x0000:0600
|
|
||||||
|
|
||||||
jmp 0:main
|
jmp 0:main
|
||||||
nop
|
nop
|
||||||
@@ -49,7 +45,6 @@ init:
|
|||||||
%include "errors.inc"
|
%include "errors.inc"
|
||||||
|
|
||||||
main:
|
main:
|
||||||
sti
|
|
||||||
mov [boot_drive], dl ; BIOS passes drive number in DL
|
mov [boot_drive], dl ; BIOS passes drive number in DL
|
||||||
|
|
||||||
.check_disk:
|
.check_disk:
|
||||||
|
|||||||
Reference in New Issue
Block a user