[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
BeginnersGuideToASM
Introduction to 80x86 Assembly
The Netwide Assembler is probably one of the best choices for an assembler. First of all because its free, second because it has enough documentation to learn off of. The Turbo Assembler does cost money, but isn't used most in development. Microsoft's Macro Assembler is the most popular assembler in use today.
HLA by Randll Hyde
It means Higher Level Assembly. Here you can use Higher level language syntax in assembly language with new assembler provided by Randll Hyde you can get it on Websters homepage. You can also get Masm v61 for free. HLA
Getting into it
As we get into the dirty bit, I need to explain the contents of a simple program. Remember Assembly is a very low-level language, in which you can speak to the hardware, which is why it is choosen by so many people. When you are accessing the registers, you're accessing spots in the CPU, from the CPU to output, it doesn't take much time to fetch the information. Assembly deals with a amount of conditions switching binary bits from 1 to 0, vice-versa, or just leaving them alone. I'm assuming you know binary if you are reading this tutorial, if I get a few messages in my mailbox (I'm DragonSlayah, my mailbox on codepedia ;), then I will cover the conversion of bases.
One question ?
Assembly language is touted as on of the main reason for accessibility to hardware. Discuss why don't we have full control over hardware using high level language.
The Cycle of Assembly Development
The development cycle of Assembly isn't much different from others. Usually, it starts when you load your editor, and produce the source file. Then you compile the .asm file with nasm. If errors occured, go back and fix them (duh), or if not...link the program if necessary then execute it.
Compiling with NASM
A COM application, is an executable in a different format. The syntax we will be using at the command prompt is nasm16 *name*.asm -f bin -o *name*.com. If you need to get nasm still, you will find it at http://nasm.sourceforge.net/. You will also need a linker, I will be using ALINK.
Learning NASM Functions
First of all, a ; identifies a comment. For example:
Of course, these comments only last one line. There are no multiline comments. Now, for your pleasure, some simple asm instructions!
How to learn more...
It is time to close this segway, but I should have covered enough to cut some of your confusion when you get into a tutorial. Assembly Language Step-by-Step is a great book to learn from. But on Programmers Heaven, try looking at the assembly section.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
BeginnersGuideToASM
Introduction to 80x86 Assembly
The Netwide Assembler is probably one of the best choices for an assembler. First of all because its free, second because it has enough documentation to learn off of. The Turbo Assembler does cost money, but isn't used most in development. Microsoft's Macro Assembler is the most popular assembler in use today.
HLA by Randll Hyde
It means Higher Level Assembly. Here you can use Higher level language syntax in assembly language with new assembler provided by Randll Hyde you can get it on Websters homepage. You can also get Masm v61 for free. HLA
Getting into it
As we get into the dirty bit, I need to explain the contents of a simple program. Remember Assembly is a very low-level language, in which you can speak to the hardware, which is why it is choosen by so many people. When you are accessing the registers, you're accessing spots in the CPU, from the CPU to output, it doesn't take much time to fetch the information. Assembly deals with a amount of conditions switching binary bits from 1 to 0, vice-versa, or just leaving them alone. I'm assuming you know binary if you are reading this tutorial, if I get a few messages in my mailbox (I'm DragonSlayah, my mailbox on codepedia ;), then I will cover the conversion of bases.
One question ?
Assembly language is touted as on of the main reason for accessibility to hardware. Discuss why don't we have full control over hardware using high level language.
The Cycle of Assembly Development
The development cycle of Assembly isn't much different from others. Usually, it starts when you load your editor, and produce the source file. Then you compile the .asm file with nasm. If errors occured, go back and fix them (duh), or if not...link the program if necessary then execute it.
Compiling with NASM
A COM application, is an executable in a different format. The syntax we will be using at the command prompt is nasm16 *name*.asm -f bin -o *name*.com. If you need to get nasm still, you will find it at http://nasm.sourceforge.net/. You will also need a linker, I will be using ALINK.
Learning NASM Functions
First of all, a ; identifies a comment. For example:
; Here is a comment :P ; Beware of the semicolon! ; Everyline we comment on, now we remember what the code does!
Of course, these comments only last one line. There are no multiline comments. Now, for your pleasure, some simple asm instructions!
- mov - Instruction that copys from source to destination.
; Example of MOV mov ax,9 ; Copy decimal 9 into 16-bit register ax
- int - Calls an interrupt function
int 21H ; Call onto DOS
- resb - Reserve byte(s)
resb 64 ; Use this instruction to reserve 64 bytes for the stack
How to learn more...
It is time to close this segway, but I should have covered enough to cut some of your confusion when you get into a tutorial. Assembly Language Step-by-Step is a great book to learn from. But on Programmers Heaven, try looking at the assembly section.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
