+ zero fill the bss section on startup in the msdos loader

git-svn-id: trunk@24339 -
This commit is contained in:
nickysn 2013-04-27 10:04:56 +00:00
parent 12fd50c890
commit 11a915e682

View File

@ -18,15 +18,25 @@
..start:
; init the stack
mov ax, dgroup
mov ss, ax
mov bx, dgroup
mov ss, bx
mov sp, stacktop
; zero fill the BSS section
mov es, bx
mov di, _edata wrt dgroup
mov cx, _end wrt dgroup
sub cx, di
jz no_bss
xor al, al
rep stosb
no_bss:
; save the Program Segment Prefix
push ds
; init DS
mov ds, ax
mov ds, bx
; pop the PSP from stack and store it in the pascal variable dos_psp
pop ax