view src/v09.h @ 86:4967d1acd34a

add sbc09.asm
author Shinji KONO <>
date Mon, 20 Aug 2018 00:48:11 +0900
parents 2088fd998865
line wrap: on
line source

/* v09.h
   This file is part of the 6809 simulator v09

   created 1994 by L.C. Benschop.
   copyleft (c) 1994-2014 by the sbc09 team, see AUTHORS for more details.
   license: GNU General Public License version 2, see LICENSE for more details.


#include <stdio.h>

typedef unsigned char Byte;
typedef unsigned short Word;

/* 6809 registers */
engine Byte ccreg,dpreg;
engine Word xreg,yreg,ureg,sreg,ureg,pcreg;

engine Byte d_reg[2];
extern Word *dreg;
extern Byte *breg,*areg;

engine long memsize;
engine long rommemsize;
engine Byte * mmu;
/* 6809 memory space */
#ifdef USE_MMU
engine Byte * phymem;
engine Byte * mem;
#ifdef MSDOS
 engine Byte * mem;
 engine Byte mem[65536];

engine volatile int tracing,attention,escape,irq;
engine int timerirq;
engine Word tracehi,tracelo;
engine char escchar;
engine int timer;
engine FILE *tracefile;

#ifndef IOPAGE
#define IOPAGE 0xe000

void interpr(void);
void do_exit(void);
int do_input(int);
void set_term(char);
void do_trace(FILE *);
void do_output(int,int);
void do_escape(void);