![](http://datasheet.mmic.net.cn/90000/MTA85801S-10I-SS_datasheet_3509091/MTA85801S-10I-SS_21.png)
1995 Microchip Technology Inc.
DS40115C-page 21
MTA85XXX
9.0
BASIC INSTRUCTION SET
SUMMARY
Each instruction is a 12-bit word divided into an
OPCODE which specifies the instruction type and one
or more operands which further specify the operation of
the instruction. The Instruction Set Summary in
Table 9-1 lists byte-oriented, bit-oriented, and literal
and control operations.
For byte-oriented instructions, 'f'
represents a file
register designator and 'd' represents a destination
designator. The file register designator specifies which
one of the file
registers is to be utilized by the
instruction.
The destination designator specifies where the result of
the operation is to be placed. If 'd' is '0', the result is
placed in the W register. If 'd' is '1', the result is placed
in the file register specified in the instruction.
For bit-oriented instructions, 'b' represents a bit field
designator which selects the number of the bit affected
by the operation, while 'f' represents the number of the
file in which the bit is located.
For literal and control operations, 'k' represents an
eight or nine bit constant or literal value.
All instructions
are
executed
within
one
single
instruction cycle, unless a conditional test is true or the
program counter is changed as a result of an
instruction. In this case, the execution takes two
instruction cycles. One instruction cycle consists of four
oscillator periods. Thus, for an oscillator frequency of
4 MHz, the normal instruction execution time is 1
s. If
a conditional test is true or the program counter is
changed as a result of an instruction, the instruction
execution time is 2
s.
Notes to Table 9-1
Note 1: The ninth bit of the program counter will be
forced to a '0' by any instruction that writes
to the PC except for GOTO (e.g., CALL,
MOVWF
PC,
...
etc.). See Section 5.6.3
for details.
Note 2: When an I/O register is modified as a func-
tion of itself (e.g., MOVF
PORTB,1
), the
value used will be that value present on the
pins themselves. For example, if the data
latch is '1' for a pin configured as output and
is driven low by an external device, the data
will be written back with a '0'.
Note 3: The instruction "TRIS f", where f = PORTA,
PORTB, or PORTC causes the contents of
the W register to be written to the three-
state latches of the specified file (port). A '1'
forces the pin to a hi impedance state and
disables the output buffers.
Note 4: If this instruction is executed on the T0CKI
register (and, where applicable, d = 1), the
prescaler will be cleared if assigned to the
T0CKI.