Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Using Fabrice Bellard's runcom to run COM files under Linux (Announce)

posted by marcov, 21.03.2012, 13:43

> How does runcom work?
> In brief runcom works by using the Linux system call vm86() which provides
> a 16bit virtual machine however only on an Intel based (or emulated in the
> case of JSLinux machine) . vm86() is also used by DOSEmu:

(note that with "intel" they mean 32-bit x86 class, not CPU's made by Intel only)

>
> #define __NR_vm86    166
> #define __NR_vm86old 113
>


IIRC most 32-bit OSes have such calls for interfacing with the bios, e.g. FreeBSD x86 has (machine/x86.h):

extern int vm86_emulate(struct vm86frame *);
extern int vm86_sysarch(struct thread *, char *);
extern void vm86_trap(struct vm86frame *);
extern int vm86_intcall(int, struct vm86frame *);
extern int vm86_datacall(int, struct vm86frame *, struct vm86context *);
extern void vm86_initialize(void);
extern vm_offset_t vm86_getpage(struct vm86context *, int);
extern vm_offset_t vm86_addpage(struct vm86context *, int, vm_offset_t);
extern int vm86_getptr(struct vm86context *, vm_offset_t, u_short *, u_short *)

extern vm_offset_t vm86_getaddr(struct vm86context *, u_short, u_short);

But the main problem of this technology, like all hardware VM based solutions, is that won't work under 64-bit OSes? Hence, investing in this kind of technology at this point doesn't really make sense, since for direct usage there are mature solutions like dosemu.

To properly support running 16-bit code, in time you need to move to technology that can emulate or JIT 16-bit code on any CPU.

 

Complete thread:

Back to the forum
Board view  Mix view
22552 Postings in 2097 Threads, 401 registered users, 32 users online (0 registered, 32 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum