# x86 Assembler for Vista 64-bit?

This topic is 3336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Ok, so I'm doing a Computer Science degree and we're learning assembly. I had TASM running on my XP 32-bit laptop but recently I got a new computer with Vista 64-bit and trying to run TASM results in an error message saying I need a version that works with 64-bit since, obviously with TASM being so old, it must be a 16-bit application. (Like Dungeon Keeper unfortunately as I discovered -_- but that's another issue). I looked at NASM and FASM but they both give me errors when I put in code like this which TASM never had a problem with:
.model small
.stack
.data
message   db "Hello world", "\$"

.code

main   proc
mov   ax,seg message
mov   ds,ax

mov   ah,09
lea   dx,message
int   21h

mov   ax,4c00h
int   21h
main   endp
end main
I don't know much about x86 Assembly but I've seen something about Intel syntax and AT&T syntax, though NASM and FASM are supposed to work with Intel syntax so I dunno. Maybe I need to configure them somehow? I also see Visual Studio 2008 Express includes MASM 9. How do I use that exactly? When I go to C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin with the Cmd prompt and type "ml test.asm" I get some errors about "symbol type conflict" and something else. ml /? doesn't really help either... Any ideas as to how I can successfully assemble and run the code above? I could just use TASM on my laptop but being able to do it on my main PC would be easier. Thanks.

##### Share on other sites
What are the exact error messages you get?

##### Share on other sites
I type this:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin>ml test.asm

Then this comes out:

Microsoft (R) Macro Assembler Version 9.00.30729.01Copyright (C) Microsoft Corporation.  All rights reserved. Assembling: test.asmtest.asm(9) : error A2004:symbol type conflicttest.asm(19) : warning A4023:with /coff switch, leading underscore required forstart address : main

##### Share on other sites
Have you considered doing what the warning says to do?

##### Share on other sites
Unfortunately once you've got it to assemble you'll run into another problem - that assembly code is 16-bit so I think the result won't run!

You're probably best off dual booting with an older O/S, or using an emulator like DosBox.

##### Share on other sites
Just a bit of trivia:
Quote:
 Original post by Sean_Seanston[...]TASM[...]

Quote:
 Original post by Sean_Seanston[...]Microsoft (R) Macro Assembler Version 9.00.30729.01[...]
TASM doesn't stand for "Microsoft (R) Macro Assembler". The appropriate acronym in this case is MASM. TASM stands for Turbo Assembler, which was (is?) a Borland product.

##### Share on other sites
Hi, during college i used a program for some courses, cant remember the name but it allowed you to program assembly and simulate/emulate all the functionalites ( IO and interrupts etc ) it had its own output window and all, if you dont need to make exes then you can search for something like that

##### Share on other sites
@extarius - I believe he tried to use TASM, discovered it didn't work on a 64 bit OS, and now is trying MASM and wonders why it won't compile his TASM-compatible code.

@Sean_Seanston - The main problem you're having is that, like Adam_42 said, you are trying to compile 16 bit code in a very-not-16-bit assembler!! ".model small"? Memory models don't work like that now in windows. That's why MASM is complaining. The line "mov ax, seg message" I believe will error because you don't have segments to address memory any more either. It's all flat (in fact it's not even real memory addresses any more, but that's another issue that probaby won't concern you)

Also, as promit and the masm warning said, you need an underscore to main, so call it _main.

I think your best bet would definitely be to boot to a 32 bit OS (maybe even DOS???) or learn to use MASM for making windows programs, of which there are tons and tons of tutorials on the internet if you just google for them.

 Or do what NoPlace suggested... sounds like it's just what you need.

Good luck!

Cheers
-Scott

##### Share on other sites
Quote:
 Original post by popsoftheyear@extarius - I believe he tried to use TASM, discovered it didn't work on a 64 bit OS, and now is trying MASM and wonders why it won't compile his TASM-compatible code.[...]
Indeed. I must be more tired than I thought =-/

##### Share on other sites
Quote:
Original post by Extrarius
Just a bit of trivia:
Quote:
 Original post by Sean_Seanston[...]TASM[...]

Quote:
 Original post by Sean_Seanston[...]Microsoft (R) Macro Assembler Version 9.00.30729.01[...]
TASM doesn't stand for "Microsoft (R) Macro Assembler". The appropriate acronym in this case is MASM. TASM stands for Turbo Assembler, which was (is?) a Borland product.

Yes, I was talking about TASM in the early part of the post but later on I was discussing MASM and the errors I get with that...

Quote:
 Original post by popsoftheyear@extarius - I believe he tried to use TASM, discovered it didn't work on a 64 bit OS, and now is trying MASM and wonders why it won't compile his TASM-compatible code.

Yes indeed ^_^

Quote:
 Original post by popsoftheyear@Sean_Seanston - The main problem you're having is that, like Adam_42 said, you are trying to compile 16 bit code in a very-not-16-bit assembler!! ".model small"? Memory models don't work like that now in windows. That's why MASM is complaining. The line "mov ax, seg message" I believe will error because you don't have segments to address memory any more either. It's all flat (in fact it's not even real memory addresses any more, but that's another issue that probaby won't concern you)

I see... suppose I'll just use my laptop for assembly then.

Thanks.

##### Share on other sites

This topic is 3336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628645
• Total Posts
2984028

• 9
• 9
• 9
• 10
• 21