Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey

I am totally new in assembly programming, and I don't know anything about assembly programing and in this stage I'm just trying to get familiar with ADD, MOV, SUB and etc statements but i don't know how can I run my simple codes???

In book which I'm studying from it, wrote that i should do this:

In windows CMD do this e.g C:/> masm prog1 where " prog1 " is my assembly codes file, but i give this error which indicate that 'masm' is not recognized as an internal or external command, operable program or batch file.

Can any one guide me in this simple problem???

Like i said before i don't know any thing about assemblers and assembling :)
Posted
Updated 6-Apr-11 1:05am
v2

Have you installed an assembler? If not, that would be a good start!

If so, is it pathed so that Windows can find it? In you command prompt, type "path" and press enter. Is the folder assembler executable is in on that list?

"i guess i've been told that every windows has an assembler!! do i need to install one?? if so where can i find an assembler?
thank you"


That may be "Assemblies" you are thinking of! Very different thing indeed. :laugh:

You can get a copy of MASM v8.0 free for non-commercial use direct from Microsoft: Masm V8.0[^]
 
Share this answer
 
v2
Comments
dariush_ha 6-Apr-11 7:16am    
i guess i've been told that every windows has an assembler!! do i need to install one?? if so where can i find an assembler?
thank you
OriginalGriff 6-Apr-11 7:21am    
Answer updated
dariush_ha 6-Apr-11 7:24am    
:)) like i said i'm quite new in this, tnx
OriginalGriff 6-Apr-11 7:30am    
Welcome!
dariush_ha 6-Apr-11 7:35am    
this program which ur have posted needs Microsoft C++ 2005 express edition, but i have 2010 and 2008 Ultimate edition and setup does not continue!! and i can't download 2005 express edition[have no time!] what should i do??:-?:-/
One approach is to use a C++ editor, like Visual Studio C++ for example (the express edition is free).
By using the __asm keyword you can write assembly code inside your C++ function and this will also give you neat things like the ability to use the debugger and breakpoints.

A simple assembly program written in C++ could look something like this:
C++
int main(int argc, char *argv[])
{
    __asm
    {
        mov ax, 0
        add ax, 1
    }

    return 0;
}


Note that this approach is convenient for learning assembly but might not be applicable to your scenario, refer to this list[^] for a bunch of links to different assemblers.

Hope this helps,
Fredrik Bornander
 
Share this answer
 
Comments
dariush_ha 6-Apr-11 7:22am    
Thanks but my teacher wants me to write assembly codes in assembly native form, not some help tools
Fredrik Bornander 6-Apr-11 7:29am    
Then refer to the list and download an assembler.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900