-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathIZ80ProcessorInterruptEvents.cs
52 lines (46 loc) · 2.07 KB
/
IZ80ProcessorInterruptEvents.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
namespace Konamiman.Z80dotNet
{
/// <summary>
/// Complements <see cref="IZ80Processor"/> by adding events related to interrupts servicing.
/// </summary>
public interface IZ80ProcessorInterruptEvents
{
/// <summary>
/// Triggered when a maskable interrupt is about to be serviced.
///
/// For IM 0: The opcode has been already fetched from the data bus and is about to be executed.
///
/// For IM 1: PC is already set to 0x0038 and the return address has been pushed to the stack.
///
/// For IM 2: PC is already set to the address of the routine to execute and the return address has been pushed to the stack.
/// </summary>
event EventHandler MaskableInterruptServicingStart;
/// <summary>
/// Triggered when a non-maskable interrupt is about to be serviced.
/// PC is already set to 0x0066 and the return address has been pushed to the stack
/// when this event is invoked.
/// </summary>
event EventHandler NonMaskableInterruptServicingStart;
/// <summary>
/// Triggered before a RETI instruction is about to be executed,
/// right after the corresponding BeforeInstructionExecution event
/// </summary>
event EventHandler BeforeRetiInstructionExecution;
/// <summary>
/// Triggered after a RETI instruction has been executed,
/// right after the corresponding AfterInstructionExecution event
/// </summary>
event EventHandler AfterRetiInstructionExecution;
/// <summary>
/// Triggered before a RETN instruction is about to be executed,
/// right after the corresponding BeforeInstructionExecution event
/// </summary>
event EventHandler BeforeRetnInstructionExecution;
/// <summary>
/// Triggered after a RETN instruction has been executed,
/// right after the corresponding AfterInstructionExecution event
/// </summary>
event EventHandler AfterRetnInstructionExecution;
}
}