25.04.2020 Views

1989_MELPS_7700_Software_Manual

Mitsubishi MELPS 7700 series microcomputer instruction set and addressing mode handbook

Mitsubishi MELPS 7700 series microcomputer instruction set and addressing mode handbook

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Instructions

4.1.2 Arithmetic Instructions

The arithmetic instructions perform addition, subtraction, multiplication, division, logical operation,

comparison, rotation and shifting of register and memory contents.

The following table summarizes the arithmetic instructions supported:

Category Instruction Description

Addition ADC Adds the contents of the accumulator,the contents of memory and

Subtraction

the contents of the carry flag.

Multiplication

SBC

Subtracts the complements of the contents of memory and carry

flag from the contents of the accumulator.

Division

INC Increments the accumulator or memory contents by 1.

DEC Decrements the accumulator or memory contents by 1.

INX Increments the contents of the index register X by 1.

DEX Decrements the contents of the index register X by 1.

INY Increments the contents of the index register Y by 1.

DEY Decrements the contents of the index register Y by 1.

MPY

DIV

Multiples the contents of the accumulator A and the contents of

memory.

Divides the numeric value whose lower byte is the contents of the

accumulator A and upper byte is the contents of the accumulator B

by the contents of memory.

Logical operation AND Performs logical AND between the contents of the accumu·

lator and the contents of memory.

ORA

EaR

Performs logical OR between the contents of the accumulator and

the contents of memory.

Performs logical exclusive-OR between the contents of the accumulator

and the contents of memory.

Comparison CMP Compares the contents of the accumulator with the contents of

memory.

CPX

CPY

Compares the contents of the index register X and the contents of

memory.

Compares the contents of the index register Y and the contents of

memory.

Shifting, Lotation ASL Shifts the contents of the accumulator or memory to the left by 1 bit.

LSR Shifts the contents of the accumulator or memory to the right by 1

bit.

ROL

ROR

RLA

Links the contents of accumulator or memory with the carry flag,

and rotates the result to the left by 1 bit.

Links the contents of accumulator or memory with the carry flag,

and rotates the result to the right by 1 bit.

Rotates the contents of the accumulator A to the left by the specified

number of bits.

54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!