INSTRUCTION SET

MOVO A,Pp Move Port 4-7 Data to Accumulator

10000111ppi

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.

(0-3)

(Pp)

p=4-7

(4-7)

0

 

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 1 0 Port

004

106

117

Example: INPPT5: MOVD A,P5 ;MOVE PORT 5 DATA TO ACC ;BITS 0-3, ZERO ACe BITS 4-7

MOVO Pp,A Move Accumulator Data to Port 4-7

10011111ppl

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.)

(Pp) ... (Ao-3)p=4-7

Example: Move data in accumulator to ports 4 and 5.

OUTP45: MOVD P4,A ;MOVE ACC BITS 0-3 TO PORT 4

SWAP A ;EXCHANGE ACC BITS 0-3 AND 4-7

MOVD P5,A ;MOVE ACC BITS 0-3 TO PORT 5

MOVP A,@A Move Current Page Data to Accumulator

11010100111

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

(PCO- 7) ..... (A)

(A) ..... ((PC»

Note: This is 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.

Mnemonics copyright Intel Corporation 1976.

4·25

Page 98
Image 98
Intel mcs-48 manual Movo A,Pp Move Port 4-7 Data to Accumulator, Movo Pp,A Move Accumulator Data to Port