summaryrefslogtreecommitdiff
path: root/Q1.core/Arch/IInstruction.cs
blob: 288993779161946485934b8affe27e15b57b797c (plain)
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
namespace Q1.core.Arch;

public interface IInstruction
{
    public string Name { get; }
}

public record struct ImplicitInstruction : IInstruction
{
    public string Name { get; set; }
    
    public Action<Chip, bool> Execute;
}

public record struct SimpleInstruction : IInstruction
{
    public string Name { get; set; }
    
    public Action<Chip, u8, bool> Execute;
}

public record struct ExtendedInstruction : IInstruction
{
    public string Name { get; set; }
    
    public Action<Chip, u8, u8, bool> Execute;
}

public record struct InstructionGroup
{
    public ImplicitInstruction Implicit;
    public SimpleInstruction SimpleAddressing;
    public ImplicitInstruction ExtendedImplicit;
    public ExtendedInstruction ExtendedAddressing;
}