kernel heap: dont trash ES
This commit is contained in:
parent
4489dd1b47
commit
40a7c52bae
@ -5,10 +5,14 @@ heap_init:
|
|||||||
push ax ; byte value (0)
|
push ax ; byte value (0)
|
||||||
push cx ; loop counter
|
push cx ; loop counter
|
||||||
push di ; target ptr
|
push di ; target ptr
|
||||||
|
push es
|
||||||
|
mov ax, ds
|
||||||
|
mov es, ax
|
||||||
xor ax, ax
|
xor ax, ax
|
||||||
mov cx, [heap_size]
|
mov cx, [heap_size]
|
||||||
mov di, heap
|
mov di, heap
|
||||||
rep stosb ; rep makes this loop cx times, incrementing di, writing al
|
rep stosb ; rep makes this loop cx times, incrementing di, writing al
|
||||||
|
pop es
|
||||||
pop di
|
pop di
|
||||||
pop cx
|
pop cx
|
||||||
pop ax
|
pop ax
|
||||||
|
Loading…
Reference in New Issue
Block a user