A-1-10 Conversion Instructions - Omron CJ2 - 02-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

Instruction
Mnemonic
DOUBLE
/UL
433
UNSIGNED
@/UL
BINARY
DIVIDE
BCD DIVIDE
/B
434
@/B
DOUBLE BCD
/BL
435
DIVIDE
@/BL
A-1-10
Conversion Instructions
Instruction
Mnemonic
Code
BCD-TO-
BIN
023
BINARY
@BIN
DOUBLE BCD-
BINL
058
TO-DOUBLE
@BINL
BINARY
BINARY-TO-
BCD
024
BCD
@BCD
DOUBLE
BCDL
059
BINARY-TO-
@BCDL
DOUBLE BCD
CJ2 CPU Unit Software User's Manual
Code
Symbol/Operand
Divides 8-digit (double-word) unsigned hexadecimal data
/UL(433)
and/or constants.
Dd
Dr
R
Dd: 1st dividend
word
R + 3
Dr: 1st divisor
word
R: 1st result word
Divides 4-digit (single-word) BCD data and/or constants.
/B(434)
Dd
Dr
R
Dd: Dividend
word
Remainder
Dr: Divisor word
R: Result word
Divides 8-digit (double-word) BCD data and/or constants.
/BL(435)
Dd
Dr
R
Dd: 1st dividend
R + 3
word
Dr: 1st divisor
word
R: 1st result word
Symbol/Operand
Converts BCD data to binary data.
BIN(023)
S
R
S: Source word
R: Result word
Converts 8-digit BCD data to 8-digit hexadecimal
BINL(058)
(32-bit binary) data.
S
R
S: 1st source word
R: 1st result word
Converts a word of binary data to a word of
BCD(024)
BCD data.
S
R
S: Source word
R: Result word
Converts 8-digit hexadecimal (32-bit binary) data to
BCDL(059)
8-digit BCD data.
S
R
S: 1st source word
R: 1st result word
Function
Dd
Dd + 1
÷
Dr + 1
Dr
R + 2
R + 1
R
Remainder
Quotient
(BCD)
Dd
÷
(BCD)
Dr
(BCD)
R +1
R
Quotient
Dd + 1
Dd
÷
Dr + 1
Dr
R + 2
R + 1
R
Remainder
Quotient
Function
(BCD)
R
(BIN)
(BCD)
R
R+1
(BCD)
(BIN)
(BCD)
R
(BIN)
R
(BIN)
R+1
Appendices
Location
Output
(Unsigned binary)
(Unsigned binary)
(Unsigned binary)
Output
Output
(BCD)
(BCD)
(BCD)
Location
Output
Output
(BIN)
(BIN)
Output
Output
(BCD)
(BCD)
Execution
condition
Required
Required
Required
Execution
condition
Required
Required
Required
Required
A-29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents