From 92ea87eef6731f935f89f842d710a7f98d357ea6 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Tue, 13 Aug 2002 04:51:24 +0000 Subject: [PATCH] Shell now has a stack when it first starts Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@148 --- src/shell/shell.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 241e1a5a..acbb79a3 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -19,6 +19,7 @@ #include #include + #include "shell_inc.h" Bitu call_shellstop; @@ -139,6 +140,9 @@ void SHELL_Init() { /* Now call up the shell for the first time */ Bit16u psp_seg=DOS_GetMemory(16); Bit16u env_seg=DOS_GetMemory(1+(4096/16)); + Bit16u stack_seg=DOS_GetMemory(2048/16); + SetSegment_16(ss,stack_seg); + reg_sp=2046; /* Setup a fake MCB for the environment */ MCB * env_mcb=(MCB *)real_host(env_seg,0); env_mcb->psp_segment=psp_seg;