User Guide This program assembles a source text file into PDP machine code, displaying the object code, but producing no object file. To run the program type RUN Master. You will be prompted to enter the source filename. The program will then attempt to assemble the file. The subset of instructions recognised (case is ignored) are: mov src,dst movb src,dst cmp src,dst add src,dst clr dst tst dst tstb dst dec dst jsr r,dst rst r bgt addr bne addr where r is a register, addr is a destination address (usually a label reference), and src and dst are any register for the source and destination, in any of the eight addressing modes. The format of the addressing modes recognised is: Rg mode 0 (Rg) mode 1 (Rg)+ mode 2 @(Rg)+ mode 3 -(Rg) mode 4 @-(Rg) mode 5 value(Rg) mode 6 @value(Rg) mode 7 #number mode 2, register 7 (PC) @#value mode 3, register 7 (PC) value mode 6, register 7 (PC) @value mode 7, register 7 (PC) Where Rg is one of the registers, R0 to R7, SP or PC; value is an octal constatnt or a label reference; and number is an octal constant. The start of assembly is triggered by a .start instruction of the form: .start number where number is an octal value. As instructions always have to start on an even byte boundary, the origin is forced to be even by masking out bit 0. The assembly ends when a .end instruction or the end of the file is found. Before the program start, label constants can be set up by equating them to a value. This is set out in the form: label=number where label can be a string of up to 6 characters of A to Z, a to z, and 0 to 9, but starting with a letter. Some valid labels are: Print Fred1 Jim2Q Invalid labels are: 31V3 - is decoded by the number 31 followed by some rubbish !Login - Doesn't start with a letter Case is ignored in the labels, and also if a label is longer than 6 characters, then the final characters after the sixth character are ignored. The following labels are seen as the same: PrintOut PrintOver INPUT input InpuT Error1 ERROR1 conservative conservation conserve A label is declared within a program by stating it at the start of the line in the form: label: instructions For example: loop1: mov R0,R1 donull: rst pc At the end of the second pass the symbol table of all defined labels is listed in alphanumerical order. Error messages: Error messages are displayed on the second pass of the assembler. The following error messages are displayed: Parser associated errors: **** No .start declaration You haven't told the program where to start with a .start pseudo-instruction. This error is fatal and stops the assembly. Equates only allowed at start of program Equates may only be declared before the .start instruction. Invalid label name An attempt to declare a label that doesn't start with a letter. Invalid octal number An octal number has been expected, but it started with a character other than 0 to 7. Line terminated strangely The only extra things allowed at the end of a line are comments. This error may arise if there is some other error in the middle of the line. Unknown pseudo-instruction The only pseudo-instructions recognised are .start and .end. Assem associated errors: Unrecognised opcode Either an opcode has been used that isn't recognised, or you have miss-typed it. Branch out of range A branch instruction can only branch to a location within the range of -256 to +254 from the location of the next instruction. This is -254 to +256 from the location of the branch. Label not defined A label reference has been used without the label being declared anywhere. Check for misspelling. This is not an error message, just an information message. Second parameter missing The second parameter of a two-parameter opcode is missing, or the separating comma is missing. The following errors may have 'in source' or 'in destination' at the end when dealing with two-parameter instructions. Register not recognised The register operand is not recognised. It must be one of R0 to R7 or SP or PC. + or - missing? @(Rg) has been used instead of either @(rg)+ or @-(Rg). Missing ( An opening bracket has been missed off from a defered register reference. Missing ) in defered register The closing bracket has been missed off from a defered register reference. Defered register unrecognised The assembler has found an open bracket, but does no recognise the contents as a register reference. Badly formed value A label or number reference has been started with one of the following characters: ! " # $ % & ' ( ) * + , - . / : ; < = > ?