Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

VM instruction implementation without huge switch()?

Name: Anonymous 2014-06-09 23:26

How would one go about making a virtual machine without using a huge and clumsy switch( opcode ) statement?

The architecture I'm implementing (DCPU-16) has about 35-40 different instructions.

Name: Cudder !cXCudderUE 2016-10-26 10:59

>>45
That is what those infected with the disease of ENTERPRISE will seriously say.

Just use a switch. 35-40 cases is not at all large for a switch. Many 8-bit emulators will have 256, and the VNVM I'm analysing at the moment has around 270.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List