/packages/palmunits/src/m68khwr.pp
Puppet | 115 lines | 102 code | 13 blank | 0 comment | 1 complexity | 719335c7854b70ae1b6f2affb8399739 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
1(****************************************************************************** 2 * 3 * Copyright (c) 1995-2000 Palm, Inc. or its subsidiaries. 4 * All rights reserved. 5 * 6 * File: M68KHwr.h 7 * 8 * Release: Palm OS SDK 4.0 (63220) 9 * 10 * Description: 11 * Pilot debugger remote hardware/system info 12 * 13 * History: 14 * 1/18/95 RM - Created by Ron Marianetti 15 * 16 *****************************************************************************) 17 18unit m68khwr; 19 20interface 21 22uses palmos; 23 24(*********************************************************************** 25 * Breakpoint words we use 26 ***********************************************************************) 27 28const 29 m68kTrapInstr = $4E40; 30 m68kTrapVectorMask = $000F; 31 32(*********************************************************************** 33 * 68000 Exception Vector table 34 ***********************************************************************) 35 36type 37 M68KExcTableType = record 38 initStack: UInt32; // initial stack pointer 39 initPC: UInt32; // initial PC 40 41 busErr: UInt32; // 08 42 addressErr: UInt32; // 0C 43 illegalInstr: UInt32; // 10 44 divideByZero: UInt32; // 14 45 chk: UInt32; // 18 46 trap: UInt32; // 1C 47 privilege: UInt32; // 20 48 trace: UInt32; // 24 49 aTrap: UInt32; // 28 50 fTrap: UInt32; // 2C 51 reserved12: UInt32; // 30 52 coproc: UInt32; // 34 53 formatErr: UInt32; // 38 54 unitializedInt: UInt32; // 3C 55 56 reserved: array [0..7] of UInt32; // 40-5C 57 58 spuriousInt: UInt32; // 60 59 autoVec1: UInt32; // 64 60 autoVec2: UInt32; // 68 61 autoVec3: UInt32; // 6C 62 autoVec4: UInt32; // 70 63 autoVec5: UInt32; // 74 64 autoVec6: UInt32; // 78 65 autoVec7: UInt32; // 7C 66 67 trapN: array [0..15] of UInt32; // 80 - BC 68 69 unassigned: array [0..15] of UInt32; // C0 - FC 70 end; 71 72(************************************************************************************** 73 * structure for the Motorolla 68000 processor registers (variables). 74 * 75 * WARNING: 76 * This structure is used as the body of the 'read regs' command response 77 * packet. Any changes to it will require changes in the nub's code. 78 * 79 **************************************************************************************) 80 81 M68KRegsType = record 82 d: array [0..7] of UInt32; // data registers 83 a: array [0..7] of UInt32; // address registers 84 usp: UInt32; // user stack pointer 85 ssp: UInt32; // supervisor stack pointer 86 pc: UInt32; // program counter 87 sr: UInt16; // status register 88 end; 89 90(************************************************************************************** 91 * bit masks for testing M68000 status register fields 92 **************************************************************************************) 93 94// trace mode 95const 96 m68kSrTraceMask = $08000; 97 m68kSrTraceBit = 15; 98 99// supervisor state 100 m68kSrSupervisorMask = $02000; 101 102// interrupt mask 103 m68kSrInterruptMask = $00700; 104 m68kSrInterruptOffset = 8; // offset for right-shifting interrupt mask 105 106// condition codes 107 m68kSrExtendMask = $00010; 108 m68kSrNegativeMask = $00008; 109 m68kSrZeroMask = $00004; 110 m68kSrOverflowMask = $00002; 111 m68kSrCarryMask = $00001; 112 113implementation 114 115end.