#include <stdio.h>
#include <vrtxvisi.h>
#include <vrtxil.h>
#include <stdlib.h>
#include <errno.h>
#include <syskind.h>
#include <compiler.h> /* turns on M68K flag for 68K targets */
#include <mriext.h>
#include "68360.h"
#define HEAP_START 0x500000
int out_queue;
int group_id;
int _randx = 0x87654321; /* random seed */
char *mailbox_timer;
char *dis_box;
typedef struct timer_que{
struct timer_que *next;
int timeout;
int pid_tid;
}T_QUE;
T_QUE *timer_que_boot,*timer_que_current,*block;
int pid=1,hid;
unsigned long bsize=(sizeof(T_QUE));
typedef struct {
int person_id;
int person_state;
} PERSON;
PERSON person[10];
int rand_100(int i)
{
if(rand()%100<i)
return (1);
else return (0);
}
/*
* report error function
*
*/
void report(int err)
{
/* if you get an error, execute XRAY command UP to see from where */
asm(" illegal");
}
struct CPM_REGISTER *CpmRegister ;
struct SIM_REGISTER *SimRegister ;
struct RISC_Timer *r_timer ;
LONG GetMbar(void) ;
LONG GetVbr(void) ;
void Setup68360(void) ;
void setcmpvect(LONG lIntMask, BYTE lIntNum, void (* func)() ) ;
void risc_tm0(void) ;
void risc_tm0_body(void) ;
void task1(void) ;
void task3(void) ;
void master(void) ;
void task4(void) ;
/* timer ISR */
void risc_tm0(void)
{
asm(" XREF _v90k_interrupt_enter ");