Intel UPI- 41A User Manual page 48

Microprocessor peripherals
Table of Contents

Advertisement

UPI-41A 41AH 42 42AH USER'S MANUAL
MOV STS A Move Accumulator Contents to STS Register
Opcode
1 0 0 1
The contents of the accumulator are moved into the status register Only bits 4 – 7 are affected
(STS
4–7
Example
Set ST
4
MSTS MOV A
MOV T A Move Accumulator Contents to Timer Counter
Opcode
0 1 1 0
The contents of the accumulator are moved to the timer event-counter register
w
(T)
Example
Initialize and start event counter
INITEC CLR A
MOVD A Pp Move Port 4 – 7 Data to Accumulator
Opcode
0 0 0 0
This is a 2-cycle instruction Data on 8243 port 'p' is moved (read) to accumulator bits 0 – 3
Accumulator bits 4 – 7 are zeroed
(A
)
0–3
(A
)
4–7
Note
Bits 0 – 1 of the opcode are used to represent PORTS 4 – 7 If you are coding in binary rather
than assembly language the mapping is as follows
Bits
p
1
0
0
1
1
Example
INPPT5 MOVD A P5
MOVD Pp A Move Accumulator Data to Port 4 5 6 and 7
0 0 1 1
Opcode
This is a 2-cycle instruction Data in accumulator bits 0 – 3 is moved (written) to 8243 port 'p'
Accumulator bits 4 – 7 are unaffected (See NOTE above regarding port mapping )
Example
Move data in accumulator to ports 4 and 5
OUTP45 MOVD P4 A
44
0 0 0 0
w
)
(A
)
4–7
– ST
to ''1''
7
0F0H
MOV STS A
0 0 1 0
(A)
MOV T A
STRT CNT
1 1 p
p
1
0
w
Pp
w
0
Port
p
0
0
4
1
5
0
6
1
7
1 1 p
p
1
0
SWAP A
MOVD P5 A
SET ACC
MOVE TO STS
CLEAR ACC TO ZEROS
MOVE ZEROS TO EVENT COUNTER
START COUNTER
p
4–7
e
MOVE PORT 5 DATA TO ACC
BITS 0 – 3 ZERO ACC BITS 4 – 7
MOVE ACC BITS 0 – 3 TO PORT 4
EXCHANGE ACC BITS 0 – 3 AND 4 – 7
MOVE ACC BITS 0 – 3 TO PORT 5

Advertisement

Table of Contents
loading

Table of Contents