Am2900Machine now has registers
[Mograsim.git] / plugins / net.mograsim.machine / src / net / mograsim / machine / mi / StandardMicroInstruction.java
1 package net.mograsim.machine.mi;
2
3 import net.mograsim.machine.mi.parameters.MicroInstructionParameter;
4
5 class StandardMicroInstruction implements MicroInstruction
6 {
7         private MicroInstructionParameter[] parameters;
8
9         StandardMicroInstruction(MicroInstructionParameter... parameters)
10         {
11                 this.parameters = parameters.clone();
12         }
13
14         /**
15          * @throws IndexOutOfBoundsException
16          */
17         @Override
18         public MicroInstructionParameter getParameter(int index)
19         {
20                 return parameters[index];
21         }
22
23         @Override
24         public int getSize()
25         {
26                 return parameters.length;
27         }
28
29         @Override
30         public MicroInstructionParameter[] getParameters()
31         {
32                 return parameters.clone();
33         }
34
35 }