This document provides the official coding standards and conventions for TOPS-20 machine language source code. It covers essential practices, including:
- Statement Formatting: Guidelines on tab stops, tag placement, opcode structure, and commenting conventions.
- Comments: Requirements for extensive documentation, including proper alignment, usage of clear English, and routine header requirements.
- Listing Pages: Rules for organizing source files into pages using formfeeds and controlling flow-of-control across page boundaries.
- Macros: Standards for macro definition, usage, and indentation, emphasizing monitor-wide consistency.
- Conditionals: Procedures for indenting assembler conditionals and rules regarding angle bracket usage.
- Variables, Structures, and ACs: Guidelines for stack usage, AC mnemonics, and definitions to ensure clean, maintainable code.
- JSYS Calls: Conventions for calling monitor-call JSYSes and writing JSYS implementation routines, including entry/exit procedures and error handling.
- Subroutines: Standards for subroutine calling, argument passing, and documenting call sequences.
The guide also includes an appendix detailing how to integrate this standard into existing non-conforming code bases and recommendations for stack management.