;:ts=8
	far	code
	far	data
;//  TT8 specific includes
;#include        <TT8.h>                 /* Tattletale Model 8 Definitions */
;#include        <tat332.h>              /* 68332 Tattletale (7,8) Hardware Definitions */
;#include        <sim332.h>              /* 68332 System Integration Module Definitions */
;#include        <qsm332.h>              /* 68332 Queued Serial Module Definitions */
;#include        <tpu332.h>              /* 68332 Time Processing Unit Definitions */
;#include        <dio332.h>              /* 68332 Digital I/O Port Pin Definitions */
;#include        <tt8pic.h>              /* Model 8 PIC Parallel Slave Port Definitions */
;#include        <tt8lib.h>              /* definitions and prototypes for Model 8 library */
;
;//  general C includes
;#include        <stdio.h>
;#include        <stdlib.h>
;
;//  includes for the data logger
;#include		"assert.h"
;#include		"intexcpt.h"
;#include		"text_log.h"
	dseg
	ds	0
_LATEST_LOGGER_TIME:
	ds.b	0
	dc.l	$ffffffff
	dc.l	$0000
	cseg
	dseg
	ds	0
_EARLIEST_LOGGER_TIME:
	ds.b	0
	dc.l	$0000
	dc.l	$0000
	cseg
;
;
;//  structure used to track the state of the interrupt/exception handler
;struct int_excpt_control  {
;	short int_excpt_count[256];		//  counters for the number of times that a particular
;									//  interrupt or exception has occured since last reset
;	short state;					//  allows us to track what we are doing currently.  If
;									//  the exception catching routine causes another exception
;									//  then we should do a complete reset.
;} int_excpt_control;
;#define		NORMAL		0
;#define		PROCESSING	1
;
;const char* exception_names[] = {
	dseg
	ds	0
	xdef	_exception_names
_exception_names:
;	"Reset: Initial Stack Pointer",
	dc.l	.1+0
;	"Reset: Initial Program Counter",
	dc.l	.1+29
;	"Bus Error",
	dc.l	.1+60
;	"Address Error",
	dc.l	.1+70
;	"Illegal Instruction",
	dc.l	.1+84
;	"Zero Division",
	dc.l	.1+104
;	"CHK, CHK2 Instructions",
	dc.l	.1+118
;	"TRAPcc, TRAPV Instructions",
	dc.l	.1+141
;	"Privlege Violation",
	dc.l	.1+168
;	"Trace",
	dc.l	.1+187
;	"Line 1010 Emulator",
	dc.l	.1+193
;	"Line 1111 Emulator",
	dc.l	.1+212
;	"Hardware Breakpoint",
	dc.l	.1+231
;	"Coproc protocol violation",
	dc.l	.1+251
;	"Format Err and Uninited Int 1",
	dc.l	.1+277
;	"Format Err and Uninited Int 2"
;};	
	dc.l	.1+307
	cseg
.1
	dc.b	82,101,115,101,116,58,32,73,110,105,116,105,97,108,32
	dc.b	83,116,97,99,107,32,80,111,105,110,116,101,114,0,82
	dc.b	101,115,101,116,58,32,73,110,105,116,105,97,108,32,80
	dc.b	114,111,103,114,97,109,32,67,111,117,110,116,101,114,0
	dc.b	66,117,115,32,69,114,114,111,114,0,65,100,100,114,101
	dc.b	115,115,32,69,114,114,111,114,0,73,108,108,101,103,97
	dc.b	108,32,73,110,115,116,114,117,99,116,105,111,110,0,90
	dc.b	101,114,111,32,68,105,118,105,115,105,111,110,0,67,72
	dc.b	75,44,32,67,72,75,50,32,73,110,115,116,114,117,99
	dc.b	116,105,111,110,115,0,84,82,65,80,99,99,44,32,84
	dc.b	82,65,80,86,32,73,110,115,116,114,117,99,116,105,111
	dc.b	110,115,0,80,114,105,118,108,101,103,101,32,86,105,111
	dc.b	108,97,116,105,111,110,0,84,114,97,99,101,0,76,105
	dc.b	110,101,32,49,48,49,48,32,69,109,117,108,97,116,111
	dc.b	114,0,76,105,110,101,32,49,49,49,49,32,69,109,117
	dc.b	108,97,116,111,114,0,72,97,114,100,119,97,114,101,32
	dc.b	66,114,101,97,107,112,111,105,110,116,0,67,111,112,114
	dc.b	111,99,32,112,114,111,116,111,99,111,108,32,118,105,111
	dc.b	108,97,116,105,111,110,0,70,111,114,109,97,116,32,69
	dc.b	114,114,32,97,110,100,32,85,110,105,110,105,116,101,100
	dc.b	32,73,110,116,32,49,0,70,111,114,109,97,116,32,69
	dc.b	114,114,32,97,110,100,32,85,110,105,110,105,116,101,100
	dc.b	32,73,110,116,32,50,0
	ds	0
;const int n_exception_names = sizeof (exception_names)/sizeof (char*);
	ds	0
	xdef	_n_exception_names
_n_exception_names:
	dc.w	16
	cseg
;
;
;
;
;void unexpected_int_init (void)  {	
# 55 'intexcpt.c' 659074801
| .3
	xdef	_unexpected_int_init
_unexpected_int_init:
	movem.l	d2/d3/a3/a4,-(sp)
;	static ExcCFrame unexpected;
	bss	.10001,20
;	vfptr orig_handler, fpointer;
;	const short n_counters = sizeof(int_excpt_control.int_excpt_count)/sizeof(short);
;	short n;
;	
;	//  a count of -1 indicates that we are not setup to catch this particular
;	//  error
;	for (n = 0;  n < n_counters;  n++)
~ ''
~ 1 4 20
~ preamble 0 "[4I"
~ jump 8 "I"
~ target 10 "L"
~ postamble 14 "[3I"
~ unexpected .10001 ":" 1
~ orig_handler a3 "#(v"
~ fpointer a4 "#(v"
~ n_counters d3 "i"
~ n d2 "i"
	move.w	#256,d3
^^^^^^^^	move.l	#0,d2
	bra	.10005
.10004
;		int_excpt_control.int_excpt_count[n] = -1;
^	move.w	d2,d0
	ext.l	d0
	add.l	d0,d0
	lea	_int_excpt_control,a0
	move.w	#-1,(a0,d0.l)
.10002
	add.w	#1,d2
.10005
	cmp.w	d3,d2
	blt	.10004
.10003
;	int_excpt_control.state = NORMAL;
^	clr.w	_int_excpt_control+512
;		
;	orig_handler = InstallHandler (excpt_handler, 2, &unexpected);
^^	pea	.10001
	move.w	#2,-(sp)
	pea	_excpt_handler
	jsr	_InstallHandler
	move.l	d0,a3
;	for (n = 3;  n < 256;  n++)  {
^	move.l	#3,d2
	lea	10(sp),sp
	bra	.10009
.10008
;		//  don't interfer with the IRQ3 or 5 handler, which are already
;		//  used by the TT8.  IRQ 1 is tied to RxD, and can interrupt, but
;		//  is not used by the normal TT8 software.
;		//  03/05/98 WJR: Skip installation of unexpected handler 
;		//  03/05/98 WJR: for TPU interrupts
;		if ((n == 27) || (n == 29) || (n == 64))
^^^^^^;			continue;
	cmp.w	#27,d2
	beq	.10006
	cmp.w	#29,d2
	beq	.10006
	cmp.w	#64,d2
	beq	.10006
;	
;		fpointer = InstallHandler (excpt_handler, n, &unexpected);
^^^	pea	.10001
	move.w	d2,-(sp)
	pea	_excpt_handler
	jsr	_InstallHandler
	move.l	d0,a4
;		int_excpt_control.int_excpt_count[n] = 0;
^	move.w	d2,d0
	ext.l	d0
	add.l	d0,d0
	lea	_int_excpt_control,a0
	clr.w	(a0,d0.l)
;		
;		#ifdef DEBUG
;		//  verify that this vector wasn't already in use by someone else
;		if (fpointer != orig_handler)  {
;			printf ("vector %d not using normal handler.\n", n);
;			printf ("orig vector is 0x%08lX; %d is 0x%08lX\n",
;										orig_handler, n, fpointer);
;		}
;		#endif
;	}
^^^^^^^^^^	lea	10(sp),sp
.10006
	add.w	#1,d2
.10009
	cmp.w	#256,d2
	blt	.10008
.10007
;	return;
^.4
	movem.l	(sp)+,d2/d3/a3/a4
	rts
;}			
^.3
;
;
;	
;
;void excpt_handler (void)  {
# 95
| .5
	xdef	_excpt_handler
_excpt_handler:
;	//  Important: all variables should be static so they don't go on
;	//  the stack.  If they go on the stack they screw up our ability
;	//  to figure out where the Stack Frame starts.
;	static ExcStackFrame* Frame;
	bss	.10010,4
;	static char* cp;
	bss	.10011,4
;	static short offset, vector_num, frame_format;
	bss	.10012,2
	bss	.10013,2
	bss	.10014,2
;	static int n, m;
	bss	.10015,2
	bss	.10016,2
;	
;	//  must grab the stack pointer immediately, before the rest of
;	//  our code starts changing the stack pointer.
;	cp = (char*)GetStackPtr ();
~ ''
~ 2 4 24
~ eSR 0 "I"
~ ePC 2 "L"
~ vectofs 6 "I"
~ states 8 "[8I"
~ Frame .10010 "#:" 2
~ cp .10011 "#c"
~ offset .10012 "i"
~ vector_num .10013 "i"
~ frame_format .10014 "i"
~ n .10015 "i"
~ m .10016 "i"
^^^^^^^^^^^;			GetStackPtr
	dc.w	$200f
	move.l	d0,.10011
;	
;	//  if we were processing an unexpected interrupt or exception when this
;	//  one occurred, then do an immediate complete software reset
;	if (int_excpt_control.state != NORMAL)  {
^^^^	tst.w	_int_excpt_control+512
	beq	.10017
;		//  This will never return.  The stack, all of the current data, and
;		//  the current context are destroyed by this.  It does not, however,
;		//  issue a hardware reset
;		Reset ();
^^^^;			Reset
	dc.w	$13fc
	dc.w	$c0
	dc.w	$e0
	dc.w	$0
	dc.w	$4e70
;	}
^;	int_excpt_control.state = PROCESSING;
.10017
^	move.w	#1,_int_excpt_control+512
;		
;	
;	//  The startup code for the C version of this routine pushed some
;	//  additional data on the stack.  There are 8 long words for d0-d7,
;	//  7 for a0-a6, and one for the return address from the jsr that
;	//  got us to this C subroutine from the InstallHandler routine
;	Frame = (ExcStackFrame*)(cp + 16*4);
^^^^^^^	move.l	.10011,.10010
	add.l	#64,.10010
;
; 	//  Printing the message is screen is only useful if we are running
; 	//  on dry land in test mode, but it doesn't hurt anything, and it
; 	//  is important even if we aren't trying to debug.  The normal sequence
; 	//  of using log_printf is useless for certain exceptions which cause
; 	//  an immediate reset and which therefore do not allow the disk routines
; 	//  to be called.
; 	//  SJM  10/8/99
; 	log_printf ("IMPORTANT ERROR: UNEXPECTED INTERRUPT/EXCEPTION\n");
^^^^^^^^^	pea	.2+0
	jsr	_log_printf
; 	#ifndef DEBUG
; 	printf ("IMPORTANT ERROR: UNEXPECTED INTERRUPT/EXCEPTION\n");
^^	pea	.2+49
	jsr	_printf
; 	#endif
;	log_printf ("Int/Exception type: ");
^^	pea	.2+98
	jsr	_log_printf
;	#ifndef DEBUG
;	printf ("Int/Exception type: ");
^^	pea	.2+119
	jsr	_printf
;	#endif
;	offset = (Frame->vectofs & 0x0FFF);
^^	move.l	.10010,a0
	move.w	6(a0),d0
	and.w	#4095,d0
	move.w	d0,.10012
;	vector_num = offset / 4;
^	move.w	.10012,d0
	ext.l	d0
	divs.w	#4,d0
	move.w	d0,.10013
;	if (vector_num < n_exception_names)  {
^	move.w	.10013,d0
	cmp.w	_n_exception_names,d0
	lea	16(sp),sp
	bge	.10018
;		log_printf ("%s\n", exception_names[vector_num]);
^	move.w	.10013,d0
	ext.l	d0
	asl.l	#2,d0
	lea	_exception_names,a0
	move.l	(a0,d0.l),-(sp)
	pea	.2+140
	jsr	_log_printf
;		#ifndef DEBUG
;		printf ("%s\n", exception_names[vector_num]);
^^	move.w	.10013,d0
	ext.l	d0
	asl.l	#2,d0
	lea	_exception_names,a0
	move.l	(a0,d0.l),-(sp)
	pea	.2+144
	jsr	_printf
;		#endif
;	}  else  {
^^	lea	16(sp),sp
	bra	.10019
.10018
;		if (vector_num <= 23)  {
^	cmp.w	#23,.10013
	bgt	.10020
;			log_printf ("unassigned, reserved\n");
^	pea	.2+148
	jsr	_log_printf
;			#ifndef DEBUG
;			printf ("unassigned, reserved\n");
^^	pea	.2+170
	jsr	_printf
;			#endif
;		}  else  {
^^	add.w	#8,sp
	bra	.10021
.10020
;			if (vector_num == 24)  {
^	cmp.w	#24,.10013
	bne	.10022
;				log_printf ("Spurious Interrupt\n");
^	pea	.2+192
	jsr	_log_printf
;				#ifndef DEBUG
;				printf ("Spurious Interrupt\n");
^^	pea	.2+212
	jsr	_printf
;				#endif
;			}  else  {
^^	add.w	#8,sp
	bra	.10023
.10022
;				if (vector_num <= 31)  {
^	cmp.w	#31,.10013
	bgt	.10024
;					log_printf ("level %d interrupt autovector.\n", vector_num-24);
^	move.w	.10013,d0
	sub.w	#24,d0
	move.w	d0,-(sp)
	pea	.2+232
	jsr	_log_printf
;					#ifndef DEBUG
;					printf ("level %d interrupt autovector.\n", vector_num-24);
^^	move.w	.10013,d0
	sub.w	#24,d0
	move.w	d0,-(sp)
	pea	.2+264
	jsr	_printf
;					#endif
;				}  else  {
^^	lea	12(sp),sp
	bra	.10025
.10024
;					log_printf ("vector_num %d\n", vector_num);
^	move.w	.10013,-(sp)
	pea	.2+296
	jsr	_log_printf
;					#ifndef DEBUG
;					printf ("vector_num %d\n", vector_num);
^^	move.w	.10013,-(sp)
	pea	.2+311
	jsr	_printf
;					#endif
;				}
^^	lea	12(sp),sp
.10025
;			}
^.10023
;		}
^.10021
;	}
^.10019
;	
;	frame_format = ((Frame->vectofs & 0xF000) >> 12);
^^	move.l	.10010,a0
	move.w	6(a0),d0
	and.w	#61440,d0
	move.l	#12,d1
	lsr.w	d1,d0
	move.w	d0,.10014
;	log_printf ("  Status Register = 0x%04X\n", Frame->eSR);
^	move.l	.10010,a0
	move.w	(a0),-(sp)
	pea	.2+326
	jsr	_log_printf
;	switch (frame_format)  {
^	move.w	.10014,d0
	add.w	#6,sp
	bra	.10026
;		case 0:
^.10028
;			log_printf ("  Program Counter = 0x%08lX\n", Frame->ePC);
^	move.l	.10010,a0
	move.l	2(a0),-(sp)
	pea	.2+354
	jsr	_log_printf
;//			log_printf ("  Vector/Offset = 0x%04X\n", Frame->vectofs);
;			log_printf ("  Frame Format = 0x%04X\n", frame_format);
^^	move.w	.10014,-(sp)
	pea	.2+383
	jsr	_log_printf
;			log_printf ("  Vector Offset = 0x%04X\n", (Frame->vectofs&0x0FFF));
^	move.l	.10010,a0
	move.w	6(a0),d0
	and.w	#4095,d0
	move.w	d0,-(sp)
	pea	.2+408
	jsr	_log_printf
;			break;
^	lea	20(sp),sp
	bra	.10027
;			
;		case 2:
^^.10029
;			log_printf ("  Next Instruction PC = 0x%08lX\n", Frame->ePC);
^	move.l	.10010,a0
	move.l	2(a0),-(sp)
	pea	.2+434
	jsr	_log_printf
;//			log_printf ("  Vector/Offset = 0x%04X\n", Frame->vectofs);
;			log_printf ("  Frame Format = 0x%04X\n", frame_format);
^^	move.w	.10014,-(sp)
	pea	.2+467
	jsr	_log_printf
;			log_printf ("  Vector Offset = 0x%04X\n", (Frame->vectofs&0x0FFF));
^	move.l	.10010,a0
	move.w	6(a0),d0
	and.w	#4095,d0
	move.w	d0,-(sp)
	pea	.2+492
	jsr	_log_printf
;			log_printf ("  Faulted instruction PC = 0x%08lX\n",
^;										*((long*)&Frame->states[0]));	
	move.l	.10010,a0
	move.l	8(a0),-(sp)
	pea	.2+518
	jsr	_log_printf
;			for (n = 0;  n < 8;  n++)
^^	clr.w	.10015
	lea	28(sp),sp
.10032
;				log_printf ("  State[%d] = 0x%04X\n", n, Frame->states[n]);
^	move.w	.10015,d0
	ext.l	d0
	add.l	d0,d0
	move.l	.10010,a0
	move.w	8(a0,d0.l),-(sp)
	move.w	.10015,-(sp)
	pea	.2+554
	jsr	_log_printf
	add.w	#8,sp
.10030
	add.w	#1,.10015
	cmp.w	#8,.10015
	blt	.10032
.10031
;			break;
^	bra	.10027
;			
;		case 0xC:
^^.10033
;			log_printf ("  The bus-error stack frame has multiple formats.\n");
^	pea	.2+576
	jsr	_log_printf
;			log_printf ("  First PC = 0x%08lX\n", Frame->ePC);
^	move.l	.10010,a0
	move.l	2(a0),-(sp)
	pea	.2+627
	jsr	_log_printf
;//			log_printf ("  Vector/Offset = 0x%04X\n", Frame->vectofs);
;			log_printf ("  Frame Format = 0x%04X\n", frame_format);
^^	move.w	.10014,-(sp)
	pea	.2+649
	jsr	_log_printf
;			log_printf ("  Vector Offset = 0x%04X\n", (Frame->vectofs&0x0FFF));
^	move.l	.10010,a0
	move.w	6(a0),d0
	and.w	#4095,d0
	move.w	d0,-(sp)
	pea	.2+674
	jsr	_log_printf
;			log_printf ("  Faulted address = 0x%08lX\n",
^;										*((long*)&Frame->states[0]));	
	move.l	.10010,a0
	move.l	8(a0),-(sp)
	pea	.2+700
	jsr	_log_printf
;			for (n = 2;  n < 8;  n++)
^^	move.w	#2,.10015
	lea	32(sp),sp
.10036
;				log_printf ("  State[%d] = 0x%04X\n", n, Frame->states[n]);
^	move.w	.10015,d0
	ext.l	d0
	add.l	d0,d0
	move.l	.10010,a0
	move.w	8(a0,d0.l),-(sp)
	move.w	.10015,-(sp)
	pea	.2+729
	jsr	_log_printf
	add.w	#8,sp
.10034
	add.w	#1,.10015
	cmp.w	#8,.10015
	blt	.10036
.10035
;			break;
^	bra	.10027
;				
;		default:
^^.10037
;			log_printf ("  Program Counter = 0x%08lX\n", Frame->ePC);
^	move.l	.10010,a0
	move.l	2(a0),-(sp)
	pea	.2+751
	jsr	_log_printf
;//			log_printf ("  Vector/Offset = 0x%04X\n", Frame->vectofs);
;			log_printf ("  Frame Format = 0x%04X\n", frame_format);
^^	move.w	.10014,-(sp)
	pea	.2+780
	jsr	_log_printf
;			log_printf ("  Vector Offset = 0x%04X\n", (Frame->vectofs&0x0FFF));
^	move.l	.10010,a0
	move.w	6(a0),d0
	and.w	#4095,d0
	move.w	d0,-(sp)
	pea	.2+805
	jsr	_log_printf
;			for (n = 0;  n < 8;  n++)
^	clr.w	.10015
	lea	20(sp),sp
.10040
;				log_printf ("  State[%d] = 0x%04X\n", n, Frame->states[n]);
^	move.w	.10015,d0
	ext.l	d0
	add.l	d0,d0
	move.l	.10010,a0
	move.w	8(a0,d0.l),-(sp)
	move.w	.10015,-(sp)
	pea	.2+831
	jsr	_log_printf
	add.w	#8,sp
.10038
	add.w	#1,.10015
	cmp.w	#8,.10015
	blt	.10040
.10039
;			break;
^	bra	.10027
;	}			
^.10026
	tst.w	d0
	beq	.10028
	sub.w	#2,d0
	beq	.10029
	sub.w	#10,d0
	beq	.10033
	bra	.10037
.10027
;
;	/*
;	//  backup printout of data
;	for (n = 0;  n < 9;  n++)  {
;		printf ("%02X ", n);
;		for (m = 0;  m < 16;  m++)  {
;			if ((m%4) == 0)
;				printf (" ");
;			printf ("%02X ", (short)(cp[n*16 + m]&0xFF));
;		}	
;		printf ("\n");	
;	}
;	*/
;
;
;	//  Now implement code to decide what we should do about the unexpected interrupt.
;	//  The general rule is that if it has occured many times, perform a complete reset,
;	//  and if not, just ignore it.
;	int_excpt_control.int_excpt_count[vector_num]++;
^^^^^^^^^^^^^^^^^^^	move.w	.10013,d0
	ext.l	d0
	add.l	d0,d0
	lea	_int_excpt_control,a0
	add.w	#1,(a0,d0.l)
;	switch (vector_num)  {
^	move.w	.10013,d0
	bra	.10041
;		//  Since these can't happen, we should immediately do a complete
;		//  reset if they do
;		case 0:		//	Reset: Initial statck pointer (cannot happen)
^^^.10043
;		case 1:		//	Reset: Initial program counter (cannot happen)
^.10044
;		//  Both of these should already be caught by one of the TT8's
;		//  standard interrupt handlers.  If we get them, then there
;		//  is a serious problem, and we should do a complete reset
;		case 27:	//  Level 3 interrupt autovector
^^^^.10045
;		case 29:	//  Level 5 interrupt autovector
^.10046
;		//  These next two lines refer to illegal instructions, which
;		//  are usually used for software emulation of an unimplemented
;		//  instruction.  If they occur in our program, then they probably
;		//  indicate an unfortunate overwrite of our code.  The only hope
;		//  is that it is a seldom exercised sequence, and that an immediate
;		//  reset will limit the damage and allow us to continue logging.
;		case 10:	//	Line 1010 Emulator
^^^^^^^.10047
;		case 11:	//	Line 1111 Emulator
^.10048
;
;		//  we never recover from bus errors, so just reset
;		case 2:		//	Bus error
^^^.10049
;		//  illegal instruction can't happen unless major screw up, so rest
;		case 4:		//  Illegal instruction
^^.10050
;		//  zero division will give bad result, so reset
;		case 5:		//	Zero division
^^.10051
;			Reset ();
^;			Reset
	dc.w	$13fc
	dc.w	$c0
	dc.w	$e0
	dc.w	$0
	dc.w	$4e70
;			//  can never get here
;
;		default:
^^^.10052
;		case 3:		//  Address error
^.10053
;		case 6:		//  CHK, CHK2 instructions
^.10054
;		case 7:		//  TRAPcc, TRAPV Instructions
^.10055
;		case 8:		//	Privledge violation
^.10056
;		case 9:		//	Trace
^.10057
;		case 12:	//	Hardware Breakpoint
^.10058
;		case 13:	//	Coproc protocol violation
^.10059
;		case 14:	//	Format Err and Uninited Int 1
^.10060
;		case 15:	//	Format Err and Uninited Int 2
^.10061
;		case 25:	//  Level 1 interrupt autovector
^.10062
;			//  Allow a couple of these errors, even though we don't expect them,
;			//  (Cosmic Rays?) then do a complete reset
;			if (int_excpt_control.int_excpt_count[vector_num] > 10)
^^^;				Reset ();
	move.w	.10013,d0
	ext.l	d0
	add.l	d0,d0
	lea	_int_excpt_control,a0
	cmp.w	#10,(a0,d0.l)
	ble	.10063
^;			Reset
	dc.w	$13fc
	dc.w	$c0
	dc.w	$e0
	dc.w	$0
	dc.w	$4e70
;			break;	
.10063
^	bra	.10042
;	}
^.6
	dc.w	.10043-.7-2
	dc.w	.10044-.7-2
	dc.w	.10049-.7-2
	dc.w	.10053-.7-2
	dc.w	.10050-.7-2
	dc.w	.10051-.7-2
	dc.w	.10054-.7-2
	dc.w	.10055-.7-2
	dc.w	.10056-.7-2
	dc.w	.10057-.7-2
	dc.w	.10047-.7-2
	dc.w	.10048-.7-2
	dc.w	.10058-.7-2
	dc.w	.10059-.7-2
	dc.w	.10060-.7-2
	dc.w	.10061-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10052-.7-2
	dc.w	.10062-.7-2
	dc.w	.10052-.7-2
	dc.w	.10045-.7-2
	dc.w	.10052-.7-2
	dc.w	.10046-.7-2
.10041
	cmp.w	#30,d0
	bcc	.10052
	add.w	d0,d0
	move.w	.6(pc,d0.w),d0
.7
	jmp	(pc,d0.w)
.10042
;	int_excpt_control.state = NORMAL;
^	clr.w	_int_excpt_control+512
;}	
^.8
	rts
.5
.2
	dc.b	73,77,80,79,82,84,65,78,84,32,69,82,82,79,82
	dc.b	58,32,85,78,69,88,80,69,67,84,69,68,32,73,78
	dc.b	84,69,82,82,85,80,84,47,69,88,67,69,80,84,73
	dc.b	79,78,10,0,73,77,80,79,82,84,65,78,84,32,69
	dc.b	82,82,79,82,58,32,85,78,69,88,80,69,67,84,69
	dc.b	68,32,73,78,84,69,82,82,85,80,84,47,69,88,67
	dc.b	69,80,84,73,79,78,10,0,73,110,116,47,69,120,99
	dc.b	101,112,116,105,111,110,32,116,121,112,101,58,32,0,73
	dc.b	110,116,47,69,120,99,101,112,116,105,111,110,32,116,121
	dc.b	112,101,58,32,0,37,115,10,0,37,115,10,0,117,110
	dc.b	97,115,115,105,103,110,101,100,44,32,114,101,115,101,114
	dc.b	118,101,100,10,0,117,110,97,115,115,105,103,110,101,100
	dc.b	44,32,114,101,115,101,114,118,101,100,10,0,83,112,117
	dc.b	114,105,111,117,115,32,73,110,116,101,114,114,117,112,116
	dc.b	10,0,83,112,117,114,105,111,117,115,32,73,110,116,101
	dc.b	114,114,117,112,116,10,0,108,101,118,101,108,32,37,100
	dc.b	32,105,110,116,101,114,114,117,112,116,32,97,117,116,111
	dc.b	118,101,99,116,111,114,46,10,0,108,101,118,101,108,32
	dc.b	37,100,32,105,110,116,101,114,114,117,112,116,32,97,117
	dc.b	116,111,118,101,99,116,111,114,46,10,0,118,101,99,116
	dc.b	111,114,95,110,117,109,32,37,100,10,0,118,101,99,116
	dc.b	111,114,95,110,117,109,32,37,100,10,0,32,32,83,116
	dc.b	97,116,117,115,32,82,101,103,105,115,116,101,114,32,61
	dc.b	32,48,120,37,48,52,88,10,0,32,32,80,114,111,103
	dc.b	114,97,109,32,67,111,117,110,116,101,114,32,61,32,48
	dc.b	120,37,48,56,108,88,10,0,32,32,70,114,97,109,101
	dc.b	32,70,111,114,109,97,116,32,61,32,48,120,37,48,52
	dc.b	88,10,0,32,32,86,101,99,116,111,114,32,79,102,102
	dc.b	115,101,116,32,61,32,48,120,37,48,52,88,10,0,32
	dc.b	32,78,101,120,116,32,73,110,115,116,114,117,99,116,105
	dc.b	111,110,32,80,67,32,61,32,48,120,37,48,56,108,88
	dc.b	10,0,32,32,70,114,97,109,101,32,70,111,114,109,97
	dc.b	116,32,61,32,48,120,37,48,52,88,10,0,32,32,86
	dc.b	101,99,116,111,114,32,79,102,102,115,101,116,32,61,32
	dc.b	48,120,37,48,52,88,10,0,32,32,70,97,117,108,116
	dc.b	101,100,32,105,110,115,116,114,117,99,116,105,111,110,32
	dc.b	80,67,32,61,32,48,120,37,48,56,108,88,10,0,32
	dc.b	32,83,116,97,116,101,91,37,100,93,32,61,32,48,120
	dc.b	37,48,52,88,10,0,32,32,84,104,101,32,98,117,115
	dc.b	45,101,114,114,111,114,32,115,116,97,99,107,32,102,114
	dc.b	97,109,101,32,104,97,115,32,109,117,108,116,105,112,108
	dc.b	101,32,102,111,114,109,97,116,115,46,10,0,32,32,70
	dc.b	105,114,115,116,32,80,67,32,61,32,48,120,37,48,56
	dc.b	108,88,10,0,32,32,70,114,97,109,101,32,70,111,114
	dc.b	109,97,116,32,61,32,48,120,37,48,52,88,10,0,32
	dc.b	32,86,101,99,116,111,114,32,79,102,102,115,101,116,32
	dc.b	61,32,48,120,37,48,52,88,10,0,32,32,70,97,117
	dc.b	108,116,101,100,32,97,100,100,114,101,115,115,32,61,32
	dc.b	48,120,37,48,56,108,88,10,0,32,32,83,116,97,116
	dc.b	101,91,37,100,93,32,61,32,48,120,37,48,52,88,10
	dc.b	0,32,32,80,114,111,103,114,97,109,32,67,111,117,110
	dc.b	116,101,114,32,61,32,48,120,37,48,56,108,88,10,0
	dc.b	32,32,70,114,97,109,101,32,70,111,114,109,97,116,32
	dc.b	61,32,48,120,37,48,52,88,10,0,32,32,86,101,99
	dc.b	116,111,114,32,79,102,102,115,101,116,32,61,32,48,120
	dc.b	37,48,52,88,10,0,32,32,83,116,97,116,101,91,37
	dc.b	100,93,32,61,32,48,120,37,48,52,88,10,0
	ds	0
;
;
# 283
|
~ _n_exception_names * "i"
~ _exception_names * "[16#c"
~ 'int_excpt_control'
~ 3 2 514
~ int_excpt_count 0 "[256i"
~ state 512 "i"
~ _int_excpt_control * ":" 3
~ _log_printf * "(i"
~ 'text_log'
~ ''
~ 5 2 8
~ secs 0 "L"
~ ticks 4 "l"
~ 4 5 1068
~ filename 0 "[32c"
~ data 32 "[1024c"
~ n_data 1056 "i"
~ n_filled 1058 "i"
~ oldest_data 1060 ":" 5
~ EARLIEST_LOGGER_TIME _EARLIEST_LOGGER_TIME ":" 5
~ LATEST_LOGGER_TIME _LATEST_LOGGER_TIME ":" 5
~ _excpt_handler * "(v"
~ _unexpected_int_init * "(v"
~ ''
~ 6 2 8
~ quot 0 "l"
~ rem 4 "l"
~ ''
~ 7 2 4
~ quot 0 "i"
~ rem 2 "i"
~ ldiv_t ":" 6
~ div_t ":" 7
~ '__stdio'
~ 8 8 22
~ _bp 0 "#C"
~ _bend 4 "#C"
~ _buff 8 "#C"
~ _flags 12 "I"
~ _unit 14 "c"
~ _bytbuf 15 "C"
~ _buflen 16 "L"
~ _tmpnum 20 "I"
~ _printf * "(i"
~ FILE ":" 8
~ fpos_t "l"
~ va_list "#c"
~ ''
~ 9 13 46
~ libVersion 0 "l"
~ ramBase 4 "#c"
~ ramSize 8 "l"
~ ramWaits 12 "i"
~ flashBase 14 "#c"
~ flashSize 18 "l"
~ flashWaits 22 "i"
~ heapBot 24 "#v"
~ heapTop 28 "#v"
~ heapCur 32 "#v"
~ statusReg 36 "I"
~ vectorBase 38 "#v"
~ stackPtr 42 "#v"
~ infoAction "c"
~ TT8info ":" 9
~ UeeErr "c"
~ time_tt ":" 5
~ XmdmErr "c"
~ FlashErr "c"
~ _InstallHandler * "(#(v"
~ ExcCFramePtr "#:" 1
~ ExcCFrame ":" 1
~ ExcStackFrame ":" 2
~ 'tm'
~ 10 10 20
~ tm_sec 0 "i"
~ tm_min 2 "i"
~ tm_hour 4 "i"
~ tm_mday 6 "i"
~ tm_mon 8 "i"
~ tm_year 10 "i"
~ tm_wday 12 "i"
~ tm_yday 14 "i"
~ tm_isdst 16 "i"
~ tm_hsec 18 "i"
~ time_t "L"
~ clock_t "L"
~ wchar_t "c"
~ ptrdiff_t "l"
~ size_t "L"
~ PSPErr "c"
~ _PRAM "[8I"
~ bool "c"
~ vfptr "#(v"
~ ptr "#c"
~ ulpv "#L"
~ ulong "L"
~ uspv "#I"
~ unsint "I"
~ ushort "I"
~ ucpv "#C"
~ uchar "C"
	xref	_log_printf
	xref	_printf
	xref	_InstallHandler
	xref	.begin
	dseg
	global	_int_excpt_control,514
	end
