Converting 16-bit DOS .com assembly for use on 64-bit

家住魔仙堡 提交于 2019-12-04 05:41:20

问题


I wrote few programs in assembly in flat assembler for 32bit windows xp. But now that I have 64bit windows 8 I can't run the .com files, as they appear to be incompatible with 64bit version (the programs are 32bit).

How do I convert it so I can run it in win8 as well? Maybe use a different assembler?

I'd like to avoid the need for emulators and virtual machines.


回答1:


A .com file is 16-bit. You can use 32-bit instructions and registers, but it's 16-bit code. A 64-bit CPU, once it's put in "long mode", does not support vm86 which is what XP uses to run .com files. Blame AMD, not MS (this time). Use an emulator (DosBox, etc.) or convert your code to 32-bit (which should run on a 64-bit OS)



来源:https://stackoverflow.com/questions/26079608/converting-16-bit-dos-com-assembly-for-use-on-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!