PLAN is a fairly horrid assembler, with poor syntax and limited features. It uses a fixed format layout, designed for 80 column punch cards.
Another assembler, GIN, was used for developing George and EXEC. It was freer in format, had better macro facilities and conditional compilation. Unfortunately it is pretty specific to writing George (although some user level programs were written in GIN, sometimes in the expectation that they would later be rewritten to be part of George). One notable limitation of GIN is that it generates programs directlty rather than producing "semicompiled" output suitable for processing by the consolidator (linker).
Yet another assembler for the ICL 1900 was PLASYD, which was inspired by Wirths PL/360. The PLASYD compiler has been found and documentation is available on the ICL 1900 site. The ATLAS Computing LAB seemed to have been great fans of PLASYD.
Anyway, here are some notes about using PLAN
1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890 LABEL LDN 2 'FDTABLE' [ GET ADDR OF FTABLE
All of these fields are used in instruction sequences, but PLAN compiler directives use the label field (stretching into the operation and accumulator fields if necessary) and the operand field.
1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890 # THIS IS A COMMENT. THE COMMENT TEXT STARTS AS FAR TO # THE LEFT AS IT CAN GO. AND AS FAR INTO THE RIGHT AS WE # CAN GET WITHOUT FLAGGING ERRORS. [ THIS IS A COMMENT TOO, BUT PLAN WILL OUTPUT ZEROES HERE! [ AND FLAG THE LINES WITH A "P" ERROR AS THEY STRAY INTO THE [ SEQUENCE FIELD. LABEL LDN 2 'FDTABLE' [ A SIMPLE COMMENT ON AN INSTRUCTION
Beware! using the "[" syntax on an otherwise empty line causes PLAN to output a zero word, which is probably not what you want. (Note that an all zero word is not a no-op (NULL) on the 1900, it is LDX 0 0 - Load register 0 with contents of word at address 0, which happens to be register 0. One might naïvely think that that was a no-op but LDX adds the carry register to the destination, so LDX 0 0 actualy does X0 = X0 + carry, clear carry.
1 2 3 4 5 6 7 8 12345678901234567890123456789012345678901234567890123456789012345678901234567890 # ATTEMPT TO USE A LONG LABEL INCORRECT LDN 2 'FDTABLE' [ LABEL "INCORRECT" DOES *NOT* XXX X XXXX [ POINT HERE.
If you forget to define a symbol that is used in a data reference (or if you make a typo) the PLAN compiler will allocate a word of lower variable memory for it.
#DEFINE TAB=9 [ This is what I want ... LDN 2 TBA [ typo. wanted to put 9 in X2Instead of complaining on the line referencing the undefined symbol "TBA" the PLAN compiler will pretend you wrote:
#LOWER TBA [ allocate 1 word of lower variable memory #PROGRAM ... LDN 2 TBA [ put address of TBA in X2In a similar fashion if you reference a code location that is not defined PLAN will assume it's an external reference. (In fact PLAN has no way of explicitly declaring an external reference).
You will only be informed of your error at consolidation time.
There is no include facility.