mbr: set up first 7 bytes of kernel PSP
This commit is contained in:
parent
78233db88d
commit
d7c1781d2f
16
boot/mbr.asm
16
boot/mbr.asm
@ -6,10 +6,12 @@
|
||||
|
||||
init: cli
|
||||
mov ax, seg
|
||||
mov ss, ax
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
mov ss, ax
|
||||
xor sp, sp
|
||||
mov ax, sp
|
||||
push ax
|
||||
|
||||
.retry: mov ax, 0x0208
|
||||
mov cx, 2
|
||||
@ -19,6 +21,18 @@ init: cli
|
||||
int 0x13
|
||||
jc .retry
|
||||
|
||||
xor di, di
|
||||
mov ax, 0x18CD
|
||||
stosw
|
||||
int 0x12
|
||||
mov cl, 6
|
||||
shl ax, cl
|
||||
stosw
|
||||
mov al, 2
|
||||
stosb
|
||||
mov ax, 0x18CD
|
||||
stosw
|
||||
|
||||
jmp seg:0x100
|
||||
|
||||
times (0x1BE - ($-$$)) db 0
|
||||
|
Loading…
Reference in New Issue
Block a user