ack/util/int/switch.c
David Given 59b383afd0 Make the em interpreter build --- again, lots of warnings, so it probably won't
work on clang. I have no idea whether it runs or not as building a e.out
program is quite hard and needs a special platform.
2018-06-09 21:13:31 +09:00

30 lines
455 B
C

/*
The big switch on all the opcodes
*/
/* $Id$ */
#include <em_abs.h>
#include "global.h"
#include "opcode.h"
#include "text.h"
#include "trap.h"
#include "warn.h"
do_instr(opcode)
unsigned int opcode;
{
switch (opcode) {
#include "DoCases" /* for the muscle */
case SECONDARY:
do_instr(SEC_BASE + nextPCbyte());
break;
case TERTIARY:
do_instr(TERT_BASE + nextPCbyte());
break;
default:
wtrap(WBADOPC, EILLINS);
break;
}
}