在 32 位操作系统上运行 64 位汇编代码 [英] Run 64 bit assembly code on a 32 bit operating system

查看:39
本文介绍了在 32 位操作系统上运行 64 位汇编代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设您有一个运行 32 位操作系统的 64 位处理器.是否可以在 32 位程序中运行一些 64 位汇编指令?如果你有一个支持 64 位的处理器,不知道为什么不,但是在计算方面有很多小气的技术问题,尤其是操作系统.

Assuming you have a 64 bit capable processor running a 32 bit operating system. Would it be possible to run some 64 bit assembly instructions in a 32 bit program? Can't see why not if you have a 64 bit capable processor, but there are so many stingy technical issues in computing, especially the operating system.

注意我不是在谈论在 32 位操作系统上运行 64 位程序,只是使用嵌入在 32 位程序中的 64 位汇编指令.

NOTE I am not talking about running a 64 bit program on a 32 bit os, just using 64 bit assembly instructions embedded in a 32 bit program.

推荐答案

在这方面您最需要知道的是确保您的处理器模式转换正确.您需要做一些基本的工作才能从 32 位模式过渡到 64 位模式(也称为长模式).最大的问题是确保正确设置描述符表.更多信息在这里:http://www.codeproject.com/Articles/45788/The-Real-Protected-Long-mode-assembly-tutorial-for

The thing you would most need to know on this is to make sure you make your processor mode transitions correctly. You need to do some basic work to transition from 32 bit mode into 64 bit mode (also called long mode). The biggest issue would be making sure you set up the descriptor table correctly. Some more info is here: http://www.codeproject.com/Articles/45788/The-Real-Protected-Long-mode-assembly-tutorial-for

希望这会有所帮助.

这篇关于在 32 位操作系统上运行 64 位汇编代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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