English
Language : 

M38002M4 Datasheet, PDF (164/173 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPENDIX
3.9 Machine instructions
Symbol
Function
PHA
M(S) ← A
S←S–1
PHP
M(S) ← PS
S←S–1
PLA
S←S+1
A ← M(S)
PLP
S←S+1
PS ← M(S)
ROL
70
← ←C ←
ROR
70
C→ →
RRF
70
→→
Addressing mode
Details
IMP
IMM
A
BIT, A
ZP
BIT, ZP
OP n # OP n # OP n # OP n # OP n # OP n #
Saves the contents of the accumulator in 48 3 1
memory at the address indicated by the stack
pointer and decrements the contents of stack
pointer by 1.
Saves the contents of the processor status 08 3 1
register in memory at the address indicated by
the stack pointer and decrements the contents
of the stack pointer by 1.
Increments the contents of the stack pointer 68 4 1
by 1 and restores the accumulator from the
memory at the address indicated by the stack
pointer.
Increments the contents of stack pointer by 1 28 4 1
and restores the processor status register
from the memory at the address indicated by
the stack pointer.
Shifts the contents of the memory or accumu-
lator to the left by one bit. The high order bit is
shifted into the carry flag and the carry flag is
shifted into the low order bit.
2A 2 1
26 5 2
Shifts the contents of the memory or accumu-
lator to the right by one bit. The low order bit is
shifted into the carry flag and the carry flag is
shifted into the high order bit.
6A 2 1
66 5 2
Rotates the contents of memory to the right by
4 bits.
82 8 2
RTI
RTS
SBC
(Note 1)
(Note 5)
S←S+1
PS ← M(S)
S←S+1
PCL ← M(S)
S←S+1
PCH ← M(S)
S←S+1
PCL ← M(S)
S←S+1
PCH ← M(S)
When T = 0
A←A–M–C
When T = 1
M(X) ← M(X) – M – C
SEB
SEC
Ab or Mb ← 1
C←1
Returns from an interrupt routine to the main 40 6 1
routine.
Returns from a subroutine to the main routine. 60 6 1
Subtracts the contents of memory and
complement of carry flag from the contents of
accumulator. The results are stored into the
accumulator.
Subtracts contents of complement of carry flag
and contents of the memory indicated by the
addressing mode from the memory at the ad-
dress indicated by index register X. The
results are stored into the memory of the ad-
dress indicated by index register X.
E9 2 2
Sets the specified bit in the accumulator or
memory to “1”.
Sets the contents of the carry flag to “1”.
38 2 1
E5 3 2
0+B 2 1
2i
0+F 5 2
2i
SED
SEI
SET
D←1
I←1
T←1
Sets the contents of the decimal mode flag to F8 2 1
“1”.
Sets the contents of the interrupt disable flag 78 2 1
to “1”.
Sets the contents of the index X mode flag to 32 2 1
“1”.
3-62
3800 GROUP USER’S MANUAL