Fix addressing mistake when splitting MCB

This commit is contained in:
Nero 2020-04-17 23:59:57 +02:00
parent 6d38a313c7
commit f7d3d5c62f

View File

@ -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