diff --git a/kernel/mcb.asm b/kernel/mcb.asm index 3d089a8..a0d5ae4 100644 --- a/kernel/mcb.asm +++ b/kernel/mcb.asm @@ -26,6 +26,7 @@ mcb_init: mcb_split: call mcb_find dec dx + push dx ; Calculate size of first block ; dx = dx - ds - 1 stc @@ -40,9 +41,10 @@ mcb_split: xchg cl, byte [si+0] ; advance DS to begin of first block pop ax - mov ds, ax stc sbb dx, ax + pop ax + mov ds, ax ; write MCB data mov byte [si+0], cl mov word [si+1], 0