问题
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