UPI-41AH/42AH
Table 2. UPI Instruction Set
Mnemonic Description Bytes Cycles
ACCUMULATOR
ADD A, Rr Add register to A 1 1
ADD A, @Rr Add data memory 1 1
to A
ADD A, Ýdata Add immediate to A 2 2
ADDC A, Rr Add register to A 1 1
with carry
ADDC A, @Rr Add data memory 1 1
to A with carry
ADDC A, Ýdata Add immediate 2 2
to A with carry
ANL A, Rr AND register to A 1 1
ANL, A @Rr AND data memory 1 1
to A
ANL A, Ýdata AND immediate to A 2 2
ORL A, Rr OR register to A 1 1
ORL, A, @Rr OR data memory 1 1
to A
ORL A, Ýdata OR immediate to A 2 2
XRL A, Rr Exclusive OR regis- 1 1
ter to A
XRL A, @Rr Exclusive OR data 1 1
memory to A
XRL A, Ýdata Exclusive OR imme- 2 2
diate to A
INC A Increment A 1 1
DEC A Decrement A 1 1
CLR A Clear A 1 1
CPL A Complement A 1 1
DA A Decimal Adjust A 1 1
SWAP A Swap nibbles of A 1 1
RL A Rotate A left 1 1
RLC A Rotate A left through 1 1
carry
RR A Rotate A right 1 1
RRC A Rotate A right 1 1
through carry
INPUT/OUTPUT
IN A, Pp Input port to A 1 2
OUTL Pp, A Output A to port 1 2
ANL Pp, Ýdata AND immediate to 2 2
port
ORL Pp, Ýdata OR immediate to 2 2
port
IN A, DBB Input DBB to A, 1 1
clear IBF
OUT DBB, A Output A to DBB, 1 1
set OBF
MOV STS, A A4–A7to Bits 4– 7 of 1 1
Status
MOVD A, Pp Input Expander 1 2
port to A
MOVD Pp, A Output A to 1 2
Expander port
ANLD Pp, A AND A to Expander 1 2
port
ORLD Pp, A OR A to Expander 1 2
port
Mnemonic Description Bytes Cycles
DATA MOVES
MOV A, Rr Move register to A 1 1
MOV A, @Rr Move data memory 1 1
to A
MOV A, Ýdata Move immediate to A 2 2
MOV Rr, A Move A to register 1 1
MOV @Rr, A Move A to data 1 1
memory
MOV Rr, Ýdata Move immediate to 2 2
register
MOV @Rr, Move immediate to 2 2
Ýdata data memory
MOV A, PSW Move PSW to A 1 1
MOV PSW, A Move A to PSW 1 1
XCH A, Rr Exchange A and 1 1
register
XCH A, @Rr Exchange A and 1 1
data memory
XCHD A, @Rr Exchange digit of A 1 1
and register
MOVP A, @A Move to A from 1 2
current page
MOVP3, A, @A Move to A from 1 2
page 3
TIMER/COUNTER
MOV A, T Read Timer/Counter 1 1
MOV T, A Load Timer/Counter 1 1
STRT T Start Timer 1 1
STRT CNT Start Counter 1 1
STOP TCNT Stop Timer/Counter 1 1
EN TCNTI Enable Timer/ 1 1
Counter Interrupt
DIS TCNTI Disable Timer/ 1 1
Counter Interrupt
CONTROL
EN DMA Enable DMA Hand- 1 1
shake Lines
EN I Enable IBF Interrupt 1 1
DIS I Diable IBF Inter- 1 1
rupt
EN FLAGS Enable Master 1 1
Interrupts
SEL RB0 Select register 1 1
bank 0
SEL RB1 Select register 1 1
bank 1
NOP No Operation 1 1
REGISTERS
INC Rr Increment register 1 1
INC @Rr Increment data 1 1
memory
DEC Rr Decrement register 1 1
19