mirror of
https://github.com/jscrane/r65emu.git
synced 2024-12-21 12:29:51 +00:00
27 lines
455 B
C
27 lines
455 B
C
|
/*
|
||
|
* cpu.h
|
||
|
*/
|
||
|
#ifndef _CPU_H
|
||
|
#define _CPU_H
|
||
|
|
||
|
#ifndef _SETJMP_H
|
||
|
#include <setjmp.h>
|
||
|
#endif
|
||
|
|
||
|
class CPU {
|
||
|
public:
|
||
|
virtual void reset () =0;
|
||
|
virtual Memory::address run (unsigned instructions) =0;
|
||
|
virtual void raise (int level) =0;
|
||
|
virtual char *status () =0;
|
||
|
|
||
|
typedef void (*statfn) (const char *, ...);
|
||
|
|
||
|
protected:
|
||
|
CPU (Memory *m, jmp_buf *e, statfn s): _memory(m), _err(e), _status(s){}
|
||
|
Memory *_memory;
|
||
|
jmp_buf *_err;
|
||
|
statfn _status;
|
||
|
};
|
||
|
#endif
|