-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathAfterInstructionExecutionEventArgs.cs
41 lines (38 loc) · 1.96 KB
/
AfterInstructionExecutionEventArgs.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
namespace Konamiman.Z80dotNet
{
/// <summary>
/// Event args for the event triggered by the <see cref="IZ80Processor"/> class after an instruction is executed.
/// </summary>
public class AfterInstructionExecutionEventArgs : ProcessorEventArgs
{
/// <summary>
/// Initializes a new instance of the class.
/// </summary>
/// <param name="opcode">The opcode bytes of the instruction that has been executed.</param>
/// <param name="stopper">An instance of <see cref="IExecutionStopper"/> that can be used
/// by the event listener to request stop of the execution loop.</param>
/// <param name="localUserState">The state object from the matching <see cref="IZ80Processor.BeforeInstructionExecution"/> event.</param>
/// <param name="tStates">Total count of T states used for the instruction execution, including extra wait states</param>
public AfterInstructionExecutionEventArgs(byte[] opcode, IExecutionStopper stopper, object localUserState, int tStates)
{
this.Opcode = opcode;
this.ExecutionStopper = stopper;
this.LocalUserState = localUserState;
this.TotalTStates = tStates;
}
/// <summary>
/// Contains the full opcode bytes of the instruction that has been executed.
/// </summary>
public byte[] Opcode { get; set; }
/// <summary>
/// Contains the instance of <see cref="IExecutionStopper"/> that allows the event consumer
/// to ask termination of the processor execution.
/// </summary>
public IExecutionStopper ExecutionStopper { get; private set; }
/// <summary>
/// Contains the total count of T states required for the instruction execution, including
/// any extra wait states used for memory and ports access.
/// </summary>
public int TotalTStates { get; private set; }
}
}