beautypg.com

Bc/–bcl, Applicable program areas operands, Flags – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 211: 2 instructions, Operand specifications

background image

2-175

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

Sym

bol

Math I

n

stru

ctio

ns

2

–BC/–BCL

–BC/–BCL

Applicable Program Areas

Operands

Operand Specifications

Flags

Instruction

Mnemonic

Variations

Function

code

Function

BCD SUBTRACT WITH
CARRY

–BC

@–BC

416

Subtracts 4-digit (single-word) BCD data and/or
constants with the Carry Flag (CY).

DOUBLE BCD SUBTRACT
WITH CARRY

–BCL

@–BCL

417

Subtracts 8-digit (double-word) BCD data and/or
constants with the Carry Flag (CY).

Symbol

–BC

–BCL

Area

Step program areas

Subroutines

Interrupt tasks

Usage

OK

OK

OK

Operand

Description

Data type

Size

–BC

–BCL

–BC

–BCL

Mi

–BC: Minuend word

–BCL: First minuend word

WORD

DWORD

1

2

Su

–BC: Subtrahend word

–BCL: First subtrahend word

WORD

DWORD

1

2

R

–BC: Result word

–BCL: First result word

WORD

DWORD

1

2

Area

Word addresses

Indirect DM addresses

Constants

CF

Pulse bits

TR bits

CIO

WR

HR

AR

T

C

DM

@DM

*DM

Mi, Su

OK

OK

OK

OK

OK

OK

OK

OK

OK

OK

---

---

---

R

---

Name

Label

Operation

–BC

–BCL

Error Flag

P_ER

ON when Mi is not BCD.

ON when Su is not BCD.

OFF in all other cases.

ON when Mi and/or Mi +1 are not BCD.

ON when Su and/or Su +1 are not BCD.

OFF in all other cases.

Equals Flag

P_EQ

ON when the result is 0.

OFF in all other cases.

ON when the result is 0.

OFF in all other cases.

Carry Flag

P_CY

ON when the subtraction results in a borrow.

OFF in all other cases.

ON when the subtraction results in a borrow.

OFF in all other cases.

–BC(416)

R

Mi

Su

Mi: Minuend word

Su: Subtrahend word

R: Result word

–BCL(417)

R

Mi

Su

Mi: 1st minuend word

Su: 1st subtrahend word

R: 1st result word

This manual is related to the following products: