kernel heap: dont trash ES

This commit is contained in:
Nero 2019-03-23 21:27:06 +00:00
parent 4489dd1b47
commit 40a7c52bae
1 changed files with 4 additions and 0 deletions

View File

@ -5,10 +5,14 @@ heap_init:
push ax ; byte value (0)
push cx ; loop counter
push di ; target ptr
push es
mov ax, ds
mov es, ax
xor ax, ax
mov cx, [heap_size]
mov di, heap
rep stosb ; rep makes this loop cx times, incrementing di, writing al
pop es
pop di
pop cx
pop ax