added instruction functionality
This commit is contained in:
parent
483a16c194
commit
d4754a048d
9 changed files with 754 additions and 170 deletions
|
|
@ -1,11 +1,17 @@
|
|||
#ifndef INSTRUCTIONS_H
|
||||
#define INSTRUCTIONS_H
|
||||
|
||||
#include "opcode.h"
|
||||
#include "utils.h"
|
||||
|
||||
class Machine; // forward declaration
|
||||
|
||||
|
||||
|
||||
|
||||
// Type 2 instruction handlers
|
||||
void addr_handler(Machine& m, int r1, int r2);
|
||||
void clear_handler(Machine& m, int r, int unused);
|
||||
void compr_handler(Machine& m, int r1, int r2);
|
||||
void divr_handler(Machine& m, int r1, int r2);
|
||||
void mulr_handler(Machine& m, int r1, int r2);
|
||||
void rmo_handler(Machine& m, int r1, int r2);
|
||||
|
|
@ -16,5 +22,49 @@ void svc_handler(Machine& m, int n, int unused);
|
|||
void tixr_handler(Machine& m, int r1, int unused);
|
||||
|
||||
|
||||
// Type 3/4 instruction handlers
|
||||
void add_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void addf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void and_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void comp_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void compf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void div_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void divf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void j_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void jeq_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void jgt_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void jlt_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void jsub_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void lda_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ldb_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ldch_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ldf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ldl_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void lds_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ldt_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ldx_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void lps_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void mul_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void mulf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void or_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void rd_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void rsub_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void ssk_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void sta_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stb_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stch_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void sti_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stl_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void sts_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stsw_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stt_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void stx_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void sub_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void subf_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void td_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void tix_handler(Machine& m, int ea, AddressingMode mode);
|
||||
void wd_handler(Machine& m, int ea, AddressingMode mode);
|
||||
|
||||
|
||||
#endif // INSTRUCTIONS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue