PiDP-8/I Software

Changes To A Field Guide to PDP-8 Assemblers
Log In

Changes to "A Field Guide to PDP-8 Assemblers" between 2017-12-10 12:11:12 and 2017-12-10 12:20:33

156
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171
172
173
174
175
176
177
156
157
158
159
160
161
162

163
164
165
166
167
168


169
170
171
172
173
174
175







-
+





-
-







*   The `PAGE` pseudo-op takes no argument: it simply forces the assembler to go to the next page
*   Off-page indirection is allowed; the assembler will generate instructions to jump between pages as needed
*   No square bracket syntax for placing literals on page zero
*   Several new pseudo-ops to get around the fallout of all this programmer freedom:
    *   `ABSYM`: define a symbolic name for an absolute core memory location
    *   `CPAGE`: reserve N words of core on the current page if space is available, else next page
    *   `LAP` and `EAP`: leave and re-enter automatic paging mode
    *   `OPDEF` and `SKPDF`: define custom op-codes
    *   `OPDEF` and `SKPDF`: define custom op-codes; `INC` non-skip version of `ISZ` predefined
    *   `REORG`: similar to `*` feature of PAL, except that it's forced to the top of the page
*   Arithmetic expressions banned in operands; simple `N+1` case replaced by the `#` feature

You may be surprised to see the `OPDEF` and `SKPDF` psuedo-ops grouped among these consequences of the way SABR works as compared to the PAL type assemblers. This is because the PAL way of defining custom opcodes (e.g. `DVI=7407`) assumes the programmer knows what she is doing with regard to whether the opcode can cause the next instruction to be skipped. Since the SABR programmer generally doesn't know where the page boundaries are, that means she cannot predict what certain instructions will look like in the final machine code, and thus whether a skip will do what she wants it to. SABR therefore provides two different ways to define custom opcodes, one for each case, which allows the programmer to clue the assembler into the correct output.

SABR also provides some predefined custom opcodes which distinguish these cases, such as `INC` vs `ISZ`, the former of which you use when the programmer knows there can be no possibility of an instruction skip, allowing SABR to generate shorter code in some cases.

SABR has a bunch of pseudo-operators to support SABR's role as the back end of OS/8 FORTRAN II:

*   `ARG`: define address/argument value pairs for calling FORTRAN subroutines
*   `BLOCK`: same as `ZBLOCK` in PAL8
*   `CALL`: call external subroutine
*   `COMMN`: set aside storage space in field 1, which OS/8 FORTRAN II uses for `COMMON` storage
*    `DUMMY`: used in the calling convention for FORTRAN subroutines