1
0
Fork 0

Changed visual c assembly startup piece a bit

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1527
This commit is contained in:
Sjoerd van der Berg 2004-01-02 20:46:38 +00:00
parent d78544d289
commit f06e281ba5

View file

@ -76,27 +76,22 @@ static BlockReturn gen_runcode(Bit8u * code) {
#if defined (_MSC_VER)
__asm {
/* Prepare the flags */
mov eax,[code]
push ebx
push ebp
push esi
push edi
pushfd
mov ebx,[reg_flags]
and ebx,FMASK_TEST
pop ecx
and ecx,~FMASK_TEST
or ecx,ebx
push ecx
push ebx
popfd
call dword ptr [code];
call eax
/* Restore the flags */
pushfd
mov ebx,[reg_flags]
and ebx,~FMASK_TEST
and dword ptr [reg_flags],~FMASK_TEST
pop ecx
and ecx,FMASK_TEST
or ebx,ecx
mov [reg_flags],ebx
or [reg_flags],ecx
pop edi
pop esi
pop ebp