diff --git a/src/sillymachine.adb b/src/sillymachine.adb index 30fc977..c49b106 100644 --- a/src/sillymachine.adb +++ b/src/sillymachine.adb @@ -2,6 +2,7 @@ with Ada.Text_IO; use Ada.Text_IO; with Ada.Sequential_IO; with Ada.Command_Line; use Ada.Command_Line; with Ada.Directories; +with Interfaces; use Interfaces; procedure sillymachine is type Byte is mod 256; @@ -102,10 +103,10 @@ begin Instruction (i) := MemoryArr (PC + i); end loop; - case Instruction (0) is -- execute the instruction + case Shift_Left(Unsigned_128(Instruction (0)), 8) + Unsigned_128(Instruction (1)) is -- execute the instruction when 0 => Put_Line("-- japko --"); when 1 => Put_Line("-- banan --"); - when 255 => goto THE_END; + when 65535 => goto THE_END; -- exit opcode when others => New_Line(1); end case;