blob: 1fc4bdc3a469760b1385dadd775b9ce8b022b04c (
plain)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
(******************************************************************************
*
* Copyright (c) 1995-2000 Palm, Inc. or its subsidiaries.
* All rights reserved.
*
* File: M68KHwr.h
*
* Release: Palm OS SDK 4.0 (63220)
*
* Description:
* Pilot debugger remote hardware/system info
*
* History:
* 1/18/95 RM - Created by Ron Marianetti
*
*****************************************************************************)
unit m68khwr;
interface
uses palmos;
(***********************************************************************
* Breakpoint words we use
***********************************************************************)
const
m68kTrapInstr = $4E40;
m68kTrapVectorMask = $000F;
(***********************************************************************
* 68000 Exception Vector table
***********************************************************************)
type
M68KExcTableType = record
initStack: UInt32; // initial stack pointer
initPC: UInt32; // initial PC
busErr: UInt32; // 08
addressErr: UInt32; // 0C
illegalInstr: UInt32; // 10
divideByZero: UInt32; // 14
chk: UInt32; // 18
trap: UInt32; // 1C
privilege: UInt32; // 20
trace: UInt32; // 24
aTrap: UInt32; // 28
fTrap: UInt32; // 2C
reserved12: UInt32; // 30
coproc: UInt32; // 34
formatErr: UInt32; // 38
unitializedInt: UInt32; // 3C
reserved: array [0..7] of UInt32; // 40-5C
spuriousInt: UInt32; // 60
autoVec1: UInt32; // 64
autoVec2: UInt32; // 68
autoVec3: UInt32; // 6C
autoVec4: UInt32; // 70
autoVec5: UInt32; // 74
autoVec6: UInt32; // 78
autoVec7: UInt32; // 7C
trapN: array [0..15] of UInt32; // 80 - BC
unassigned: array [0..15] of UInt32; // C0 - FC
end;
(**************************************************************************************
* structure for the Motorolla 68000 processor registers (variables).
*
* WARNING:
* This structure is used as the body of the 'read regs' command response
* packet. Any changes to it will require changes in the nub's code.
*
**************************************************************************************)
M68KRegsType = record
d: array [0..7] of UInt32; // data registers
a: array [0..7] of UInt32; // address registers
usp: UInt32; // user stack pointer
ssp: UInt32; // supervisor stack pointer
pc: UInt32; // program counter
sr: UInt16; // status register
end;
(**************************************************************************************
* bit masks for testing M68000 status register fields
**************************************************************************************)
// trace mode
const
m68kSrTraceMask = $08000;
m68kSrTraceBit = 15;
// supervisor state
m68kSrSupervisorMask = $02000;
// interrupt mask
m68kSrInterruptMask = $00700;
m68kSrInterruptOffset = 8; // offset for right-shifting interrupt mask
// condition codes
m68kSrExtendMask = $00010;
m68kSrNegativeMask = $00008;
m68kSrZeroMask = $00004;
m68kSrOverflowMask = $00002;
m68kSrCarryMask = $00001;
implementation
end.
|