UPI-41A/41AH/42/42AH USER’S MANUAL
MOVP A,
@
A
Move Current Page Data to Accumulator
Opcode:
1 0 1 0
0 0 1 1
This is a 2-cycle instruction. The contents of the program memory location addressed by the
accumulator are moved to the accumulator. Only bits 0 – 7 of the program counter are affected,
limiting the program memory reference to the current page. The program counter is restored
following this operation.
(A)
w
((A))
Note:
This a 1-byte, 2-cycle instruction. If it appears in location 255 of a program memory page,
@
A
addresses a location in the following page.
Example:
MOV128: MOV A,
Ý
128
;MOVE ‘128’ DEC TO ACC
MOVP A,
@
A
;CONTENTS OF 129TH LOCATION
;IN CURRENT PAGE ARE MOVED TO
;ACC
MOVP3 A,
@
A
Move Page 3 Data to Accumulator
Opcode:
1 1 1 0
0 0 1 1
This is a 2-cycle instruction. The contents of the program memory location within page 3,
addressed by the accumulator, are moved to the accumulator. The program counter is restored
following this operation.
(A)
w
((A)) within page 3
Example:
Look up ASCII equivalent of hexadecimal code in table contained at the beginning of page 3.
Note that ASCII characters are designated by a 7-bit code; the eighth bit is always reset.
TABSCH: MOV A,
Ý
OB8H
;MOVE ‘B8’ HEX TO ACC (10111000)
ANL A,
Ý
7FH
;LOGICAL AND ACC TO MASK BIT
;7 (00111000)
MOVP3, A,
@
A
;MOVE CONTENTS OF LOCATION
;‘38’ HEX IN PAGE 3 TO ACC
;(ASCII ‘8’)
Access contents of location in page 3 labelled TAB1. Assume current program location is not
in page 3.
TABSCH: MOV A,
Ý
TAB1
;ISOLATE BITS 0 – 7
;OF LABEL
;ADDRESS VALUE
MOVP3 A,
@
A
;MOVE CONTENT OF PAGE 3
;LOCATION LABELED ‘TAB1’
;TO ACC
NOP
The NOP Instruction
Opcode:
0 0 0 0
0 0 0 0
No operation is performed. Execution continues with the following instruction.
ORL A,Rr
Logical OR Accumulator With Register Mask
Opcode:
0 1 0 0
1 r
2
r
1
r
0
Data in the accumulator is logically ORed with the mask contained in working register ‘r’.
(A)
w
(A) OR (Rr)
r
e
0 – 7
Example:
ORREG: ORL A,R4
;‘OR’ ACC CONTENTS WITH
;MASK IN REG 4
45