BINDA

BINDA, BINDAP, DBINDA, DBINDAP

 

BINDA instruction converts a BIN 16bit value to a decimal (ASCII code) and saves the result in Destination (assigned device address).

  • DBINDA and DBINDAP are Double Word (32bit).

 

 

S

Source

D

Starting device address of the Destination

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

BINDA(P)

DBINDA(P)

S

o

o

o

o

o

o

o

o

-

o

o

o

o

3

o

-

-

D

o

-

o

o

o

-

o

o

-

o

o

o

-

 

BINDA(P)

The BINDA instruction converts 16bit BIN to a decimal ASCII code and places the result in the Destination.

 

  • The range of 16bit BIN data is -32768 ~ 32767.

  • If BIN data is +, sign is saved as 20H(space) and if BIN data is -, sign is saved as 2DH(-).

The 0 is saved as 20H(space).

 

  • The “0” is saved in D+3.

 

Example)

If the S value is -12345, its decimal ASCII code is saved in D~D+2.

 

 

DBINDA(P)

The DBINDA instruction converts 32bit BIN to a decimal ASCII code and places the result in the Destination.

 

  • The range of 32bit BIN data is -2147483648 ~ 2147483647.

  • If BIN data is +, sign is saved as 20H(space) and if BIN data is -, sign is saved as 2DH(-).

The 0 is saved as 20H(space).

 

  • The 0 is saved in higher bit of D+5.

Example)

If the S value is -12345678, its decimal ASCII code is saved in D~D+5.

 

 

Example)

If X01 is ON, BINDAP converts a BIN 16bit value of D0 to a decimal (ASCII code) and save the result in Y00.