ack/util/int/switch.c
George Koehler 777d0abb00 Add util/int/switch.h to declare do_instr() and Do???()
Use switch.h to reduce warnings from clang about implicit declarations
of functions.  I used `grep ... do_*.c | sed ... | sort`, and some
manual editing, to make the big list of Do???() functions.
2019-10-30 18:36:55 -04:00

30 lines
471 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"
#include "switch.h"
void do_instr(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;
}
}