1
0
mirror of https://github.com/rzzzwilson/pymlac.git synced 2025-06-10 09:32:41 +00:00

Readying test_cpu

This commit is contained in:
Ross Wilson
2015-10-15 19:45:29 +07:00
parent 3bad73e242
commit b211efcb06
20 changed files with 957 additions and 19 deletions

30
vimlac/error.c Normal file
View File

@@ -0,0 +1,30 @@
/*
* Error routines for the imlac simulator.
*/
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
/******************************************************************************
Description : printf()-style trace routine.
Parameters : like printf()
Returns :
Comments :
******************************************************************************/
void
error(char *fmt, ...)
{
va_list ap;
char buff[1024];
va_start(ap, fmt);
vsprintf(buff, fmt, ap);
fprintf(stderr, "%s\n", buff);
va_end(ap);
exit(10);
}