Babbage was the main assembler used on the GEC 4000 series.
It defined programs as a set of Chapters, each of which could be separately compiled. Chapters could either be program chapters or data chapters. A data chapter could be shared by several program chapters.
Compiled chapters were relocatable within the address space of a process. The linkage stage allocated chapters to specific locations and resolved references between chapters.
Program chapters consisted of one or more routines which acted as subroutines.
Variables were declared by giving their type, name and, possibly, initial value.
For example:
FULL count = 0, p, q = HEX'3F00' REAL a, b = 3.255
An expression consisted of a command describing an arithmetic evaluation. Expressions consisted of operands and operators and were evaluated from left to right, with the result of the operation and the next operator and operand defining the next instruction. There was a 1-1 correspondence between operators and instructions in the 4000 instruction set. The operator => indicated a store operation. For example:
FULL a, b, c, d a+RX & 7 * b => c * d
would generate code:
LDW a RAD A,X NL 7 MW b STW c MW d
Conditional operations were coded:
IF a EQ b THEN 1 => a
and this would generate code:
LD a CP b BNZ address following ST LDL 1 ST a