IAI America SSEL User Manual
Page 149
127
Part 2 Programs
z INB (Read I/O, flag as BCD)
Command, declaration
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command,
declaration
Operand 1
Operand 2
Output
(Output, flag)
Optional Optional INB
I/O,
flag
BCD
digits CC
[Function]
Read the I/O ports or flags from the one specified in operand 1 for the number of digits
specified in operand 2, to variable 99 as a BCD.
15 14 13 12 11 10 9 8
Input port number
ON OFF OFF OFF
OFF
ON
OFF
ON
85
Variable 99
(Note 1)
A maximum of eight digits (32 bits) can be input.
(Note 2)
The number of I/O ports and flags that can be used is 4 x n (digits).
(Note 3)
The read data format can be changed using a FMIO command (refer to the section on FMIO
command).
[Example 1]
INB
8
2
Read input ports 8 through 15, to variable 99 as a
BCD.
[Example 2]
LET
1
8
Assign 8 to variable 1.
LET
2
2
Assign 2 to variable 2.
INB
*1
*2
Read the input ports from the content of variable 1
(input port 8) for the content of variable 2 (two digits)
(until input port 15), to variable 99 as a BCD.
Upper digit
Lower digit
8
5