开发者

ASM .com won't run

I found this sample tutorial The clueless guide to Hello World in nasm about basic ASM, when I compile it, everyting goes just fine!!! Great, but when I run it I get this message:

This version of hi.com is not compatible with开发者_开发百科 the version of Windows you are running

This happens on Windows 7 x64 (Which i was told would run fine) with this code

org 100h
mov dx,msg
mov ah,9
int 21h
mov ah,4Ch
int 21h
msg db 'Hello, World!',0Dh,0Ah,'$'


I thought you couldn't get 16 bit programs to run in 64 bit windows at all. Try DOSBOX


That looks like 16bit DOS code and 16bit code is not compatible anymore with Vista and above (at least Win7). Perhaps you can find a tutorial that creates a 32 bit or 64 bit PE image. It will only be an executable (.exe) and not a .com file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜