Try `match` statements for CPU
shish opened this issue · 0 comments
shish commented
Right now Python's CPU is somewhat non-standard -- while other languages use switch(opcode)
, python has a separate function for each instruction, and these functions are placed in a list so we can do ops[opcode]()
-- we should see if using the new match
statement works nicely