CS 429H

Assembly Language Program Style Guidelines

(1) Every assembly language program must include a program header comment with this format, as the first information in the file:
;
; Author name:
; Section number:
; Assignment number:
; Date:
;
; Program name:
;
; SUMMARY
;         Say what the program does.
;
; INPUT
;         Describe the set of inputs.  Describe input error
;      checking, if any.
;
; OUTPUT
;         Describe what appears on the screen as output.
;
; ASSUMPTIONS
;         List assumptions you make about the program.  For
;      example, if you assume that a particular input
;      data item is always valid, state that.
;

(2) Symbolic names must be meaningful. Use a mixture of upper and lower  case to maximize readability. Some good examples:
    SaveR1
    ASCIItoBinary
    InputRoutine
    OPMULT

(3) Explain what each register is used for, in comments.

(4) Add a comment before each section of the program, describing what it does.

(5) Add comments after most of your commands, describing what they do.

(6) All code and comments should fit on the page; i.e., they should not wrap around or be truncated. Long statements that would run off the page should be split in an aesthetically  pleasing manner.