Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some ways you can manage large-scale assembly language projects?

Tags:

x86

assembly

At my university the Assembly Programming (x86 and MIPs) class is drawing to an end.

I've thoroughly enjoyed my work in assembly and I would really like to continue working with it. You would think that having to do everything myself would be a drag but I have found that there is a level of transparency that I don't get with higher level languages.

Things generally work how I would expect them to, because I executed the machine code for them to happen. There is no magic.

However, at school the longest assembly program I wrote was maybe 2-3 pages in length.

I recently read about Roller Coaster tycoon being written by a single developer, in assembly.
alt text
(source: com.com)

I have difficulty imagining how someone could maintain such a large project in assembly.

Right now I'm struggling making the leap from 2-3 page assembly programs to something of a little more scale. Even on my Ti-83 calculator people have written Mario/Zelda clones in assembly that must be tremendously complex!

There have to be some nicer tools, IDEs, and methods for managing large x86 assembly projects that make it at least somewhat maintainable.

What are they?

like image 715
mmcdole Avatar asked Apr 16 '09 18:04

mmcdole


People also ask

What are three types of assembly language statements?

A typical assembly language consists of 3 types of instruction statements that are used to define program operations: Opcode mnemonics. Data definitions. Assembly directives.

What are the four fields are used for assembly language programming?

Each source statement may include up to four fields: a label, an operation (instruction mnemonic or assembler directive), an operand, and a comment. The following are examples of an assembly directive and a regular machine instruction.

What tools support assembly programs?

You will need an assembler, a linker, a debugger, and an editor. These tools are briefly explained below. An assembler is a program that converts source-code programs written in assembly language into object files in machine language.


2 Answers

Large scale assembly programmes are managed just like any other programme - well partitioned functional blocks with clear interfaces. Since you are working in assembly, your interfaces will be limited to things on the register file or stack. It is ultimately about having a good design plan ahead of actually implementation. You need to be crystal clear about what to write and how to write it.

That being said, if you like assembly, there is another way to be able to indulge in your passion without actually writing assembly code - you can write in C or C++ and see how code compiles to assembly. Then, write the same thing in a different way and understand how that changes the assembly. As a result, you will soon be able to think like a compiler and write highly optimal code.

Either way, knowing how things work in assembly will ultimately make you a better programmer.

like image 159
sybreon Avatar answered Nov 07 '22 21:11

sybreon


Macros, functions, and libraries. It takes years to develop your own from scratch, so search for x86 assembler resources and lean on others - there are many people still doing active assembly development for the PC.

One active member of the assembly community is Steve Gibson, he has a whole bunch of links to good resources for assembly programming here:

http://www.grc.com/smgassembly.htm

like image 41
Adam Davis Avatar answered Nov 07 '22 21:11

Adam Davis