XXIIVV

CARDIAC Instruction Set

CARDIAC (CARDboard Illustrative Aid to Computation) is a learning aid developed for Bell Telephone Laboratories in 1968 to teach high school students how computers work. The computer operates in base 10 and has 100 memory cells which can hold signed numbers from 0 to 999. It has an instruction set of 10 instructions which allows CARDIAC to add, subtract, test, shift, input, output and jump.

OpcodeInstructionDescription
INPInputtake a number from the input card and put it in a specified memory cell.
CLAClear and addclear the accumulator and add the contents of a memory cell to the accumulator.
ADDAddadd the contents of a memory cell to the accumulator.
TACTest accumulator contentsperforms a sign test on the contents of the accumulator; if minus, jump to a specified memory cell.
SFTShiftshifts the accumulator x places left, then y places right, where x is the upper address digit and y is the lower.
OUTOutputtake a number from the specified memory cell and write it on the output card.
STOStorecopy the contents of the accumulator into a specified memory cell.
SUBSubtractsubtract the contents of a specified memory cell from the accumulator.
JMPJumpjump to a specified memory cell. The current cell number is written in cell 99. This allows for one level of subroutines by having the return be the instruction at cell 99 (which had '8' hardcoded as the first digit.
HRSHalt and resetmove bug to the specified cell, then stop program execution.