First page Back Continue Last page Overview Graphics
Comments are preceded by a semicolon.
- ;Put the value of a quarter in accumulator A
- LDAA #25 ;Quarter is equal to 25 cents
Multiple line comments should be used to explain sections of code.
Don’t explain the assembly language statement. Explain the function of the statement in the program.
Entire lines can be preceded by a “;” for documentation purposes.
Assembly language code is much more difficult to follow than higher level language code so it is imperative to document the programs well. You may have little difficulty following the short programs written for this course, but very large programs that are not properly documented will be nearly impossible to decipher. Image getting handed an undocumented 400 page program to modify, The situation would be bleak.
Typically, companies that develop software have standards that their employees are required to follow when documenting programs.