Where Can I Find Manuals for Learning Assembly Language Programming?

  • Thread starter smize
  • Start date
  • Tags
    Assembly
In summary, I would recommend that you get the manuals for the CPU you are programming for, and then code what you need to code from those manuals.
  • #1
smize
78
1
I've been programming c/c++ for a month or two, I have experience with Expression 2 (an in game programming language in Garrys Mod which is similar to VBasic), and 7 years experience with web development.

What I'm wanting to do now is begin learning Assembly language and how to compile it. What assemblers are best? Any advice on diving into assembly?

Another question which is irrelevant. What are some good beginner programs to make in c/c++? I have Code::Blocks, Qt and Visual Express 2010 (my favorite). Thank-You!
 
Technology news on Phys.org
  • #2
Visual C/C++ express includes an assembler, but doesn't provide a default build step for running the assembler. After adding an assembler source file to a project, right click on the name of the source file in the project and add a custom build step to do the assembly. For debug build it looks like this:

ml /Zi /c /Fo$(outdir)\example.obj example.asm

For release build it looks like this:

ml /c /Fo$(outdir)\example.obj example.asm

In both cases, "outputs" of the custom build step looks like this:

$(outdir)\example.obj
 
Last edited:
  • #3
Try a board game like tic tac toe or othello. It let's you explore using buttons, graphics and some simple logic.

Othello may be more demanding in that you need a strategy to select moves for your computer opponent. One thought is make a list of valid moves then randomly. The other is to score the valid moves based on square position and pick the highest square. The very best squares to move to are the outermost corner squares as they can't be flipped? Next if you look at the 8x8 board as nested squares you'll notice the innermost square block 2x2 then surrounded by good squares to move to then those are surrounded by a block of squares that aren't some good to move to then the outermost layer of good squares with the best being the outermost corner squares.

For more demanding projects you could move into an animated board game or aerial view of an animated game with armies battling each other.
 
  • #5
Hey smize.

Since you have experience programming, I would recommend that you download the manuals directly from Intels and AMD's website: they give you the instructions, the syntax, and all the side issues associated with what's affected on the whole CPU with respect to flags, conditions, and so on.

Maybe you should use a tutorial for a bit, but afterwards it's a lot better to just get the manuals, look at the instructions and then use that to code what you need to code.

It'll be easier also if you migrate to other platforms like embedded systems and small microcontroller devices where you are given the manuals and a compiler/linker suite to do your work (without a lot of examples or other extensive documentation).
 

1. How do I choose a suitable assembler for my project?

Choosing an assembler depends on the type of assembly language used in your project and the type of processor you are targeting. Some commonly used assemblers include GNU Assembler (GAS), NASM, and MASM. It is important to research and compare the features and compatibility of different assemblers before making a decision.

2. What are the basic steps involved in assembly?

The basic steps in assembly include setting up the development environment, writing the code in assembly language, assembling the code into machine code, linking and debugging the code, and finally, executing the program on the target system.

3. How do I learn assembly language?

The best way to learn assembly language is by practicing and experimenting with it. Start by learning the syntax and basic instructions of the specific assembly language you are interested in. There are also many online tutorials, books, and courses available to help you learn assembly language.

4. What are some common mistakes to avoid in assembly programming?

Some common mistakes to avoid in assembly programming include not using comments to explain the code, not considering the endianness of the target system, not properly handling registers and memory, and not optimizing the code for efficiency and readability.

5. How can I debug my assembly code?

The debugging process in assembly is similar to other programming languages. You can use a debugger tool to step through the code and track the values of registers and memory. Other techniques include using print statements, logging, and writing test cases to identify and fix errors in the code.

Similar threads

  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
12
Replies
397
Views
13K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Programming and Computer Science
Replies
4
Views
15K
  • Programming and Computer Science
Replies
5
Views
4K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
2
Replies
60
Views
16K
  • Programming and Computer Science
Replies
16
Views
1K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Back
Top