diff --git a/boot/mbr.asm b/boot/mbr.asm index 432f8ee..135763f 100644 --- a/boot/mbr.asm +++ b/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