<< Assembly Unit Home

Valid HTML 4.01!

Words, sentences, paragraphs and headings in ordinary text are formatted (organized) in special ways to make text easier to read. Similarly, programs are formatted in special ways to make code easier to read.

It is easier to understand and change programs which are easier to read. Code readability becomes more important as programs grow bigger. You should get in the habit of writing well formatted code as soon as you start writing programs.

A common way to format assembly programs is to organize code in 4 columns:

  1. instruction label column
  2. symbolic opcode column
  3. operands column
  4. instruction comment column

Here is an example.

Check the different code samples around this learning unit to see examples of this style and other styles for formatting your code.