Summary:
This document provides the documentation and source code for a PDP-8 subroutine designed to print the contents of a computer word as a 4-digit, positive, decimal integer.
- Requirements: Requires 38 core locations and a basic PDP-8 system with an ASR 33 teletype.
- Usage: The subroutine is loaded via Binary Loader and called using the
JMS instruction, with the target value held in the Accumulator (AC).
- Methodology: The program functions by repeatedly subtracting powers of ten (1000, 100, 10, 1) from the input number to determine each decimal digit, which is then outputted sequentially.
- Limitations: The subroutine outputs only the four digits; it does not handle signs, spacing, tabs, or carriage returns.