From 6080d2c1dd5cd1236b7c1439198f9a1cec432e67 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 5 Apr 2010 10:01:23 +0000 Subject: [PATCH] Change exits to warnings. Improve childpsp a bit Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3574 --- src/dos/dos_execute.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dos/dos_execute.cpp b/src/dos/dos_execute.cpp index 8db998c3..ca9e5595 100644 --- a/src/dos/dos_execute.cpp +++ b/src/dos/dos_execute.cpp @@ -213,8 +213,12 @@ bool DOS_NewPSP(Bit16u segment, Bit16u size) { bool DOS_ChildPSP(Bit16u segment, Bit16u size) { DOS_PSP psp(segment); psp.MakeNew(size); - DOS_PSP psp_parent(psp.GetParent()); + Bit16u parent_psp_seg = psp.GetParent(); + DOS_PSP psp_parent(parent_psp_seg); psp.CopyFileTable(&psp_parent,true); + psp.SetCommandTail(RealMake(parent_psp_seg,0x80)); + psp.SetFCB1(RealMake(parent_psp_seg,0x5c)); + psp.SetFCB2(RealMake(parent_psp_seg,0x6c)); psp.SetEnvironment(psp_parent.GetEnvironment()); psp.SetSize(size); return true; @@ -412,7 +416,7 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) { } else { csip=RealMake(loadseg+head.initCS,head.initIP); sssp=RealMake(loadseg+head.initSS,head.initSP); - if (head.initSP<4) E_Exit("stack underflow/wrap at EXEC"); + if (head.initSP<4) LOG(LOG_EXEC,LOG_ERROR)("stack underflow/wrap at EXEC"); } if (flags==LOAD) { @@ -434,7 +438,7 @@ bool DOS_Execute(char * name,PhysPt block_pt,Bit8u flags) { } if (flags==LOADNGO) { - if ((reg_sp>0xfffe) || (reg_sp<18)) E_Exit("stack underflow/wrap at EXEC"); + if ((reg_sp>0xfffe) || (reg_sp<18)) LOG(LOG_EXEC,LOG_ERROR)("stack underflow/wrap at EXEC"); /* Get Caller's program CS:IP of the stack and set termination address to that */ RealSetVec(0x22,RealMake(mem_readw(SegPhys(ss)+reg_sp+2),mem_readw(SegPhys(ss)+reg_sp))); SaveRegisters();