diff options
Diffstat (limited to 'src/isa.adb')
-rw-r--r-- | src/isa.adb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/isa.adb b/src/isa.adb new file mode 100644 index 0000000..5941660 --- /dev/null +++ b/src/isa.adb @@ -0,0 +1,10 @@ +package body ISA is + function To_Byte (O : Opcode) return Byte + is (Byte (O.Value mod 256)); + + function X_Register (O : Opcode) return Register_Index + is (Register_Index (O.Value / 256)); + + function Y_Register (O : Opcode) return Register_Index + is (Register_Index (O.Value / 16 mod 16)); +end ISA; |