Commit 5106ee4a authored by Markus Amsler's avatar Markus Amsler Committed by Alexandre Julliard

Initialize .COM stack.

parent 63289cd6
...@@ -315,6 +315,11 @@ static BOOL MZ_DoLoadImage( HANDLE hFile, LPCSTR filename, OverlayBlock *oblk ) ...@@ -315,6 +315,11 @@ static BOOL MZ_DoLoadImage( HANDLE hFile, LPCSTR filename, OverlayBlock *oblk )
init_ip = mz_header.e_ip; init_ip = mz_header.e_ip;
init_ss = load_seg+mz_header.e_ss; init_ss = load_seg+mz_header.e_ss;
init_sp = mz_header.e_sp; init_sp = mz_header.e_sp;
if (old_com){
/* .COM files exit with ret. Make sure they jump to psp start (=int 20) */
WORD* stack = PTR_REAL_TO_LIN(init_ss, init_sp);
*stack = 0;
}
TRACE("entry point: %04x:%04x\n",init_cs,init_ip); TRACE("entry point: %04x:%04x\n",init_cs,init_ip);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment