· Addition is done by insert one number to the accumulator and then added it with another number by using ADD instruction.
· Memory
content are added with content of accumulator and result of addition will store
into accumulator.
· This
instruction have three (3) addressing mode which is immediate, direct and
extended.
· Arithmetic
operation will change value of flag N, Z, V, and C. By checking C bit in CCR after addition,
borrow value can be check. If borrow
value produce by before operation, so C flag will be set.
· 6800
is a 8-bit microprocessor, so it can handle only 255 maximum number. The bigger number can be handle by using more
than one byte memory. Value of two byte
can be store until 65,535 and three byte can be store until 16,777,215.
· Number
with multiple byte is store in side-by-side position.
· In
arithmetic multiple byte, the operation start at the lower byte and the carry
value will be used in the operation on the upper byte.
· The
operation of ADC (Add to accumulator with carry) instruction are same as ADD
instruction operation. The differences
are carry bit from lower byte operation are add to the current addition process
(or upper byte). This instruction have
three (3) addressing mode which is immediate, direct and extended.
· Subtraction
operation have been done by using SUB (subtract from accumulator) and SBC
(subtract from accumulator with carry).
SUB Instruction operation are not involve Carry flag. SBC instruction will subtract 1 from result
if C flag are set 1, if not their effect are same as SUB instruction operation.
· The
value in accumulator A can be added with value in accumulator B and their
result store at accumulator A by using ABA (Add ACCB to ACCA) instruction also
value in accumulator A can be subtract from accumulator B by using SBA
(subtract ACCB from ACCA) instruction.
· Another
arithmetic instruction are NEG (Negate), CLR (Clear), INC (Increment) and DEC
(Decrement). NEG instruction are using
for get the 2 complement’s operand. CLR
instruction are used to put zero value to the destination of the operand. INC instruction are used to added 1 to the
operand to get the address of the operation where else DEC instruction are used
to subtract 1 from the operand.
No comments:
Post a Comment