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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SBe

Operation

Acc, C ~ Acc - M - C

Subtract with Carry

SBe

Description

Subtracts the contents of memory and the 1 's complements of carry flag from the

contents of the accumulator, and places the result in the accumulator. Executed

as a binary subtraction if the decimal operation mode flag 0 is set to O. Executed

as a decimal subtraction if the decimal operation mode flag 0 is set to 1.

Status flags

IPL:

N

v

m

x

o

Not affected.

Set to 1 when bit 15 (or bit 7 if the data length selection flag m is set to 1) of

the operation result is 1. Otherwise, cleared to O. Meaningless for decimal

subtraction.

Set to 1 when binary subtraction of signed data results in a value outside the

range of -32768 to +32767 (-128 to +127 if the data length selection flag m is set

to 1). Otherwise, cleared to O. Meaningless for decimal subtraction.

Not affected.

Not affected.

Not affected.

Not affected.

Z Set to 1 when the result of operation is O. Otherwise, cleared to O.

C Set to 1 when the result of operation is equal to or larger than O. Otherwise,

cleared to 0, and a borrow is indicated.

Addressing mode Syntax Machine code Bytes Cycles

Immediate SBC A, #imm E916, imm 2 2

Direct SBC A, dd E516, dd 2 4

Direct indexed X SBC A,dd, X F516, dd 2 5

Direct indirect SBC A, (dd) F216, dd 2 6

Direct indexed X indirect SBC A,(dd, X) E116, dd 2 7

Direct indirect indexed Y SBC A,(dd), Y F116, dd 2 8

Direct indirect long SBCL A, (dd) E716, dd 2 10

Direct indirect long indexed Y SBCL A, (dd), Y F716, dd 2 11

Absolute SBC A,mmll ED16,II,mm 3 4

Absolute indexed X SBe A, mmll, X FD16, II, mm 3 6

Absolute indexed Y SBe A, mmll, Y F916, II, mm 3 6

Absolute long SBe A, hhmmll EF16, II, mm, hh 4 6

Absolute long indexed X SBe A, hhmmll, X FF16, II, mm, hh 4 7

Stack pointer relative SBe A, nn, S E316, nn 2 5

Stack pointer relative SBC A, (nn, S), Y F316, nn 2 8

indirect indexed Y

(Note1) This table applies when using the accumulator A. If using the accumulator B, replace "A" with "B".

In this case, "4216" is added at the beginning of the machine code, the bytes-count increases by 1

and the cycles-count increases by 2.

(Note 2)When operating on 16-bit data in the immediate addressing mode with the data length selection flag

m set to 0, the bytes-count increases by 1.

133

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

Saved successfully!

Ooh no, something went wrong!