UPI-41A/41AH/42/42AH USER’S MANUAL
INC Rr
Increment Register
Opcode:
0 0 0 1
1 r
2
r
1
r
0
The contents of working register ‘r’ are incremented by one.
(Rr)
w
(Rr)
a
1
r
e
0 – 7
Example:
INCR0: INC R0
;INCREMENT ADDRESS REG 0
INC
@
Rr
Increment Data Memory Location
Opcode:
0 0 0 1
0 0 0 r
The contents of the resident data memory location addressed by register ‘r’ bits 0 – 7 are
incremented by one.
((Rr))
w
((Rr))
a
1
r
e
0 – 1
Example:
INCDM: MOV R1,
Ý
OFFH
;MOVE ONES TO REG 1
INC
@
R1
;INCREMENT LOCATION 63
JBb address
Jump If Accumulator Bit is Set
Opcode:
b
2
b
1
b
0
1
0 0 1 0
#
a
7
a
6
a
5
a
4
a
3
a
2
a
1
a
0
This is a 2-cycle instruction. Control passes to the specified address if accumulator bit ‘b’ is set
to one.
(PC
0–7
) addr
if b
e
1
(PC)
w
(PC)
a
2
if b
e
0
Example:
JB4IS1: JB4 NEXT
;JUMP TO ‘NEXT’ ROUTINE
;IF ACC BIT 4
e
1
JC address
Jump If Carry Is Set
Opcode:
1 1 1 1
0 1 1 0
#
a
7
a
6
a
5
a
4
a
3
a
2
a
1
a
0
This is a 2-cycle instruction. Control passes to the specified address if the carry bit is set to
one.
(PC
0–7
)
w
addr
if C
e
1
(PC)
w
(PC)
a
2
if C
e
0
Example:
JC1: JC OVERFLOW
;JUMP TO ‘OVFLOW’ ROUTINE
;IF C
e
1
JF0 address
Jump If Flag 0 is Set
Opcode:
1 0 1 1
0 1 1 0
#
a
7
a
6
a
5
a
4
a
3
a
2
a
1
a
0
This is a 2-cycle instruction. Control passes to the specified address if flag 0 is set to one.
(PC
0–7
)
w
addr
if F
0
e
1
Example:
JF0IS1: JF0 TOTAL
;JUMP TO ‘TOTAL’ ROUTINE
;IF F
0
e
1
38