NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on March 26, 2008, 05:51:54 PM

Title: Win 64 bit incompatibility problem
Post by: nobody on March 26, 2008, 05:51:54 PM
I installed nasm 2.02 and asselbled the following program like this:

>nasm -f obj skeleton.asm
>link skeleton.obj io.obj

The are no errors until now...
but when I try to execute the exe file as:
>skeleton.exe
... it says that the program is not compatible with the 64 bit version of windows...
What can I do??



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Skeleton.asm program for nasm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%include "io.mac"
.STACK 100H
.DATA
   msg1  db "enter a char",0
   msg2  db "enter an integer",0
   msg3  db "enter a string",0
   msg4  db "you entered: ",0
.UDATA
    str1 resb 30
.CODE
        .STARTUP
   PutStr msg1
   nwln
   GetCh  AL
   nwln
   PutStr msg4
   PutCh al
   nwln
     ;;;;;;;;;;;;
        PutStr msg2
   nwln
   GetInt  BX
   nwln
   PutStr msg4
   PutInt  BX
   nwln
     ;;;;;;;;;;
   PutStr msg3
   nwln
   GetStr  str1
   nwln
   PutStr msg4
   PutStr str1
   nwln

done:
        .EXIT
Title: Re: Win 64 bit incompatibility problem
Post by: nobody on March 27, 2008, 01:33:09 AM
Without "io.mac", we have *no* idea what this code does!

The use of the 16-bit bx register might suggest dos code. I guess M$ made good on their threat to drop dos support in win64 - I really thought they'd back down on that. Guess not. That's just a guess...

If that's the problem, write some 64-bit code. Or win32 code??? I suppose that'll still run(?). Or install some sort of "dosbox" emulator. (I think there's one here at SF?) Or install a "dual boot" system, with dos as an option.

Best of all would be to escape your MicroSerfdom and graduate to Linux! (but dos code won't run there, either, without "dosemu").

Best,
Frank