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

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -