Welcome to Nachtkriecher's Assembler for PDP-231!
Submit your assembly program below, and I will
assemble it for you.
here's a list of instructions that may be used:
WORD
"WORD" is used to declare variables that are to be put onto the
symbol table. example: "xsuby WORD 13"
no argument instructions
HALT - halts operation of program
"-s" - prints the current symbol table (this instruction is just for the assembler, it will not be interpreted into machine code)
"-m" - prints the machine code for the last instruction read (this instruction is also just for the assembler)
Labels are denoted by a word immediately followed by a colon.
one argument instructions
INSTR {LABEL}
BA - branch always
BNE - branch if not equal
BEQ - branch if equal
BGE - branch if greater than or equal
BLT - branch if less than
BGT - branch if greater than
BLE - branch if less than or equal
INSTR {destination} - two destination syntax's: "R0"-"R7" are local registers, and you can use variables declared with "WORD"
CLR - sets destination to zero
INC - increments destination
DEC - decrements destination
TST - sets NZ condition codes based on destination
two argument instructions:
INSTR {source} {destination} - three source syntax's: R0-R7, declared variables, or constants "#0", "9", "76"
MOV - copies value from source to destination
CMP - subtracts destination from source and sets condition codes
ADD - adds source to destination and stores in destination
SUB - subtracts source from destination and stores in destination
MUL - multiplies source and destination and stores in destination
DIV - divides source by destinatoin and stores in destination
it may also be noted that comments are allowed, denoted by a '/'
and continued until the end of the line.