Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Data General Nova
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Arithmetic instructions==== All arithmetic instructions operated between accumulators. For operations requiring two operands, one was taken from the source accumulator, and one from the destination accumulator, and the result was deposited in the destination accumulator. For single-operand operations, the operand was taken from the source register and the result replaced the destination register. For all single-operand opcodes, it was permissible for the source and destination accumulators to be the same, and the operation functioned as expected. All arithmetic instructions included a "no-load" bit which, when set, suppressed the transfer of the result to the destination register; this was used in conjunction with the test options to perform a test without losing the existing contents of the destination register. In assembly language, adding a '#' to the opcode set the no-load bit. The CPU contained a single-bit register called the carry bit, which after an arithmetic operation would contain the carry out of the most significant bit. The carry bit could be set to a desired value prior to performing the operation using a two-bit field in the instruction. The bit could be set, cleared, or complemented prior to performing the instruction. In assembly language, these options were specified by adding a letter to the opcode: 'O' β set the carry bit; 'Z' β clear the carry bit, 'C' β complement the carry bit, nothing β leave the carry bit alone. If the no-load bit was also specified, the specified carry value would be used for the computation, but the actual carry register would remain unaltered. All arithmetic instructions included a two-bit field which could be used to specify a shift option, which would be applied to the result before it was loaded into the destination register. A single-bit left or right shift could be specified, or the two bytes of the result could be swapped. Shifts were 17-bit circular, with the carry bit "to the left" of the most significant bit. In other words, when a left shift was performed, the most significant bit of the result was shifted into the carry bit, and the previous contents of the carry bit were shifted into the least significant bit of the result. Byte swaps did not affect the carry bit. In assembly language, these options were specified by adding a letter to the opcode: 'L' β shift left; 'R' β shift right, 'S' β swap bytes; nothing β do not perform a shift or swap. All arithmetic instructions included a three-bit field that could specify a test which was to be applied to the result of the operation. If the test evaluated to true, the next instruction in line was skipped. In assembly language, the test option was specified as a third operand to the instruction. The available tests were: * {{mono|SZR}} β skip on zero result * {{mono|SNR}} β skip on nonzero result * {{mono|SZC}} β skip on zero carry * {{mono|SNC}} β skip on nonzero carry * {{mono|SBN}} β skip if both carry and result are nonzero * {{mono|SEZ}} β skip if either carry or result, or both, is zero * {{mono|SKP}} β always skip * Nothing β never skip The actual arithmetic instructions were: * {{mono|MOV}} β move the contents of the source accumulator to the destination accumulator * {{mono|COM}} β move the bitwise complement of the source accumulator to the destination accumulator * {{mono|ADD}} β add source accumulator to destination accumulator * {{mono|ADC}} β take the bitwise complement of the source accumulator and add it to the destination accumulator * {{mono|NEG}} β move the negative of the source accumulator to the destination accumulator * {{mono|SUB}} β subtract the contents source accumulator from the destination accumulator * {{mono|INC}} β add 1 to the contents of the source accumulator and move to the destination accumulator * {{mono|AND}} β perform the bitwise AND of the two accumulators and place the result in the destination accumulator An example arithmetic instructions, with all options utilized, is: {{sxhl|2=nasm|ADDZR# 0,2,SNC}} This decoded as: clear the carry bit; add the contents of AC2 (accumulator 2) to AC0; circularly shift the result one bit to the right; test the result to see if the carry bit is set and skip the next instruction if so. Discard the result after performing the test. In effect, this adds two numbers and tests to see if the result is odd or even.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)