Best substitute for GOTO in Python -
i want make risc-16 simulator in python, , instruction set requires jump (as do). now, number of program lines there 16 bits, that's 256 unique lines of instructions, , if/elif statement extremely stupid.
what best way able access code lines (i.e. jump)?
the instruction 1 line, well-defined op() function, how access specific code lines? alternately write code in txt file , turn string statement?
Comments
Post a Comment