megadrive_test1

diff src/misc.c @ 6:862f8a034cae

expanding the megadrive code
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 11 Feb 2017 08:56:42 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/misc.c	Sat Feb 11 08:56:42 2017 +0200
     1.3 @@ -0,0 +1,17 @@
     1.4 +#include <stdio.h>
     1.5 +#include <stdarg.h>
     1.6 +#include "misc.h"
     1.7 +
     1.8 +void panic(const char *fmt, ...)
     1.9 +{
    1.10 +	va_list ap;
    1.11 +
    1.12 +	printf("~~~~ panic ~~~~\n");
    1.13 +	va_start(ap, fmt);
    1.14 +	vprintf(fmt, ap);
    1.15 +	va_end(ap);
    1.16 +
    1.17 +	/*printf("registers:\n");*/
    1.18 +
    1.19 +	halt_cpu();
    1.20 +}