-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm68k.h
93 lines (80 loc) · 1.75 KB
/
m68k.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* $Id: m68k.h,v 1.3 1996/07/17 16:01:36 grubba Exp $
*
* $Log: m68k.h,v $
* Revision 1.2 1996/07/11 15:41:58 grubba
* Now has a GUI!
* Some bug-fixes.
*
* Revision 1.1.1.1 1996/06/30 23:51:50 grubba
* Entry into CVS
*
* Revision 1.4 1996/06/19 11:08:25 grubba
* *** empty log message ***
*
* Revision 1.3 1996/06/01 09:31:29 grubba
* Major changes.
* Now generates output split into several files.
* Now generates gasp assembler preprocessor output.
* Now uses templates to build instructions.
*
* Revision 1.2 1996/05/12 16:45:12 grubba
* Added interrupt vectors.
* Added SR-bits.
*
* Revision 1.1 1996/05/06 14:50:54 grubba
* Initial revision
*
*/
#ifndef M68K_H
#define M68K_H
/*
* Includes
*/
#ifndef TYPES_H
#include "types.h"
#endif /* TYPES_H */
struct m_registers {
volatile U32 d0,d1,d2,d3,d4,d5,d6,d7,a0,a1,a2,a3,a4,a5,a6,a7;
volatile U32 usp,ssp,sr,pc;
volatile U32 vbr;
volatile U32 low, high;
};
#define M_A0 8
#define M_A7 15
#define M_USP 16
#define M_SSP 17
#define M_SR 18
#define M_PC 19
#define M_VBR 20
/* Status register bits */
#define M_SR_C 0x0001
#define M_SR_V 0x0002
#define M_SR_Z 0x0004
#define M_SR_N 0x0008
#define M_SR_X 0x0010
#define M_SR_I0 0x0100
#define M_SR_I1 0x0200
#define M_SR_I2 0x0400
#define M_SR_I 0x0700
#define M_SR_S 0x2000
#define M_SR_T 0x8000
/* Vectors */
#define VEC_RESET 1
#define VEC_BUS_ERROR 2
#define VEC_ADDR_ERROR 3
#define VEC_ILL_INSTR 4
#define VEC_DIV_ZERO 5
#define VEC_CHK 6
#define VEC_TRAPV 7
#define VEC_PRIV_VIOL 8
#define VEC_TRACE 9
#define VEC_LINE_A 10
#define VEC_LINE_F 11
#define VEC_COPRO_VIOL 13
#define VEC_FORMAT_ERR 14
#define VEC_UIV 15
#define VEC_SPURIOUS 24 /* IRQ 0 */
#define VEC_TRAP0 32
#define VEC_FPU 48
#endif /* M68K_H */