Cingletree Learning Teaching Tools for the Connected Classroom

Decimal http://decimalcomputer.com

Instruction Set Each instruction word is composed of a one--digit operation code and a two-decimal-digit address. The left most digit is the operation code. The right two digits are the address.

Op. code Description 0 _ _ Input – Copy the current input card into cell number _ _ and advance to the next card. Halt execution if the input card is empty. 1 _ _ Output – Copy the contents of cell number _ _ to the current output card and advance to the next card. 2 _ _ Add – Add the contents of cell number _ _ to the value of the accumulator. Sets carry on overflow. 3 _ _ Subtract – Subtract the contents of cell number _ _ from the current value of the accumulator. Sets carry bit on overflow. 4 _ _ Load Accumulator – Clear the accumulator and carry bit, then copy the contents of cell number _ _ into the accumulator. 5 _ _ Store Accumulator – Copy the contents of the accumulator into cell number _ _. 6 _ _ Jump – Place the current value of the program counter into cell 99. Next, change the value of the program counter to _ _. 7 _ _ Test Accumulator – If the value of the accumulator is negative, change the value of the program counter to _ _. 8 x y Shift – Shift the accumulator left x digits, then shift the result right y digits. Shift digits through the Carry Bit and enter zeros from the left and right appropriately. 9 _ _ Halt – Replace the value of the program counter with cell number _ _ and then halt execution.

28202 Cabot Rd., Suite 300 www.cingletree.com [email protected] Laguna Niguel CA, 92677