/packages/palmunits/src/m68khwr.pp

https://github.com/slibre/freepascal · Puppet · 115 lines · 102 code · 13 blank · 0 comment · 1 complexity · 719335c7854b70ae1b6f2affb8399739 MD5 · raw file

  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. unit m68khwr;
  18. interface
  19. uses palmos;
  20. (***********************************************************************
  21. * Breakpoint words we use
  22. ***********************************************************************)
  23. const
  24. m68kTrapInstr = $4E40;
  25. m68kTrapVectorMask = $000F;
  26. (***********************************************************************
  27. * 68000 Exception Vector table
  28. ***********************************************************************)
  29. type
  30. M68KExcTableType = record
  31. initStack: UInt32; // initial stack pointer
  32. initPC: UInt32; // initial PC
  33. busErr: UInt32; // 08
  34. addressErr: UInt32; // 0C
  35. illegalInstr: UInt32; // 10
  36. divideByZero: UInt32; // 14
  37. chk: UInt32; // 18
  38. trap: UInt32; // 1C
  39. privilege: UInt32; // 20
  40. trace: UInt32; // 24
  41. aTrap: UInt32; // 28
  42. fTrap: UInt32; // 2C
  43. reserved12: UInt32; // 30
  44. coproc: UInt32; // 34
  45. formatErr: UInt32; // 38
  46. unitializedInt: UInt32; // 3C
  47. reserved: array [0..7] of UInt32; // 40-5C
  48. spuriousInt: UInt32; // 60
  49. autoVec1: UInt32; // 64
  50. autoVec2: UInt32; // 68
  51. autoVec3: UInt32; // 6C
  52. autoVec4: UInt32; // 70
  53. autoVec5: UInt32; // 74
  54. autoVec6: UInt32; // 78
  55. autoVec7: UInt32; // 7C
  56. trapN: array [0..15] of UInt32; // 80 - BC
  57. unassigned: array [0..15] of UInt32; // C0 - FC
  58. end;
  59. (**************************************************************************************
  60. * structure for the Motorolla 68000 processor registers (variables).
  61. *
  62. * WARNING:
  63. * This structure is used as the body of the 'read regs' command response
  64. * packet. Any changes to it will require changes in the nub's code.
  65. *
  66. **************************************************************************************)
  67. M68KRegsType = record
  68. d: array [0..7] of UInt32; // data registers
  69. a: array [0..7] of UInt32; // address registers
  70. usp: UInt32; // user stack pointer
  71. ssp: UInt32; // supervisor stack pointer
  72. pc: UInt32; // program counter
  73. sr: UInt16; // status register
  74. end;
  75. (**************************************************************************************
  76. * bit masks for testing M68000 status register fields
  77. **************************************************************************************)
  78. // trace mode
  79. const
  80. m68kSrTraceMask = $08000;
  81. m68kSrTraceBit = 15;
  82. // supervisor state
  83. m68kSrSupervisorMask = $02000;
  84. // interrupt mask
  85. m68kSrInterruptMask = $00700;
  86. m68kSrInterruptOffset = 8; // offset for right-shifting interrupt mask
  87. // condition codes
  88. m68kSrExtendMask = $00010;
  89. m68kSrNegativeMask = $00008;
  90. m68kSrZeroMask = $00004;
  91. m68kSrOverflowMask = $00002;
  92. m68kSrCarryMask = $00001;
  93. implementation
  94. end.