Skip to contentSkip to conversation

Question about how DOSEMU works

DISCUSSION [email protected] 2 participants 2 messages Aug 13, 2002

lore
Share & tools
lore
#0 lore raw

Hi:

I've downloaded the source code for DOSEMU, but was wondering if someone could help me to look for the code for a specific feature.

I know that DOSEMU does some form of binary translation on instructions from the DOS application. However, for performance gains, it is usually faster to simply allow direct (native) execution of the DOS application's instruction. (See, e.g., http://www.deatech.com/deatech/articles/linux_pc_vc.html ). Does DOSEMU allow (enable) direct execution of instructions? I presume that all instructions coming out of the DOS application are trapped. Is that correct? Does that trap first look at the instruction and, depending on what it is, simply allow the instruction to be executed (and, if not, do a binary
translation)? If so, where in the source code is that decision logic?

Best wishes,

Ron

#1 lore raw
Quoted 9 lines · On Tue, 13 Aug 2002 [email protected] wrote:

I know that DOSEMU does some form of binary translation on instructions from the DOS application. However, for performance gains, it is usually faster to simply allow direct (native) execution of the DOS application's instruction. (See, e.g., http://www.deatech.com/deatech/articles/linux_pc_vc.html ). Does DOSEMU allow (enable) direct execution of instructions? I presume that all instructions coming out of the DOS application are trapped. Is that correct? Does that trap first look at the instruction and, depending on what it is, simply allow the instruction to be executed (and, if not, do a binary
translation)? If so, where in the source code is that decision logic?

DOSEMU runs code natively by default. Either using vm86(2) or just by jumping into it for DPMI. It traps privileged instructions using faults.

Search for cpuemu in the source if you want CPU emulation too.

CPU emulation is also used for planar video mode emulation under X (for instance vga 640x480x16 colours)

Bart