ADD: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(+text from " ND-110 Instruction Set")
(Adopt to new format in template)
Line 2: Line 2:
|Mnemonic=ADD
|Mnemonic=ADD
|Description=Add to A register
|Description=Add to A register
|Format=ADD ''<address mode> <disp.>''
|Format=ADD ''<[[ND-100 addressing modes|addr. mode]]> <[[displacement|disp.]]>''
|Code=060&nbsp;000<sub><small>8</small></sub>
|Code=060&nbsp;000
|Affected=A:=A+(EL), C, O, Q
|Affected=A:=A+(ea), C, O, Q
|Arcitecture=[[ND-100]], [[ND-110 CPU|ND-110]]
|Arcitecture=[[ND-100]], [[ND-110 CPU|ND-110]]
}}
}}
Line 10: Line 10:
'''ADD''' is an instruction on the ND platform. It add the contents of the memory location pointed to by the [[effective address]] to the [[A register]], leaving the result in the A register.
'''ADD''' is an instruction on the ND platform. It add the contents of the memory location pointed to by the [[effective address]] to the [[A register]], leaving the result in the A register.


The [[carry indicator]] is set to 1 if a [[Wikipedia:Carry (arithmetic)|carry occurs]] from the sign bit positions of the adder, otherwise the carry indicator is reset to 0. If the signs of the two operands are equal, but the sign of the result is different, overflow has occurred, and both the [[dynamic overflow indicator]] and the [[static overflow indicator]] are set to one. If the condition for overflow does not exist, the dynamic overflow indicator is reset to 0, while the static overflow indicator is left unchanged.
== Flags affected ==
The [[carry indicator]] ('''C''') is set to 1 if a [[Wikipedia:Carry (arithmetic)|carry occurs]] from the sign bit positions of the adder, otherwise the carry indicator is reset to 0. If the signs of the two operands are equal, but the sign of the result is different, overflow has occurred, and both the [[dynamic overflow indicator]] ('''O''') and the [[static overflow indicator]] ('''Q''') are set to one. If the condition for overflow does not exist, the dynamic overflow indicator is reset to 0, while the static overflow indicator is left unchanged.





Revision as of 05:19, 4 April 2009

ADD
Description Add to A register
Format ADD <addr. mode> <disp.>
Code 060 0008
Affected A:=A+(ea), C, O, Q
Type User
Architecture {{{Architecture}}}

ADD is an instruction on the ND platform. It add the contents of the memory location pointed to by the effective address to the A register, leaving the result in the A register.

Flags affected

The carry indicator (C) is set to 1 if a carry occurs from the sign bit positions of the adder, otherwise the carry indicator is reset to 0. If the signs of the two operands are equal, but the sign of the result is different, overflow has occurred, and both the dynamic overflow indicator (O) and the static overflow indicator (Q) are set to one. If the condition for overflow does not exist, the dynamic overflow indicator is reset to 0, while the static overflow indicator is left unchanged.


References