New Flag handling
Starting programs from shell shouldn't require saving CS:IP Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@926
This commit is contained in:
parent
192a32e3b2
commit
09a9c3eea9
1 changed files with 6 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "shell_inc.h"
|
||||
#include "cpu.h"
|
||||
#include "regs.h"
|
||||
|
||||
|
||||
void DOS_Shell::ShowPrompt(void) {
|
||||
|
@ -174,12 +174,14 @@ void DOS_Shell::Execute(char * name,char * args) {
|
|||
/* Set the command line in the block and save it */
|
||||
block.exec.cmdtail=RealMakeSeg(ss,reg_sp+0x100);
|
||||
block.SaveData();
|
||||
#if 0
|
||||
/* Save CS:IP to some point where i can return them from */
|
||||
Bit32u oldeip=reg_eip;
|
||||
Bit16u oldcs=SegValue(cs);
|
||||
RealPt newcsip=CALLBACK_RealPointer(call_shellstop);
|
||||
SegSet16(cs,RealSeg(newcsip));
|
||||
reg_ip=RealOff(newcsip);
|
||||
#endif
|
||||
/* Start up a dos execute interrupt */
|
||||
reg_ax=0x4b00;
|
||||
//Filename pointer
|
||||
|
@ -188,12 +190,14 @@ void DOS_Shell::Execute(char * name,char * args) {
|
|||
//Paramblock
|
||||
SegSet16(es,SegValue(ss));
|
||||
reg_bx=reg_sp;
|
||||
flags.intf=false;
|
||||
SETFLAGBIT(IF,false);
|
||||
CALLBACK_RunRealInt(0x21);
|
||||
/* Restore CS:IP and the stack */
|
||||
reg_sp+=0x200;
|
||||
#if 0
|
||||
reg_eip=oldeip;
|
||||
SegSet16(cs,oldcs);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue