Jump to content
xisto Community
m_rahman

How 2 Download An Assembler?

Recommended Posts

hello all, i'm a beginner with assembly. i'm a c++ developer. and i need to start learning assembly, how can i download a compiler for assembly language? and which environment to start the program at? and is there is any available resources i can start with?

Share this post


Link to post
Share on other sites

First question first, I'd recommend TASM or NASM over MASM. To get TASM jsut search for a TASM download or purchase Borland C++. I wouldn't get TASM version 3 or less, just 4 or 5. For NASM go to https://sourceforge.net/projects/nasm/files/ and download the proper version for your OS. Be sure to get the DOS-32 version if you have windows. Your second question is kind of vague, if you mean OS, just make sure you have a PC instead of an Apple. If you have Linux, you need NASM. Just do a search for Assembly Tutorials, there are millions of them out there. Art of Assembly is a very good one. Early next week I plan on putting the first in a series of assembly tutorials in the tutorials section here, so let me ask you a question. Do you understand binary and hexadecimal. Because whether or not you do will determine how I start the tutorial. Last but not least, welcome to the world of assembly program, where few except the brave dare to trod.

Share this post


Link to post
Share on other sites

Thanks man, it was very helpful, ok yes i understand binaries and Hex. and this is a PC with Windows installed. what i still wondering is why did yo say "few except the brave dare to trod"? is it harmful when mistaken ? so i forget about the bugs, debugging and that luxury from now on? ;) you may start your torurial with consideration that no one will think of learning assembly unless those are perfect with high level programming language, so i know what is a function parameter, a memory address, a byte and so on.

Share this post


Link to post
Share on other sites

Actually, it's not that bad. Anything you do in Windows can't access system critical files because Windows runs in protected mode. People don't like using assembly because they see no reason not to use a higher level language, and your assembly program won't work right if even one simple statement is wrong. It is also hard to debug assmebly programs by doing a step by step trace, but TASM has a debugger that allows you to do that. Mostly people just feel assembly is archaic.

Share this post


Link to post
Share on other sites

you may start your torurial with consideration that no one will think of learning assembly unless those are perfect with high level programming language, so i know what is a function parameter, a memory address, a byte and so on.

actually you'd be surprised. I first started with C back in 8th grade and started to learn assembly freshman year of high school.
Also, function parameter is not what you're used to. Instead of doing say func(a,b,c), you do a -> register 1, b -> register 2, c -> register 3, call func(). Might seem like it takes more time, but it's probably less than the high level equivalent in real code. If you ever want to write an OS (like me) I suggest you pick up FASM now as well as NASM. I haven't heard of too many respectable programs in TASM except for the ti calculators ;)

Share this post


Link to post
Share on other sites

Osknockout raises a good point. TASM really is used more for writing programs for TI calculators, which is why I picked it up. I agree that for OS writing you will definitely need NASM and FASM. TASM probably isn't one of the best choices actually, although I still stand by my claim that MASM is worse. And osknockout, if you'd let me, I'd love to take a look at a compiled form of your OS. I'm working on one off and on now, but haven't delved very far into protected mode, so it doesn't really do anything yet. The lack of parameters, by the way m_rahman, is because variables don't really exist in assembly, registers are small data storage and manipulation units inside the processor.

Share this post


Link to post
Share on other sites

osknockout i'm confused now because of the leading character to ASM for each one (NASM TASM MASM the worse) i will download NASM because i don't know about the other too, and in fact i don't know what is that N before ASM? ;)well ppl it's getting clear everytime a new post arrives. i thought that assembly is now used in museums , i was wrong.

Share this post


Link to post
Share on other sites

To sum up the different assemblers, the ASM in each is just short for assembler. TASM is Turbo assembler produced by Borland, NASM is Netwide assembler, MASM is Microsoft assembler, and FASM is Flat assembler, which (osknockout will have to correct me if i'm wrong here) I believe is because its primary form of compilation is to flat binary, which means without a header to designate it as a certain kind of file. Also in the works is an assembler I am working on, but that's going to take a while. Unfortunately, too many people feel assembler is archaic, which means new languages are being written in old languages and unoptimized code is being compunded. Assembler is still used in the world of operating systems, so all of the joke sites that have "Windows source code" in a C style language are way out of touch. Assembler is also used whenever maximum optimization is needed, so the government uses it heavily, or at least should.

Share this post


Link to post
Share on other sites

Actually I picked up TASM for programming TI-83's and then quit in 2 weeks... not worth it. I'm barely an intermediate at assembly (1 year experience) and I just made a "Hello World!" floppy-os. Yes, go on laughing. I haven't even ventured into protected mode, but then again, I have little free time.

Assembler is still used in the world of operating systems, so all of the joke sites that have "Windows source code" in a C style language are way out of touch. Assembler is also used whenever maximum optimization is needed, so the government uses it heavily, or at least should.

Yep, but I seriously thought that the Win programmers did program their OS in C, like Linux.
By the way m_rahman, you should read a few optimization articles after you get the gist of assembly: how to get the most operations in the smallest number of clock cycles, how to make a program smaller & more efficient, etc. I suggest you look at my x86 clocking topic.

Share this post


Link to post
Share on other sites

I haven't done anything other than a "Hello World" floppy-os either, os I'm not laughing. And m_rahman, I agree that optimization is important, but make sure you have the gist of assembly first as on most modern computers, optimization isn't too important, especially with how much space the program takes up. And you should definitely look at osknockout's post about clock cycles. If you have any more questions, feel free to ask. And get Ralph Brown's Interrupt List: http://forums.xisto.com/no_longer_exists/.

Share this post


Link to post
Share on other sites

Oh, I'll look at it in my free time... Glad I'm not the only one still going hello world.

I agree that optimization is important, but make sure you have the gist of assembly first as on most modern computers, optimization isn't too important, especially with how much space the program takes up.

Perhaps, but to make the best OS you need the best stuff... and for me that's optimized assembler. :D

Share this post


Link to post
Share on other sites
:D I know, but still it's best to learn optimization soon after you get the basics of assembly. Besides, getting it at the basics leads to less bloated code later on, something every program needs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.