Commit Graph

31 Commits

Author SHA1 Message Date
Sasha Koshka 635aced0d4 Machine is now a generic type 2022-08-29 10:48:45 -04:00
Sasha Koshka 810ecdb3ac Added two examples showing the machine in action 2022-08-29 01:10:04 -04:00
Sasha Koshka b0b055d6ce Improved wording of readme 2022-08-29 00:56:27 -04:00
Sasha Koshka e45d153b80 Test and poke operation fixed 2022-08-29 00:43:13 -04:00
Sasha Koshka dba858307d Added documentation of all the opcodes in README 2022-08-28 23:24:43 -04:00
Sasha Koshka 975de37927 Added and passed jump instruction test 2022-08-28 22:45:46 -04:00
Sasha Koshka c77925a7e0 Added a halt instruction test 2022-08-28 21:33:26 -04:00
Sasha Koshka a78c1dfcf1 Created and passed peek/poke test 2022-08-28 21:11:06 -04:00
Sasha Koshka 302a4e5806 Renamed load and store to peek and poke 2022-08-28 20:20:04 -04:00
Sasha Koshka 0f1285bbb9 Added and passed comparison test 2022-08-28 20:13:55 -04:00
Sasha Koshka 884f00d048 The division test was wrong 2022-08-28 19:59:00 -04:00
Sasha Koshka 287d23fe36 Added all opcodes as constants 2022-08-28 18:34:23 -04:00
Sasha Koshka 045bd2ef6d Generalized tests 2022-08-28 18:29:10 -04:00
Sasha Koshka 21aaaede8e Fixed issue with pushing to stack 2022-08-28 18:26:44 -04:00
Sasha Koshka 850de8a2bf Fix out of bounds errors in Machine.Pop 2022-08-28 18:22:11 -04:00
Sasha Koshka b4bd86ad1d Added a division by zero error 2022-08-28 18:20:09 -04:00
Sasha Koshka dabd2df07c Added simple test case for arithmetic 2022-08-28 18:16:43 -04:00
Sasha Koshka a2b64fcc19 Machine.Execute returns an error on unknown instruction 2022-08-28 17:56:41 -04:00
Sasha Koshka 7b93b550e5 Actually halt machine when a function returns true 2022-08-28 17:53:36 -04:00
Sasha Koshka 07a783b6ba Ran gofmt 2022-08-28 17:52:39 -04:00
Sasha Koshka eb3f581b00 Added a function to load in a block of memory 2022-08-28 17:50:53 -04:00
Sasha Koshka 3b8f87212f Added method to unregister function 2022-08-28 17:36:45 -04:00
Sasha Koshka d48181b832 Add a Reset method to the machine 2022-08-28 17:35:30 -04:00
Sasha Koshka ebf58c9427 Implemented call instruction and function registering 2022-08-28 17:31:06 -04:00
Sasha Koshka 4067027588 Implemented mod, halt, and jump instructions 2022-08-28 17:11:43 -04:00
Sasha Koshka 589657e31b Implemented comparison instructions 2022-08-28 17:03:15 -04:00
Sasha Koshka a1ea9f30da Changed order of divide and subtract 2022-08-28 16:59:11 -04:00
Sasha Koshka efc263fe72 Implemented memory and arithmetic instructions 2022-08-28 16:56:28 -04:00
Sasha Koshka a098a30da0 Added peek and poke methods to read/write to block 2022-08-28 14:19:46 -04:00
Sasha Koshka 601636a0ad Implement instructions 0x0 and 0x1 2022-08-28 13:30:54 -04:00
Sasha Koshka f27ac7b560 Initial commit 2022-08-28 13:25:00 -04:00