M6800_INLINE void aba(void);
M6800_INLINE void abx(void);
M6800_INLINE void adca_di(void);
M6800_INLINE void adca_ex(void);
M6800_INLINE void adca_im(void);
M6800_INLINE void adca_ix(void);
M6800_INLINE void adcb_di(void);
M6800_INLINE void adcb_ex(void);
M6800_INLINE void adcb_im(void);
M6800_INLINE void adcb_ix(void);
//M6800_INLINE void adcx_im(void);
M6800_INLINE void adda_di(void);
M6800_INLINE void adda_ex(void);
M6800_INLINE void adda_im(void);
M6800_INLINE void adda_ix(void);
M6800_INLINE void addb_di(void);
M6800_INLINE void addb_ex(void);
M6800_INLINE void addb_im(void);
M6800_INLINE void addb_ix(void);
M6800_INLINE void addd_di(void);
M6800_INLINE void addd_ex(void);
M6800_INLINE void addx_ex(void);
M6800_INLINE void addd_im(void);
M6800_INLINE void addd_ix(void);
M6800_INLINE void aim_di(void);
M6800_INLINE void aim_ix(void);
M6800_INLINE void anda_di(void);
M6800_INLINE void anda_ex(void);
M6800_INLINE void anda_im(void);
M6800_INLINE void anda_ix(void);
M6800_INLINE void andb_di(void);
M6800_INLINE void andb_ex(void);
M6800_INLINE void andb_im(void);
M6800_INLINE void andb_ix(void);
M6800_INLINE void asl_ex(void);
M6800_INLINE void asl_ix(void);
M6800_INLINE void asla(void);
M6800_INLINE void aslb(void);
M6800_INLINE void asld(void);
M6800_INLINE void asr_ex(void);
M6800_INLINE void asr_ix(void);
M6800_INLINE void asra(void);
M6800_INLINE void asrb(void);
M6800_INLINE void bcc(void);
M6800_INLINE void bcs(void);
M6800_INLINE void beq(void);
M6800_INLINE void bge(void);
M6800_INLINE void bgt(void);
M6800_INLINE void bhi(void);
M6800_INLINE void bita_di(void);
M6800_INLINE void bita_ex(void);
M6800_INLINE void bita_im(void);
M6800_INLINE void bita_ix(void);
M6800_INLINE void bitb_di(void);
M6800_INLINE void bitb_ex(void);
M6800_INLINE void bitb_im(void);
M6800_INLINE void bitb_ix(void);
M6800_INLINE void ble(void);
M6800_INLINE void bls(void);
M6800_INLINE void blt(void);
M6800_INLINE void bmi(void);
M6800_INLINE void bne(void);
M6800_INLINE void bpl(void);
M6800_INLINE void bra(void);
M6800_INLINE void brn(void);
M6800_INLINE void bsr(void);
M6800_INLINE void bvc(void);
M6800_INLINE void bvs(void);
M6800_INLINE void cba(void);
M6800_INLINE void clc(void);
M6800_INLINE void cli(void);
M6800_INLINE void clr_ex(void);
M6800_INLINE void clr_ix(void);
M6800_INLINE void clra(void);
M6800_INLINE void clrb(void);
M6800_INLINE void clv(void);
M6800_INLINE void cmpa_di(void);
M6800_INLINE void cmpa_ex(void);
M6800_INLINE void cmpa_im(void);
M6800_INLINE void cmpa_ix(void);
M6800_INLINE void cmpb_di(void);
M6800_INLINE void cmpb_ex(void);
M6800_INLINE void cmpb_im(void);
M6800_INLINE void cmpb_ix(void);
M6800_INLINE void cmpx_di(void);
M6800_INLINE void cmpx_ex(void);
M6800_INLINE void cmpx_im(void);
M6800_INLINE void cmpx_ix(void);
M6800_INLINE void com_ex(void);
M6800_INLINE void com_ix(void);
M6800_INLINE void coma(void);
M6800_INLINE void comb(void);
M6800_INLINE void daa(void);
M6800_INLINE void dec_ex(void);
M6800_INLINE void dec_ix(void);
M6800_INLINE void deca(void);
M6800_INLINE void decb(void);
M6800_INLINE void des(void);
M6800_INLINE void dex(void);
M6800_INLINE void eim_di(void);
M6800_INLINE void eim_ix(void);
M6800_INLINE void eora_di(void);
M6800_INLINE void eora_ex(void);
M6800_INLINE void eora_im(void);
M6800_INLINE void eora_ix(void);
M6800_INLINE void eorb_di(void);
M6800_INLINE void eorb_ex(void);
M6800_INLINE void eorb_im(void);
M6800_INLINE void eorb_ix(void);
//M6800_INLINE void illegal(void);
static void illegal(void);
M6800_INLINE void inc_ex(void);
M6800_INLINE void inc_ix(void);
M6800_INLINE void inca(void);
M6800_INLINE void incb(void);
M6800_INLINE void ins(void);
M6800_INLINE void inx(void);
M6800_INLINE void jmp_ex(void);
M6800_INLINE void jmp_ix(void);
M6800_INLINE void jsr_di(void);
M6800_INLINE void jsr_ex(void);
M6800_INLINE void jsr_ix(void);
M6800_INLINE void lda_di(void);
M6800_INLINE void lda_ex(void);
M6800_INLINE void lda_im(void);
M6800_INLINE void lda_ix(void);
M6800_INLINE void ldb_di(void);
M6800_INLINE void ldb_ex(void);
M6800_INLINE void ldb_im(void);
M6800_INLINE void ldb_ix(void);
M6800_INLINE void ldd_di(void);
M6800_INLINE void ldd_ex(void);
M6800_INLINE void ldd_im(void);
M6800_INLINE void ldd_ix(void);
M6800_INLINE void lds_di(void);
M6800_INLINE void lds_ex(void);
M6800_INLINE void lds_im(void);
M6800_INLINE void lds_ix(void);
M6800_INLINE void ldx_di(void);
M6800_INLINE void ldx_ex(void);
M6800_INLINE void ldx_im(void);
M6800_INLINE void ldx_ix(void);
M6800_INLINE void lsr_ex(void);
M6800_INLINE void lsr_ix(void);
M6800_INLINE void lsra(void);
M6800_INLINE void lsrb(void);
M6800_INLINE void lsrd(void);
M6800_INLINE void mul(void);
M6800_INLINE void neg_ex(void);
M6800_INLINE void neg_ix(void);
M6800_INLINE void nega(void);
M6800_INLINE void negb(void);
M6800_INLINE void nop(void);
M6800_INLINE void oim_di(void);
M6800_INLINE void oim_ix(void);
M6800_INLINE void ora_di(void);
M6800_INLINE void ora_ex(void);
M6800_INLINE void ora_im(void);
M6800_INLINE void ora_ix(void);
M6800_INLINE void orb_di(void);
M6800_INLINE void orb_ex(void);
M6800_INLINE void orb_im(void);
M6800_INLINE void orb_ix(void);
M6800_INLINE void psha(void);
M6800_INLINE void pshb(void);
M6800_INLINE void pshx(void);
M6800_INLINE void pula(void);
M6800_INLINE void pulb(void);
M6800_INLINE void pulx(void);
M6800_INLINE void rol_ex(void);
M6800_INLINE void rol_ix(void);
M6800_INLINE void rola(void);
M6800_INLINE void rolb(void);
M6800_INLINE void ror_ex(void);
M6800_INLINE void ror_ix(void);
M6800_INLINE void rora(void);
M6800_INLINE void rorb(void);
M6800_INLINE void rti(void);
M6800_INLINE void rts(void);
M6800_INLINE void sba(void);
M6800_INLINE void sbca_di(void);
M6800_INLINE void sbca_ex(void);
M6800_INLINE void sbca_im(void);
M6800_INLINE void sbca_ix(void);
M6800_INLINE void sbcb_di(void);
M6800_INLINE void sbcb_ex(void);
M6800_INLINE void sbcb_im(void);
M6800_INLINE void sbcb_ix(void);
M6800_INLINE void sec(void);
M6800_INLINE void sei(void);
M6800_INLINE void sev(void);
#if (HAS_HD63701)
M6800_INLINE void slp(void);
#endif
M6800_INLINE void sta_di(void);
M6800_INLINE void sta_ex(void);
M6800_INLINE void sta_im(void);
M6800_INLINE void sta_ix(void);
M6800_INLINE void stb_di(void);
M6800_INLINE void stb_ex(void);
M6800_INLINE void stb_im(void);
M6800_INLINE void stb_ix(void);
M6800_INLINE void std_di(void);
M6800_INLINE void std_ex(void);
M6800_INLINE void std_im(void);
M6800_INLINE void std_ix(void);
M6800_INLINE void sts_di(void);
M6800_INLINE void sts_ex(void);
M6800_INLINE void sts_im(void);
M6800_INLINE void sts_ix(void);
M6800_INLINE void stx_di(void);
M6800_INLINE void stx_ex(void);
M6800_INLINE void stx_im(void);
M6800_INLINE void stx_ix(void);
M6800_INLINE void suba_di(void);
M6800_INLINE void suba_ex(void);
M6800_INLINE void suba_im(void);
M6800_INLINE void suba_ix(void);
M6800_INLINE void subb_di(void);
M6800_INLINE void subb_ex(void);
M6800_INLINE void subb_im(void);
M6800_INLINE void subb_ix(void);
M6800_INLINE void subd_di(void);
M6800_INLINE void subd_ex(void);
M6800_INLINE void subd_im(void);
M6800_INLINE void subd_ix(void);
M6800_INLINE void swi(void);
M6800_INLINE void tab(void);
M6800_INLINE void tap(void);
M6800_INLINE void tba(void);
M6800_INLINE void tim_di(void);
M6800_INLINE void tim_ix(void);
M6800_INLINE void tpa(void);
M6800_INLINE void tst_ex(void);
M6800_INLINE void tst_ix(void);
M6800_INLINE void tsta(void);
M6800_INLINE void tstb(void);
M6800_INLINE void tsx(void);
M6800_INLINE void txs(void);
M6800_INLINE void undoc1(void);
M6800_INLINE void undoc2(void);
M6800_INLINE void wai(void);
M6800_INLINE void xgdx(void);

M6800_INLINE void cpx_di(void);
M6800_INLINE void cpx_ex(void);
M6800_INLINE void cpx_im(void);
M6800_INLINE void cpx_ix(void);
#if (HAS_HD63701)
//M6800_INLINE void trap(void);
static void trap(void);
#endif

static void (*m6800_insn[0x100])(void) = {
illegal,nop,	illegal,illegal,illegal,illegal,tap,	tpa,
inx,	dex,	clv,	sev,	clc,	sec,	cli,	sei,
sba,	cba,	illegal,illegal,illegal,illegal,tab,	tba,
illegal,daa,	illegal,aba,	illegal,illegal,illegal,illegal,
bra,	brn,	bhi,	bls,	bcc,	bcs,	bne,	beq,
bvc,	bvs,	bpl,	bmi,	bge,	blt,	bgt,	ble,
tsx,	ins,	pula,	pulb,	des,	txs,	psha,	pshb,
illegal,rts,	illegal,rti,	illegal,illegal,wai,	swi,
nega,	illegal,illegal,coma,	lsra,	illegal,rora,	asra,
asla,	rola,	deca,	illegal,inca,	tsta,	illegal,clra,
negb,	illegal,illegal,comb,	lsrb,	illegal,rorb,	asrb,
aslb,	rolb,	decb,	illegal,incb,	tstb,	illegal,clrb,
neg_ix, illegal,illegal,com_ix, lsr_ix, illegal,ror_ix, asr_ix,
asl_ix, rol_ix, dec_ix, illegal,inc_ix, tst_ix, jmp_ix, clr_ix,
neg_ex, illegal,illegal,com_ex, lsr_ex, illegal,ror_ex, asr_ex,
asl_ex, rol_ex, dec_ex, illegal,inc_ex, tst_ex, jmp_ex, clr_ex,
suba_im,cmpa_im,sbca_im,illegal,anda_im,bita_im,lda_im, sta_im,
eora_im,adca_im,ora_im, adda_im,cmpx_im,bsr,	lds_im, sts_im,
suba_di,cmpa_di,sbca_di,illegal,anda_di,bita_di,lda_di, sta_di,
eora_di,adca_di,ora_di, adda_di,cmpx_di,jsr_di, lds_di, sts_di,
suba_ix,cmpa_ix,sbca_ix,illegal,anda_ix,bita_ix,lda_ix, sta_ix,
eora_ix,adca_ix,ora_ix, adda_ix,cmpx_ix,jsr_ix, lds_ix, sts_ix,
suba_ex,cmpa_ex,sbca_ex,illegal,anda_ex,bita_ex,lda_ex, sta_ex,
eora_ex,adca_ex,ora_ex, adda_ex,cmpx_ex,jsr_ex, lds_ex, sts_ex,
subb_im,cmpb_im,sbcb_im,illegal,andb_im,bitb_im,ldb_im, stb_im,
eorb_im,adcb_im,orb_im, addb_im,illegal,illegal,ldx_im, stx_im,
subb_di,cmpb_di,sbcb_di,illegal,andb_di,bitb_di,ldb_di, stb_di,
eorb_di,adcb_di,orb_di, addb_di,illegal,illegal,ldx_di, stx_di,
subb_ix,cmpb_ix,sbcb_ix,illegal,andb_ix,bitb_ix,ldb_ix, stb_ix,
eorb_ix,adcb_ix,orb_ix, addb_ix,illegal,illegal,ldx_ix, stx_ix,
subb_ex,cmpb_ex,sbcb_ex,illegal,andb_ex,bitb_ex,ldb_ex, stb_ex,
eorb_ex,adcb_ex,orb_ex, addb_ex,illegal,illegal,ldx_ex, stx_ex
};

#if (HAS_M6801||HAS_M6803)
static void (*m6803_insn[0x100])(void) = {
illegal,nop,	illegal,illegal,lsrd,	asld,	tap,	tpa,
inx,	dex,	clv,	sev,	clc,	sec,	cli,	sei,
sba,	cba,	illegal,illegal,illegal,illegal,tab,	tba,
illegal,daa,	illegal,aba,	illegal,illegal,illegal,illegal,
bra,	brn,	bhi,	bls,	bcc,	bcs,	bne,	beq,
bvc,	bvs,	bpl,	bmi,	bge,	blt,	bgt,	ble,
tsx,	ins,	pula,	pulb,	des,	txs,	psha,	pshb,
pulx,	rts,	abx,	rti,	pshx,	mul,	wai,	swi,
nega,	illegal,illegal,coma,	lsra,	illegal,rora,	asra,
asla,	rola,	deca,	illegal,inca,	tsta,	illegal,clra,
negb,	illegal,illegal,comb,	lsrb,	illegal,rorb,	asrb,
aslb,	rolb,	decb,	illegal,incb,	tstb,	illegal,clrb,
neg_ix, illegal,illegal,com_ix, lsr_ix, illegal,ror_ix, asr_ix,
asl_ix, rol_ix, dec_ix, illegal,inc_ix, tst_ix, jmp_ix, clr_ix,
neg_ex, illegal,illegal,com_ex, lsr_ex, illegal,ror_ex, asr_ex,
asl_ex, rol_ex, dec_ex, illegal,inc_ex, tst_ex, jmp_ex, clr_ex,
suba_im,cmpa_im,sbca_im,subd_im,anda_im,bita_im,lda_im, sta_im,
eora_im,adca_im,ora_im, adda_im,cpx_im ,bsr,	lds_im, sts_im,
suba_di,cmpa_di,sbca_di,subd_di,anda_di,bita_di,lda_di, sta_di,
eora_di,adca_di,ora_di, adda_di,cpx_di ,jsr_di, lds_di, sts_di,
suba_ix,cmpa_ix,sbca_ix,subd_ix,anda_ix,bita_ix,lda_ix, sta_ix,
eora_ix,adca_ix,ora_ix, adda_ix,cpx_ix ,jsr_ix, lds_ix, sts_ix,
suba_ex,cmpa_ex,sbca_ex,subd_ex,anda_ex,bita_ex,lda_ex, sta_ex,
eora_ex,adca_ex,ora_ex, adda_ex,cpx_ex ,jsr_ex, lds_ex, sts_ex,
subb_im,cmpb_im,sbcb_im,addd_im,andb_im,bitb_im,ldb_im, stb_im,
eorb_im,adcb_im,orb_im, addb_im,ldd_im, std_im, ldx_im, stx_im,
subb_di,cmpb_di,sbcb_di,addd_di,andb_di,bitb_di,ldb_di, stb_di,
eorb_di,adcb_di,orb_di, addb_di,ldd_di, std_di, ldx_di, stx_di,
subb_ix,cmpb_ix,sbcb_ix,addd_ix,andb_ix,bitb_ix,ldb_ix, stb_ix,
eorb_ix,adcb_ix,orb_ix, addb_ix,ldd_ix, std_ix, ldx_ix, stx_ix,
subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex,
eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex
};
#endif

#if (HAS_HD63701)
static void (*hd63701_insn[0x100])(void) = {
trap	,nop,	trap	,trap	,lsrd,	asld,	tap,	tpa,
inx,	dex,	clv,	sev,	clc,	sec,	cli,	sei,
sba,	cba,	undoc1, undoc2, trap	,trap	,tab,	tba,
xgdx,	daa,	slp		,aba,	trap	,trap	,trap	,trap	,
bra,	brn,	bhi,	bls,	bcc,	bcs,	bne,	beq,
bvc,	bvs,	bpl,	bmi,	bge,	blt,	bgt,	ble,
tsx,	ins,	pula,	pulb,	des,	txs,	psha,	pshb,
pulx,	rts,	abx,	rti,	pshx,	mul,	wai,	swi,
nega,	trap	,trap	,coma,	lsra,	trap	,rora,	asra,
asla,	rola,	deca,	trap	,inca,	tsta,	trap	,clra,
negb,	trap	,trap	,comb,	lsrb,	trap	,rorb,	asrb,
aslb,	rolb,	decb,	trap	,incb,	tstb,	trap	,clrb,
neg_ix, aim_ix, oim_ix, com_ix, lsr_ix, eim_ix, ror_ix, asr_ix,
asl_ix, rol_ix, dec_ix, tim_ix, inc_ix, tst_ix, jmp_ix, clr_ix,
neg_ex, aim_di, oim_di, com_ex, lsr_ex, eim_di, ror_ex, asr_ex,
asl_ex, rol_ex, dec_ex, tim_di, inc_ex, tst_ex, jmp_ex, clr_ex,
suba_im,cmpa_im,sbca_im,subd_im,anda_im,bita_im,lda_im, sta_im,
eora_im,adca_im,ora_im, adda_im,cpx_im ,bsr,	lds_im, sts_im,
suba_di,cmpa_di,sbca_di,subd_di,anda_di,bita_di,lda_di, sta_di,
eora_di,adca_di,ora_di, adda_di,cpx_di ,jsr_di, lds_di, sts_di,
suba_ix,cmpa_ix,sbca_ix,subd_ix,anda_ix,bita_ix,lda_ix, sta_ix,
eora_ix,adca_ix,ora_ix, adda_ix,cpx_ix ,jsr_ix, lds_ix, sts_ix,
suba_ex,cmpa_ex,sbca_ex,subd_ex,anda_ex,bita_ex,lda_ex, sta_ex,
eora_ex,adca_ex,ora_ex, adda_ex,cpx_ex ,jsr_ex, lds_ex, sts_ex,
subb_im,cmpb_im,sbcb_im,addd_im,andb_im,bitb_im,ldb_im, stb_im,
eorb_im,adcb_im,orb_im, addb_im,ldd_im, std_im, ldx_im, stx_im,
subb_di,cmpb_di,sbcb_di,addd_di,andb_di,bitb_di,ldb_di, stb_di,
eorb_di,adcb_di,orb_di, addb_di,ldd_di, std_di, ldx_di, stx_di,
subb_ix,cmpb_ix,sbcb_ix,addd_ix,andb_ix,bitb_ix,ldb_ix, stb_ix,
eorb_ix,adcb_ix,orb_ix, addb_ix,ldd_ix, std_ix, ldx_ix, stx_ix,
subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex,
eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex
};
#endif

#if (HAS_NSC8105)
static void (*nsc8105_insn[0x100])(void) = {
illegal,illegal,nop,	illegal,illegal,tap,	illegal,tpa,
inx,	clv,	dex,	sev,	clc,	cli,	sec,	sei,
sba,	illegal,cba,	illegal,illegal,tab,	illegal,tba,
illegal,illegal,daa,	aba,	illegal,illegal,illegal,illegal,
bra,	bhi,	brn,	bls,	bcc,	bne,	bcs,	beq,
bvc,	bpl,	bvs,	bmi,	bge,	bgt,	blt,	ble,
tsx,	pula,	ins,	pulb,	des,	psha,	txs,	pshb,
illegal,illegal,rts,	rti,	illegal,wai,	illegal,swi,
suba_im,sbca_im,cmpa_im,illegal,anda_im,lda_im, bita_im,sta_im,
eora_im,ora_im, adca_im,adda_im,cmpx_im,lds_im, bsr,	sts_im,
suba_di,sbca_di,cmpa_di,illegal,anda_di,lda_di, bita_di,sta_di,
eora_di,ora_di, adca_di,adda_di,cmpx_di,lds_di, jsr_di, sts_di,
suba_ix,sbca_ix,cmpa_ix,illegal,anda_ix,lda_ix, bita_ix,sta_ix,
eora_ix,ora_ix, adca_ix,adda_ix,cmpx_ix,lds_ix, jsr_ix, sts_ix,
suba_ex,sbca_ex,cmpa_ex,illegal,anda_ex,lda_ex, bita_ex,sta_ex,
eora_ex,ora_ex, adca_ex,adda_ex,cmpx_ex,lds_ex, jsr_ex, sts_ex,
nega,	illegal,illegal,coma,	lsra,	rora,	illegal,asra,
asla,	deca,	rola,	illegal,inca,	illegal,tsta,	clra,
negb,	illegal,illegal,comb,	lsrb,	rorb,	illegal,asrb,
aslb,	decb,	rolb,	illegal,incb,	illegal,tstb,	clrb,
neg_ix, illegal,illegal,com_ix, lsr_ix, ror_ix,	illegal,asr_ix,
asl_ix, dec_ix, rol_ix, illegal,inc_ix, jmp_ix, tst_ix, clr_ix,
neg_ex, illegal,illegal,com_ex, lsr_ex, ror_ex,	illegal,asr_ex,
asl_ex, dec_ex, rol_ex, illegal,inc_ex, jmp_ex, tst_ex, clr_ex,
subb_im,sbcb_im,cmpb_im,illegal,andb_im,ldb_im, bitb_im,stb_im,
eorb_im,orb_im, adcb_im,addb_im,illegal,ldx_im, illegal,stx_im,
subb_di,sbcb_di,cmpb_di,illegal,andb_di,ldb_di, bitb_di,stb_di,
eorb_di,orb_di, adcb_di,addb_di,illegal,ldx_di, illegal,stx_di,
subb_ix,sbcb_ix,cmpb_ix,illegal,andb_ix,ldb_ix, bitb_ix,stb_ix,
eorb_ix,orb_ix, adcb_ix,addb_ix,adcx_im,ldx_ix, illegal,stx_ix,
subb_ex,sbcb_ex,cmpb_ex,illegal,andb_ex,ldb_ex, bitb_ex,stb_ex,
eorb_ex,orb_ex, adcb_ex,addb_ex,addx_ex,ldx_ex, illegal,stx_ex
};
#endif
