home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / rexx / execbase.cpr < prev    next >
Encoding:
Text File  |  1996-12-24  |  2.7 KB  |  73 lines

  1. /* 
  2. Execbase: Dump the exec base information in the following form
  3. SoftVer   0
  4. ChkSums: Library ???  SysBase ???  LowMem ???  Critical ???
  5. ColdCapture $00000000  CoolCapture $00000000  WarmCapture $00000000
  6. SysStkUpper $00C80000  SysStkLower $00C7E800  MaxLocMem   $00080000
  7. DebugEntry  $00FC237E  DebugData   $00000000  AlertData   $00000000
  8. ThisTask    $002478A0  SysFlags        $0000
  9. IdleCount       14183  DispCount       30567
  10. Quantum            16  Elapsed            16
  11. IDNestCnt          -1  TDNestCnt          -1
  12. TrapCode    $00FC2FF0  ExceptCode  $00FC2FF0  ExitCode    $00FC1D28
  13. SigAlloc    $0000FFFF  TrapAlloc       $8000
  14. */
  15. address 'COMMAND'
  16. 'version >nil: exec.library 36 '
  17. lrc = rc
  18.  
  19. if (rc = 0) then
  20.   check = addlib('rexxsupport.library',0,-30,0) 
  21.  
  22. address
  23.  
  24. execbase = next("00000004"x)
  25.  
  26. softver = c2d(import(offset(execbase,34),2))
  27. 'd "SoftVer  ' softver'"'
  28.  
  29. coldcapt = '$'c2x(import(offset(execbase,42),4))
  30. coolcapt = '$'c2x(import(offset(execbase,46),4))
  31. warmcapt = '$'c2x(import(offset(execbase,50),4))
  32. 'd "ColdCapture' coldcapt ' CoolCapture' coolcapt ' WarmCapture' warmcapt'"'
  33.  
  34. stkupr = '$'c2x(import(offset(execbase,54),4))
  35. stklwr = '$'c2x(import(offset(execbase,58),4))
  36. maxmem = '$'c2x(import(offset(execbase,62),4))
  37. 'd "SysStkUpper' stkupr ' SysStkLower' stklwr ' MaxLocMem  ' maxmem'"'
  38.  
  39. dbgentr = '$'c2x(import(offset(execbase,66),4))
  40. dbgdata = '$'c2x(import(offset(execbase,70),4))
  41. alrtdata = '$'c2x(import(offset(execbase,74),4))
  42. ' d "DebugEntry ' dbgentr ' DebugData  ' dbgdata ' AlertData  ' alrtdata'"'
  43.  
  44. thistask = '$'c2x(import(offset(execbase,276),4))
  45. sysflags = '$'c2x(import(offset(execbase,292),2))
  46. 'd "ThisTask   ' thistask ' SysFlags       ' sysflags'"'
  47.  
  48. idlecnt = right(c2d(import(offset(execbase,280),4)),9)
  49. dispcnt = right(c2d(import(offset(execbase,284),4)),9)
  50. 'd "IdleCount  ' idlecnt ' DispCount  ' dispcnt'"'
  51.  
  52. quantum = right(c2d(import(offset(execbase,288),2)),9)
  53. elapsed = right(c2d(import(offset(execbase,290),2)),9)
  54. 'd "Quantum    ' quantum ' Elapsed    ' elapsed'"'
  55.  
  56. idnest = right(c2d(import(offset(execbase,294),1),1),9)
  57. tdnest = right(c2d(import(offset(execbase,295),1),1),9)
  58. 'd "IDNestCnt  ' idnest ' TDNestCnt  ' tdnest'"'
  59.  
  60. trapcode = '$'c2x(import(offset(execbase,304),4))
  61. excpcode = '$'c2x(import(offset(execbase,308),4))
  62. exitcode = '$'c2x(import(offset(execbase,312),4))
  63. 'd "TrapCode   ' trapcode ' ExceptCode ' excpcode ' ExitCode   ' exitcode'"'
  64.  
  65. sigaloc  = '$'c2x(import(offset(execbase,316),4))
  66. trapaloc = '$'c2x(import(offset(execbase,320),2))
  67. 'd "SigAlloc   ' sigaloc ' TrapAlloc      ' trapaloc'"'
  68.  
  69. attnflg  = '$'c2x(import(offset(execbase,296),2))
  70. attnsch  = '$'c2x(import(offset(execbase,298),2))
  71. lastalrt = '$'c2x(import(offset(execbase,514),4))
  72. 'd "AttnFlags      ' attnflg ' AttnResched    ' attnsch ' LastAlert  ' lastalrt'"'
  73. exit(0)