EasyManua.ls Logo

Intel 8080 - RLA

Intel 8080
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RAL
Chapter
3.
Instruction
Set
Stack Stack
Before
PUSH
Address
After
PUSH
SP
before
..
xx
9AAF
xx
xx
9AAE
2A
xx 9AAD
4C
...
SP
after
xx
9AAC xx
PUSH
PSW
PUSH
PSW
copies the Program Status Word
onto
the stack. The Program Status Word comprises the contents
of
the accumulator and the current settings
of
the condition flags. Because there are only five condition flags,
PUSH
PSW
formats the flags into an eight-bit byte
as
follows:
7 6
543
2 0
~S~_z~_o~I_AC_I_o~l_p~~I~c_Y~l
On the
8080,
bits 3 and 5 are always zero; bit one
is
always set to one. These filler bits are undefined on the
8085.
PUSH
PSW
decrements the stack pointer by one and copies the contents of the accumulator to the resulting
address.
PUSH
PSW
again decrements the pointer and copies the formatted condition flag byte
to
the resulting
address. The contents
of
the accumulator and the condition flags remain unchanged.
Cycles:
States:
Addressing:
Flags:
Example:
o
o
2J
3
11
(12 on 8085)
register indirect
none
When
a program calls subroutines, it
is
frequently necessary to preserve the current program status
so
the calling
program can continue normally when
it
regains control. Typically, the subroutine performs a
PUSH
PSW
prior
to
execution
of
any instruction
that
might alter the contents of the accumulator or the condition flag settings.
The subroutine then restores the pre-call system status
by
executing a
POP
PSW
instruction just before returning
control
to
the calling program.
ROTATE
LEFT
THROUGH
CARRY
RAL rotates the
contents
of
the accumulator and the carry
flag
one bit position to the left. The carry flag, which
is
treated
as
though
it
were part of the accumulator, transfers to the low-order bit of the accumulator. The high-
order bit
of
the accumulator transfers into the carry flag.
Opcode
Operand
RAL
Operands are not permitted with the
RAL
instruction.
345

Table of Contents

Related product manuals