0x2C01 - Register commands

Index

Sub Index

Name

Data Type

Acc.

Pdo Map.

NVM

Value range

Function brief

0x2C01

0x01

Add constant to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM + constant

0x2C01

0x02

Accumulator divide constant

INT32

WO

No

No

INT32

[W2:ACCUM] = [W2:ACCUM] / constant

0x2C01

0x03

Xor constant to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM XOR constant

0x2C01

0x04

Accumulator multiply constant

INT32

WO

No

No

INT32

[W2:ACCUM ]= [W2:ACCUM] * constant

0x2C01

0x05

And constant to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM AND constant

0x2C01

0x06

Or constant to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM OR constant

0x2C01

0x07

Subtract constant from accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM - constant

0x2C01

0x08

Shift left accumulator by constant

INT32

WO

No

No

INT32

ACCUM = ACCUM << constant

0x2C01

0x09

Shift right accumulator by constant

INT32

WO

No

No

INT32

ACCUM = ACCUM >> constant

0x2C01

0x0A

Add register to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM + register

0x2C01

0x0B

Accumulator divide register

INT32

WO

No

No

INT32

[W2:ACCUM] = [W2:ACCUM] / register

0x2C01

0x0C

Xor register to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM XOR register

0x2C01

0x0D

Accumulator multiply register

INT32

WO

No

No

INT32

[W2:ACCUM] =[W2:ACCUM ]* register

0x2C01

0x0E

And register to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM AND register

0x2C01

0x0F

Or register to accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM OR register

0x2C01

0x10

Substract register from accumulator

INT32

WO

No

No

INT32

ACCUM = ACCUM - register

0x2C01

0x11

Shift left accumulator by register

INT32

WO

No

No

INT32

ACCUM = ACCUM << register

0x2C01

0x12

Shift right accumulator by register

INT32

WO

No

No

INT32

ACCUM = ACCUM >> register

0x2C01

0x13

Absolute accumulator

INT32

WO

No

No

INT32

ACCUM = |ACCUM |

0x2C01

0x14

Accumulator complement

INT32

WO

No

No

INT32

ACCUM = NOT(ACCUM )

0x2C01

0x15

Write accumulator to register

INT32

WO

No

No

INT32

register = ACCUM

0x2C01

0x16

Write register32 to accumulator

INT32

WO

No

No

INT32

ACCUM = register32

0x2C01

0x17

Write register16 to accumulator

INT32

WO

No

No

INT32

ACCUM = register16

This object provides access to a set of arithmetic operators that could be used with general purpose registers.

SubIndex description:

  • All arithmetic uses signed 32 bit values except multiplication and division that produce or use signed 64 bits values. A signed 64 bits value is stored in W2 and ACCUM (the upper 32 bits in W2 and the lower 32 bits in ACCUM)

  • Multiplication multiplies the 32 bits signed value in ACCUM by a signed 32 bits value (constant or register contents) with as result a 64 bits signed value in W2 and ACCUM.

  • Division divides the signed 64 bits value in W2 and ACCUM by a signed 32 bits value (constant or register contents) with as result a 64 bits signed value in W2 and ACCUM.

  • Logic operators (AND, OR, XOR, shift and complement) are bitwise operators.

  • Shift operations shift the contents of the accumulator in the indicated direction the given number of bits (constant of register contents). The new bits will be filled with zero.