是否可以在支持Intel IA-32e模式的操作系统中运行16位代码? [英] Is it possible to run 16 bit code in an operating system that supports Intel IA-32e mode?

查看:122
本文介绍了是否可以在支持Intel IA-32e模式的操作系统中运行16位代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Intel 64& IA-32体系结构手册第3A卷,第9章处理器管理和初始化",我发现了以下内容:

In the Intel 64 & IA-32 architecutures manual vol 3A, Chapter 9 Processor Management and Initialization, I found the the following:

以代码段为基础选择执行兼容模式.此模式允许旧版应用程序与以64位模式运行的64位应用程序共存.在IA-32e模式下运行的操作系统可以通过将其代码段描述符的CS.L位清除为0来执行现有的16位和32位应用程序.

Compatibility mode execution is selected on a code-segment basis. This mode allows legacy applications to coexist with 64-bit applications running in 64-bit mode. An operating system running in IA-32e mode can execute existing 16-bit and 32-bit applications by clearing their code-segment descriptor's CS.L bit to 0.

这是否意味着旧版16位&在IA-32e模式下运行的操作系统上,32位应用程序可以与64位应用程序共存.

Does this mean that legacy 16-bit & 32-bit application can coexist with 64-bit application on an operating system running in IA-32e mode.

但是,据我所知,传统的16位代码通常不受64位操作系统支持.如果支持,如何启动16位应用程序?

But as I know, legacy 16-bit code is generally not supported by 64-bit operating system. If it is supported, how can I startup a 16-bit application?

推荐答案

16位DOS应用程序无法在64位Windows上运行,因为在长模式下无法使用virtual-8086模式

16-bit DOS apps can't run under 64-bit Windows, because virtual-8086 mode isn't available in long mode

但是16位保护模式仍然可用,因此技术上可以运行16位Windows 3.x应用程序.这就是葡萄酒

However 16-bit protected mode is still available, so technically it's possible to run 16-bit Windows 3.x apps. That's how Wine runs 16-bit Windows apps in 64-bit Linux. Unfortunately 64-bit Windows doesn't have the same capability, although the reason is not because 64-bit mode cannot run 16-bit instructions but because the significant part has been increased.

主要原因是句柄在64位Windows上具有32个有效位.因此,句柄不能被截断并传递给16位应用程序而不会丢失数据.

The primary reason is that handles have 32 significant bits on 64-bit Windows. Therefore, handles cannot be truncated and passed to 16-bit applications without loss of data.

https://docs.microsoft .com/en-us/windows/win32/winprog64/running-32-bit-applications

因此,如果要在64位Windows上运行16位应用程序,则必须使用虚拟机

So if you want to run 16-bit apps on 64-bit Windows you have to use a virtual machine

有关更多详细信息,请阅读彼得·科德斯的答案

For more detailed information please read Peter Cordes' answer

另请参阅 64位计算机(x86)是否可以在没有仿真的情况下本机运行16位操作系统?

这篇关于是否可以在支持Intel IA-32e模式的操作系统中运行16位代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆