![Epson S1C17 Series Manual Download Page 92](http://html.mh-extra.com/html/epson/s1c17-series/s1c17-series_manual_107781092.webp)
S1C17 CORE MANUAL
Seiko Epson Corporation
7-33
(Rev. 1.2)
ei
Function
Enable interrupts
Standard) psr(IE)
←
1
Extension 1) Unusable
Extension 2) Unusable
Code
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Flag
IL IE C V Z N
– 1 – – – –
|
|
|
| |
Mode
–
CLK
One cycle
Description
(1) Standard
Sets the IE bit in the PSR to enable external maskable interrupts.
(2) Delayed slot instruction
This instruction may be executed as a delayed slot instruction by writing it directly after a
branch instruction with the “d” bit.
Example
ei
; Enables external maskable interrupts.
Caution
Maskable interrupts are enabled from the third cycle after the
ei
instruction has been executed.
ei
Instruction 1
←
1-cycle instruction
Instruction 2
←
1-cycle instruction
Instruction 3
←
Interrupts are enabld from this instruction.
Example: Interrupt disabled periods using the
di
and
ei
instructions
ld %r2,%r3
←
Interrupt enabled
di
←
Interrupt enabled
ld.a %r0,%r1
←
Interrupt enabled
ld.b %r2,%r3
←
Interrupt enabled
ld %r4,%r5
←
Interrupt disabled
ei
←
Interrupt disabled
add %r4,%r5
←
Interrupt disabled
sub %r6,%r7
←
Interrupt disabled
cmp %r0,%r
1
←
Interrupt enabled