user252778
user252778

Reputation:

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,'$'

Upvotes: 1

Views: 271

Answers (2)

user258214
user258214

Reputation: 37

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

Upvotes: 2

Ritsaert Hornstra
Ritsaert Hornstra

Reputation: 5111

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.

Upvotes: 1

Related Questions