Commit Graph

27 Commits

Author SHA1 Message Date
Sasha Koshka a52e5d3426 Ran gofmt 2022-09-08 14:43:19 -04:00
Sasha Koshka b0068336cd Programs are now loaded with a function and not a member var 2022-09-08 14:41:50 -04:00
Sasha Koshka d7d5be6949 Reversed order of comparison and arithmetic operations 2022-08-29 20:15:46 -04:00
Sasha Koshka e342d9b254 Fixed poking segfault
Machine would segfault when poking address 0 on an uninitialized
block. this has been fixed.
2022-08-29 12:01:08 -04:00
Sasha Koshka 635aced0d4 Machine is now a generic type 2022-08-29 10:48:45 -04:00
Sasha Koshka e45d153b80 Test and poke operation fixed 2022-08-29 00:43:13 -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 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 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