home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 545a.lha / PowerVisor_v1.0 / docs.LZH / docs / LookingAtThings < prev    next >
Encoding:
Text File  |  1991-09-01  |  45.7 KB  |  1,148 lines

  1. *----------------------------*
  2. * Tutorial : LookingAtThings * Sun Sep  1 14:50:43 1991
  3. *----------------------------*
  4.  
  5. ===================== Commands used in this tutorial =========================
  6.  
  7.    addstruct   Add structures to the 'stru' list
  8.    addtag      Add a tag to the current tag list
  9.    attc        The key attachment list
  10.    clearstruct Clear all structures in the 'stru' list
  11.    cleartags   Clear all tags in the current tag list
  12.    conf        Autoconfig list
  13.    crsh        Crash list
  14.    dbug        Debug list
  15.    devs        Exec device list
  16.    dosd        Dos device list
  17.    exec        ExecBase structure list
  18.    fdfi        Fd file list
  19.    fils        File list
  20.    for         For each element in list execute a command
  21.    font        Font list
  22.    func        Function monitor list
  23.    gadgets     Show all gadgets in a window
  24.    graf        GraphicsBase structure list
  25.    hunks       Show all hunks for a process
  26.    ihan        Input handler list
  27.    info        Give information about an element in a list
  28.    interprete  Interprete some memory as a structure (from the 'stru' list)
  29.    intb        IntuitionBase structure list
  30.    libinfo     Ask information about a library function from a fd-file
  31.    intr        Interrupt list
  32.    libs        Library list
  33.    list        Show a list (tasks, libraries, message ports, ...)
  34.    llist       Traverse a list and show all elements in list
  35.    loadfd      Load a fd-file
  36.    loadtags    Load tags in the current tag list
  37.    lock        Lock list
  38.    lwin        Logical window list
  39.    memory      List memory
  40.    memr        Memory node list
  41.    mmuregs     Show all registers from mmu
  42.    mmureset    Reset the mmu tree
  43.    mmutree     Show the mmu tree
  44.    mode        Set PowerVisor preferences
  45.    moni        Monitor list
  46.    owner       Search owner of memory
  47.    pathname    Get pathname from lock
  48.    port        Message port list
  49.    print       Print a string
  50.    pubs        Public screen list
  51.    pwin        The physical window list
  52.    remstruct   Remove a structure from the 'stru' list
  53.    remtag      Remove a tag from the current tag list
  54.    resm        Resident module list
  55.    reso        Resource list
  56.    savetags    Save all tags in the current tag list
  57.    scrs        Screen list
  58.    sema        Semaphore list
  59.    specregs    Show all special 68020..68030 registers
  60.    speek       Peek from memory (using mmu)
  61.    spoke       Poke in memory (using mmu)
  62.    stru        Structure list
  63.    tags        Show all tags in the current tag list
  64.    task        Task and process list
  65.    tg          Temporarily set another tag list as current
  66.    unasm       Disassemble memory
  67.    usetag      Set another current tag list number
  68.    view        List memory while using tags to determine the type of memory
  69.    wins        Window list
  70.  
  71. ===================== Functions used in this tutorial ========================
  72.  
  73.    apeek       Peek address from structure
  74.    base        Get the first element in the current list
  75.    curlist     Get the current list
  76.    lastmem     Get last memory used by 'memory', 'unasm' or 'view'
  77.    peek        Peek element from structure
  78.    stsize      Ask the size of a structure definition
  79.    taglist     Ask the current tag list number
  80.  
  81. ============================== Introduction ==================================
  82.  
  83. PowerVisor can ²display memory, ²disassemble instructions, ²show structures,
  84. ²give information, ... . In short, PowerVisor has a lot of instruction to SHOW
  85. you something. This tutorial file describes all these commands. All commands
  86. in this tutorial give you information of some kind.
  87.  
  88. ========================== Simple Memory Viewing =============================
  89.  
  90. The simplest way to ³look at memory is using the ²²'memory' command. Simply try
  91. it :
  92.  
  93. < memory 0 100 <enter>
  94.  
  95. or
  96.  
  97. < m 0 100 <enter>
  98.  
  99. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  100. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  101. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  102. > 00000030: 00F80AEA 00F80AEC 00F80AEE 00F80AF0              ................
  103. > 00000040: 00F80AF2 00F80AF4 00F80AF6 00F80AF8              ................
  104. > 00000050: 00F80AFA 00F80AFC 00F80AFE 00F80B00              ................
  105. > 00000060: 00F80B02                                         ....
  106.  
  107. You will now see 100 bytes or 25 longwords of memory starting on location 0.
  108.  
  109. You can also use :
  110.  
  111. < m 0 <enter>
  112. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  113. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  114. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  115. > 00000030: 00F80AEA 00F80AEC 00F80AEE 00F80AF0              ................
  116. > 00000040: 00F80AF2 00F80AF4 00F80AF6 00F80AF8              ................
  117. > 00000050: 00F80AFA 00F80AFC 00F80AFE 00F80B00              ................
  118. > 00000060: 00F80B02 00F810F4 00F81152 00F81188              ...........R....
  119. > 00000070: 00F811E6 00F8127C 00F812C6 00F81310              .......|........
  120. > 00000080: 00F80B70 00F80B72 00F80B74 00F80B76              ...p...r...t...v
  121. > 00000090: 00F80B78 00F80B7A 00F80B7C 00F80B7E              ...x...z...|...~
  122. > 000000A0: 00F80B80 00F80B82 00F80B84 00F80B86              ................
  123. > 000000B0: 00F80B88 00F80B8A 00F80B8C 00F80B8E              ................
  124. > 000000C0: 00F80B90 00F80B92 00F80B94 00F80B96              ................
  125. > 000000D0: 00F80B98 00F80B9A 00F80B9C 00F80B9E              ................
  126. > 000000E0: 00F80BA0 00F80BA2 00F80BA4 00F80BA6              ................
  127. > 000000F0: 00F80BA8 00F80BAA 00F80BAC 00F80BAE              ................
  128. > 00000100: 0030A6FC 00006600 00000610 00000000              .0....f.........
  129. > 00000110: 200066FB 00006600 0000A600 203066FA               .f...f..... 0f.
  130. > 00000120: 003026FB 00006600 00006630 005066F7              .0&...f...f0.Pf.
  131. > 00000130: 001066FB 00006600 00006600 001026F7              ..f...f...f...&.
  132.  
  133. So you don't have to specify the number of bytes to print. The default number
  134. is 320.
  135.  
  136. If you prefer the output of this command in another format, you can do this
  137. with the 'mode' command :
  138.  
  139. < mode byte <enter>
  140. < m 0 100 <enter>
  141. > 00000000: 00 00 00 00 07 E0 07 CC 00 F8 08 34 00 F8 0B 16  ...........4....
  142. > 00000010: 00 F8 0A DA 00 F8 0A DC 00 F8 0A DE 00 F8 0A E0  ................
  143. > 00000020: 00 F8 0C 00 00 F8 0A E4 00 F8 0A E7 00 F8 0A E8  ................
  144. > 00000030: 00 F8 0A EA 00 F8 0A EC 00 F8 0A EE 00 F8 0A F0  ................
  145. > 00000040: 00 F8 0A F2 00 F8 0A F4 00 F8 0A F6 00 F8 0A F8  ................
  146. > 00000050: 00 F8 0A FA 00 F8 0A FC 00 F8 0A FE 00 F8 0B 00  ................
  147. > 00000060: 00 F8 0B 02                                      ....
  148.  
  149. Or back to normal with :
  150.  
  151. < mode long <enter>
  152.  
  153. Other formats are: 'mode word' or 'mode ascii'.
  154.  
  155. ²Pressing enter with an empty commandline will cause the ²memory listing to
  156. continue (if the last command was a 'memory' command). (This is also
  157. the case if the last command was a 'view' or an 'unasm' (see later)).
  158.  
  159. Typing 'memory' with no arguments will also cause a ³continued memory listing.
  160.  
  161. You can use the 'lastmem' function to see where Powervisor will continue
  162. the memory listing :
  163.  
  164. < disp lastmem() <enter>
  165. > 00000064 , 100
  166.  
  167. Note that when you are debugging a program, this command will also show
  168. the 9 first characters of a symbol when there is one on some address.
  169.  
  170. ========================== Disassembling Memory ==============================
  171.  
  172. If you want to ²²disassemble memory, you can use the 'unasm' command. This
  173. command disassembles ¹68000, ¹68010, ¹68020, ¹68030, ¹68040, ¹68881, ¹68882
  174. and ¹68851 code.
  175.  
  176. < unasm 0 <enter>
  177.  
  178. or
  179.  
  180. < u 0 <enter>
  181.  
  182. > 00000000: 0000 0000                     ORI.B    #0,D0
  183. > 00000004: 07E0                          BSET     D3,-(A0)
  184. > 00000006: 07CC 00F8                     MOVEP.L  D3,($F8,A4)
  185. > 0000000A: 0834 00F8 0B16 00F8           BTST     #$F8,([A0],D0.L*2,$F8)
  186. > 00000012: 0ADA 00F8                     CAS      D0,D3,(A2)+
  187. > 00000016: 0ADC 00F8                     CAS      D0,D3,(A4)+
  188. > 0000001A: 0ADE 00F8                     CAS      D0,D3,(A6)+
  189. > 0000001E: 0AE0 00F8                     CAS      D0,D3,-(A0)
  190. > 00000022: 0C00 00F8                     CMPI.B   #$F8,D0
  191. > 00000026: 0AE4 00F8                     CAS      D0,D3,-(A4)
  192. > 0000002A: 0AE7 00F8                     CAS      D0,D3,-(A7)
  193. > 0000002E: 0AE8 00F8 0AEA                CAS      D0,D3,($AEA,A0)
  194. > 00000034: 00F8 0AEC                     ORI.?    #$F8,($AEC)
  195. > 00000038: 00F8 0AEE                     ORI.?    #$F8,($AEE)
  196. > 0000003C: 00F8 0AF0                     ORI.?    #$F8,($AF0)
  197. > 00000040: 00F8 0AF2                     ORI.?    #$F8,($AF2)
  198. > 00000044: 00F8 0AF4                     ORI.?    #$F8,($AF4)
  199. > 00000048: 00F8 0AF6                     ORI.?    #$F8,($AF6)
  200. > 0000004C: 00F8 0AF8                     ORI.?    #$F8,($AF8)
  201. > 00000050: 00F8 0AFA                     ORI.?    #$F8,($AFA)
  202.  
  203. The default number of instructions to disassemble is 20, but you can choose
  204. another number after the address.
  205.  
  206. < u 0 5 <enter>
  207. > 00000000: 0000 0000                     ORI.B    #0,D0
  208. > 00000004: 07E0                          BSET     D3,-(A0)
  209. > 00000006: 07CC 00F8                     MOVEP.L  D3,($F8,A4)
  210. > 0000000A: 0834 00F8 0B16 00F8           BTST     #$F8,([A0],D0.L*2,$F8)
  211. > 00000012: 0ADA 00F8                     CAS      D0,D3,(A2)+
  212.  
  213. If you do not like the words in this output you can disable them with :
  214.  
  215. < mode noshex <enter>
  216.  
  217. < u 0 5 <enter>
  218. > 00000000:                               ORI.B    #0,D0
  219. > 00000004:                               BSET     D3,-(A0)
  220. > 00000006:                               MOVEP.L  D3,($F8,A4)
  221. > 0000000A:                               BTST     #$F8,([A0],D0.L*2,$F8)
  222. > 00000012:                               CAS      D0,D3,(A2)+
  223.  
  224. Or enable them :
  225.  
  226. < mode shex <enter>
  227.  
  228. When you are debugging a program, this command shows all ³labels and symbols
  229. present in this program (Therefor it can be useful to disable the words in
  230. the output, that way PowerVisor can show longer labels).
  231.  
  232. Pressing enter with an empty commandline will cause the disassembly to
  233. continue (if the last command was a 'unasm' command).
  234.  
  235. Typing 'unasm' with no arguments will also cause a ²continued disassembly.
  236.  
  237. ============================= Listing Things =================================
  238.  
  239. You can also ¹¹list a lot of things in PowerVisor. The ²current list concept
  240. was already explained in the 'GettingStarted' tutorial file. I assume
  241. you have read that file.
  242.  
  243. The following lists are available at this moment :
  244. (All lists with a '*' have more information in the AmigaDOS 2.0 version,
  245. this (extra) information can be viewed with the 'info' command or the 'list'
  246. command)
  247.  
  248.   Big structures :
  249.    Exec *      the listing of the ²ExecBase structure
  250.    Intb        ²IntuitionBase structure
  251.    Graf *      ³Graphics base structure
  252.   Exec/dos/graphics and intuition things :
  253.    Task *      The listing of the ¹tasks in the system (default list)
  254.    Libs        ¹Exec-Libraries
  255.    Devs        ¹Exec-devices
  256.    Reso        ¹Exec-Resources
  257.    INTR        ¹Exec-Interrupts
  258.    Memr        ²Memory list
  259.    Port        ²Message ports
  260.    Wins *      All ¹windows
  261.    Scrs        ¹Screens
  262.    Font        ¹Fonts currently in memory
  263.    DOsd        ¹Dos-devices
  264.    SEma        ¹Semaphores
  265.    RESM        ²Resident modules
  266.    FIls        ²Open files
  267.    LOck        ¹Locks
  268.    IHan        ²Input handlers
  269.    COnf        ¹AutoConfigs
  270.    MOni *      ¹Monitors (AmigaDOS 2.0 only)
  271.    PUbs *      ²Public Screens (AmigaDOS 2.0 only)
  272.   PowerVisor things :
  273.    FUnc        All ³Function monitor nodes (see 'addfunc' command)
  274.    FDfi        All ²fdfiles loaded (see 'loadfd' command)
  275.    Attc        All ²attached keys (see 'attach' command)
  276.    Crsh        All ²crashed programs
  277.    DBug        All ²debug nodes (see 'debug' tutor file)
  278.    STru        All ²structure defines (see 'addstruct' command)
  279.    LWin        All ²logical windows for PowerVisor
  280.    PWin        All ²physical windows for PowerVisor
  281.  
  282. Some examples :
  283.  
  284. < list exec <enter>
  285. > SoftVer      : 012F     | LowMemChkSum : 0000     | ChkBase      : F81FF833
  286. > ColdCapture  : 00000000 | CoolCapture  : 00000000 | WarmCapture  : 00000000
  287. > SysStkUpper  : 07E02230 | SysStkLower  : 07E00A30 | MaxLocMem    : 00200000
  288. > DebugEntry   : 00F82E88 | DebugData    : 00000000 | AlertData    : 00000000
  289. > MaxExtMem    : 00000000 | ChkSum       : A2BE     | ThisTask     : 07EA0B08
  290. > IdleCount    : 000045BE | DispCount    : 00005039 | Quantum      : 0004
  291. > Elapsed      : 0004     | SysFlags     : 0000     | IDNestCnt    : FF
  292. > TDNestCnt    : FF       | AttnFlags    : 0017     | AttnResched  : 0000
  293. > ResModules   : 07E00410 | TaskTrapCode : 07EA6924 | TaskExceptCod: 00F83AEC
  294. > TaskExitCode : 00F8242C | TaskSigAlloc : 0000FFFF | TaskTrapAlloc: 8000
  295. > VBlankFreq   : 32       | PowerSupplyFr: 32       | KickTagPtr   : 00000000
  296. > KickCheckSum : 00000000 | RamLibPrivate: 07E1E528 | EClockFreq   : 000AD303
  297. > CacheCtrl    : 00002919 | TaskID       : 00000001 | PuddleSize   : 00000000
  298. > MMULock      : 00000000 |
  299.  
  300. See the 'Expressions' tutorial file for what you can do with the ':'
  301. operator for this list and the two other lists : 'graf' and 'intb'.
  302. Note that the '&' ²unary operator can only be used with these three lists.
  303. The ':' operator can be used for almost any list except 'lock' and 'file'.
  304.  
  305. < list wins <enter>
  306. > Window name         : Address  Left  Top Width Height WScreen
  307. > ---------------------------------------------------------------------------
  308. >                     : 07EA7568    0   12   692    430 07EA6760
  309. >                     : 07E45E38    0    0   704    456 07E46110
  310. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  311. >                     : 07E3B398    0   16   692   1008 07E2D258
  312.  
  313.  
  314. You can use the 'curlist' function to see in which list we are. This function
  315. returns a pointer to the curlist string (in ¹ARexx this function returns
  316. a string). You can use the 'print' command to look at the current list :
  317.  
  318. < print #curlist()
  319. > task
  320.  
  321. (Since there is no newline in the current list string, there will be no
  322. newline printed on the screen).
  323.  
  324.  
  325. If you want the pointer to the first element in the list you can use the
  326. 'base' function :
  327.  
  328. < disp base() <enter>
  329. > 07E28330 , 132285232
  330.  
  331.  
  332. When you want to execute a specific command on each element in a list, you
  333. can use the 'for' command. This command is especially useful when using
  334. ¹tags (see the tag section).
  335. The command you give as an argument to the 'for' command is executed
  336. once for each element in the list. The command can find the pointer to
  337. the element in the list in the ²'rc' variable.
  338.  
  339. For example, to display all elements in a list :
  340.  
  341. < for task disp rc <enter>
  342. > 07E28330 , 132285232
  343. > 07E51458 , 132453464
  344. > 07E5B258 , 132493912
  345. > 07E609A8 , 132516264
  346. > 07E53F28 , 132464424
  347. > 07E1E6F0 , 132245232
  348. > 07E1EFE0 , 132247520
  349. > 07E51DC8 , 132455880
  350. > 07E0D992 , 132176274
  351. > 07E43418 , 132396056
  352. > 07E6E5C8 , 132572616
  353. > 07EA8348 , 132809544
  354. > 07E0A7C0 , 132163520
  355. > 07E0A428 , 132162600
  356. > 07E104E8 , 132187368
  357. > 07E16278 , 132211320
  358. > 07E189B0 , 132221360
  359. > 07E34200 , 132334080
  360. > 07E0F1B4 , 132182452
  361. > 07E08B22 , 132156194
  362. > 07E23BF8 , 132267000
  363. > 07EA9648 , 132814408
  364.  
  365.  
  366. More information about each list can be found in the 'List' tutorial file.
  367. In that tutorial file you can also find all the variables printed by
  368. the 'info' command (see below).
  369.  
  370. =================== Asking more 'info' about something =======================
  371.  
  372. If you want more ¹¹information about something that is in a list, you can
  373. use the 'info' command :
  374.  
  375. Make the window list current :
  376.  
  377. < wins <enter>
  378.  
  379. < list <enter>
  380. > Window name         : Address  Left  Top Width Height WScreen
  381. > ---------------------------------------------------------------------------
  382. >                     : 07EA7568    0   12   692    430 07EA6760
  383. >                     : 07E45E38    0    0   704    456 07E46110
  384. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  385. >                     : 07E3B398    0   16   692   1008 07E2D258
  386.  
  387. You can now ask more info about 'My Shell' for example :
  388.  
  389. < info my <enter>
  390.  
  391. > Window name         : Address  Left  Top Width Height WScreen
  392. > ---------------------------------------------------------------------------
  393. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  394. >
  395. > MinWidth     : 0050     | MinHeight    : 0032     | MaxWidth     : FFFF
  396. > MaxHeight    : FFFF     | Flags        : 2800104F | MenuStrip    : 00000000
  397. > ScreenTitle  : Workbench Screen
  398. > FirstReques  : 00000000 | DMRequest    : 00000000 | ReqCount     : 0000
  399. > RPort        : 07E20068 | Pointer      : 00000000 | PtrHeight    : 00
  400. > PtrWidth     : 00       | XOffset      : 00       | YOffset      : 00
  401. > IDCMPFlags   : 00000000 | UserPort     : 00000000 | WindowPort   : 00000000
  402. > MessageKey   : 00000000 | DetailPen    : 00       | BlockPen     : 01
  403. > CheckMark    : 07E0B960 | ExtData      : 00000000 | UserData     : 00000000
  404. > BorderLeft   : 04       | BorderTop    : 10       | BorderRight  : 12
  405. > BorderBottom : 02       | BorderRPort  : 00000000 | Parent       : 07E3B398
  406. > Descendant   : 07EA7568 | GZZMouseX    : 005D     | GZZMouseY    : 00D6
  407. > GZZWidth     : 029E     | GZZHeight    : 01B6     | IFont        : 07E083F0
  408. > MoreFlags    : 00000000 |
  409. >
  410. > Flags: WINDOWSIZING WINDOWDRAG WINDOWDEPTH WINDOWCLOSE SIMPLEREFRESH ACTIVATE
  411. > VISITOR HASZOOM
  412. > IDCMP:
  413.  
  414. You get a lot of information. Basically this is the window structure.
  415.  
  416. Not all lists have that much extra information. Some lists give no extra
  417. information at all. Only the header is dumped.
  418.  
  419. IMPORTANT ! If 'wins' wasn't the current list you should ask information
  420. as follows :
  421.  
  422. First go to another current list :
  423.  
  424. < task <enter>
  425.  
  426. Ask information about 'My Shell' in the window list.
  427.  
  428. < info wins:my wins <enter>
  429. > ...
  430.  
  431. Especially the last 'wins' argument is very important. If you omit it
  432. PowerVisor will try to interprete the 'My Shell' window as a task or
  433. process. This can cause crashes. In general it is safest to always
  434. supply this extra argument. You may add it to the command even if
  435. the current list is already good.
  436.  
  437. You must also be careful using ²name expansion (don't type this) :
  438.  
  439. < info my wins <enter>
  440.  
  441. will NOT work when 'wins' is not the current list. This command can
  442. even crash. What happens is that PowerVisor first searches the current
  443. list for something that starts with 'my'. If you are so unlucky to really
  444. have a task starting with 'my' PowerVisor will then try to interprete
  445. that task as a window.
  446.  
  447. So you should really be careful when you use the 'info' command. Nasty things
  448. can happen when you are not careful enough about the current list and
  449. the arguments you give to 'info'. If you are cautious however, the 'info'
  450. command is really useful and can safe you lots of debugging time.
  451.  
  452.  
  453. Using the 'for' command (explained above), you can ask information about
  454. all items in a list.
  455.  
  456. For example, to dump info about each task in the system to a file (not
  457. to the screen), use :
  458.  
  459. < to ram:Info -for task {info rc task;print \0a\0a} <enter>
  460.  
  461. This is a rather complex example. I will explain it in detail.
  462.  
  463.    The 'to' command ³redirects the output of the following command to
  464.    the file 'ram:Info' (see the 'Screen' tutorial file for more info
  465.    about the 'to' command).
  466.  
  467.    The 'for' command is the command whose output is redirected (it
  468.    is an argument for the 'to' command). Because there is a '-' in
  469.    front of the 'for' no output is printed on the PowerVisor window.
  470.  
  471.    The 'for' command executes the following command for each element
  472.    in the 'task' list.
  473.  
  474.    The command that is executed for each element in the task list is
  475.    a ³group of commands.
  476.  
  477.    The first command in this group is the 'info' command. Its argument
  478.    is the ²'rc' variable which contains the pointer to the element
  479.    currently processed by the 'for' command. We add the 'task' argument
  480.    since we could as well execute this command with another current list.
  481.  
  482.    The second command in this group is the 'print' command. This
  483.    command prints two newlines after each info block.
  484.  
  485.    Since the 'for' command remembers all output in memory and only
  486.    starts printing after the list is traversed, you need not worry
  487.    about the list becoming corrupt after a long time (This is
  488.    especially true for the task list since this is a very busy list).
  489.  
  490. You could also have typed :
  491.  
  492. < -to ram:Info for task {info rc task;print \0a\0a} <enter>
  493.  
  494. But not :
  495.  
  496. < to ram:Info for task -{info rc task;print \0a\0a} <enter>
  497.  
  498. Since the 'for' command remembers all output even if the output is
  499. hidden.
  500.  
  501. =========================== Viewing structures ===============================
  502.  
  503. PowerVisor also has the ability to ²²view structures. These structure are
  504. defined in ascii files and converted to ¹'pvsd'-files
  505. (³PowerVisor Structure Definition files) by the ¹'MStruct' utility (at this
  506. moment AmigaDOS 2.0 only). These ascii files look a bit like machinelanguage
  507. include files.
  508.  
  509. On the PowerVisor disk there is a file called ¹'Exec.pvsd'. This file contains
  510. all definitions for the structures in Exec 2.0. You can load all structures
  511. from this file using :
  512.  
  513. < addstruct exec.pvsd <enter>
  514. > UNIT
  515. > IS
  516. > IV
  517. > IO
  518. > IOSTD
  519. > LIB
  520. > LH
  521. > MLH
  522. > ML
  523. > ME
  524. > MH
  525. > MC
  526. > LN
  527. > MLN
  528. > MP
  529. > MN
  530. > RT
  531. > SSR
  532. > SS
  533. > SM
  534. > TC
  535. > ETask
  536. > StackSwapStruct
  537.  
  538. This command adds all structures to the 'stru' list. You can list this
  539. list to see all structures in memory :
  540.  
  541. < list stru <enter>
  542. > Struct node name    : Node     Pri InfoBlock Strings  Length
  543. > ---------------------------------------------------------------------------
  544. > IS                  : 07EBA5B0 FD  07EBA5D2  07E5A4D2     22
  545. > IV                  : 07EBA5F0 FD  07EBA612  07EBA63A     12
  546. > IO                  : 07EBA650 FD  07EBA672  07EBA6AA     32
  547. > LH                  : 07EBA888 FD  07EBA8AA  07EBA8E2     14
  548. > ML                  : 07EBA948 FD  07EBA96A  07E622AA     16
  549. > ME                  : 07EBA980 FD  07EBA9A2  07E622CA      8
  550. > MH                  : 07EBA9C0 FD  07EBA9E2  07EBAA1A     32
  551. > MC                  : 07EBAA50 FD  07EBAA72  07E706EA      8
  552. > LN                  : 07EBAA90 FD  07EBAAB2  07EBAAEA     14
  553. > MP                  : 07EBAB48 FD  07EBAB6A  07EBAB9A     34
  554. > MN                  : 07EBABB8 FD  07EBABDA  07EBABFA     20
  555. > RT                  : 07EBAC10 FD  07EBAC32  07EBAC92     26
  556. > SS                  : 07EBAD10 FD  07EBAD32  07EBAD6A     46
  557. > SM                  : 07EBADA0 FD  07EBADC2  07E5A602     36
  558. > TC                  : 07EBADD8 FD  07EBADFA  07EBAE9A     84
  559. > LIB                 : 07EBA788 FC  07EBA7EA  07EBA842     34
  560. > MLH                 : 07EBA900 FC  07EBA922  07EBA7AA     12
  561. > MLN                 : 07EBAB08 FC  07EBAB2A  07E73452      8
  562. > SSR                 : 07EBACD8 FC  07EBACFA  07E761FA     12
  563. > UNIT                : 07E5A5A8 FB  07EBA53A  07EB7BCA     38
  564. > IOSTD               : 07EBA6D0 FA  07EBA6F2  07EBA74A     48
  565. > ETask               : 07EBAF38 FA  07EBAF5A  07EBAFAA     86
  566. > StackSwapStruct     : 07EBAFF8 F0  07EBB032  07EBB05A     12
  567.  
  568. You can then use the 'remstruct' and 'clearstruct' commands to remove one
  569. structure or all structures from memory.
  570.  
  571. Now we interprete an element of the task list as a task :
  572.  
  573. < task <enter>
  574.  
  575. < list task <enter>
  576. > Task node name      : Node     Pri StackPtr  StackS Stat Command        Acc
  577. > ---------------------------------------------------------------------------
  578. > Background Process  : 07E28330 00  07E2D500    4096 Wait iprefs     (02) -
  579. > RexxMaster          : 07E51410 04  07E51C52    2048 Wait            (00) -
  580. > SYS:System/CLI      : 07E5DC50 00  07E5EB8E    4096 Wait            (00) -
  581. > Background Process  : 07E5B250 00  07E5D98A    4096 Wait addtools   (06) -
  582. > ...
  583. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  584. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  585. > Background Process  : 07E1F7C8 04  07E8C216   12000 Run  pv         (01) -
  586.  
  587. < interprete input tc <enter>
  588. > FLAGS        : 00       | STATE        : 04       | IDNESTCNT    : 00
  589. > TDNESTCNT    : FF       | SIGALLOC     : C000FFFF | SIGWAIT      : C0000000
  590. > SIGRECVD     : 00000000 | SIGEXCEPT    : 00000000 | ETask        : 80000000
  591. > EXCEPTDATA   : 00000000 | EXCEPTCODE   : 00F83AEC | TRAPDATA     : 00000000
  592. > TRAPCODE     : 00F83AEC | SPREG        : 07E09B28 | SPLOWER      : 07E08B7E
  593. > SPUPPER      : 07E09B7E | MEMENTRY     : 07E08B64 | Userdata     : 00000000
  594.  
  595. This command dumps the structure defined in the 'stru' list. ('tc' is
  596. the task structure).
  597.  
  598. You can also peek a certain value from this list with the 'peek' function :
  599.  
  600. < disp peek(input,tc,spupper) <enter>
  601. > 07E09B7E , 132160382
  602.  
  603. Or you can change a value (do not execute this command) :
  604.  
  605. < *apeek(input,tc,spupper).l=5 <enter>
  606.  
  607. You can use the 'stsize' function to ask the size of a structure :
  608.  
  609. < d stsize(ln) <enter>
  610. > 0000000E,14
  611.  
  612.  
  613. Structure definitions can also be used with the 'view' command (see below).
  614.  
  615. =================== The tag system and the View command ======================
  616.  
  617. The most powerful command to ²²view memory is the 'view' command. This command
  618. uses ¹¹tags. A tag is a definition for a range of memory. Using tags you can
  619. define a region of memory to be code, or full ascii, ... . The 'view' command
  620. displays all memory according to its type.
  621.  
  622. In combination with ¹structures (see the previous section), this command has
  623. even more power (see the next section).
  624.  
  625. When you first start PowerVisor the 'view' command works exactly like
  626. the 'memory' command. This is because the default memory type for all
  627. memory that is not defined by a tag is Long/Ascii.
  628.  
  629. Lets explain all this with an example :
  630.  
  631. First we define the memory starting on location 0 as a range of longwords :
  632.  
  633. < addtag 0 50 la <enter>
  634.  
  635. This 'addtag' command adds a definition for a range of memory. A memory
  636. range with 50 bytes starting from address 0 is defined as LA. This is
  637. Long/Ascii. This is the default, so you won't see anything special when
  638. you view that memory.
  639.  
  640. < addtag 50 50 wa <enter>
  641.  
  642. The next 50 bytes of memory (starting on address 50) are defined as WA
  643. or Word/Ascii. We can use the 'view' command to see what we have done :
  644.  
  645. < view 0 <enter>
  646.  
  647. (Note that the 'view' command has the same sort of arguments as the 'memory'
  648. command).
  649.  
  650. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  651. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  652. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  653. > 00000030: 00F8                                             ..
  654. > 00000032: 0AEA 00F8 0AEC 00F8 0AEE 00F8 0AF0 00F8          ................
  655. > 00000042: 0AF2 00F8 0AF4 00F8 0AF6 00F8 0AF8 00F8          ................
  656. > 00000052: 0AFA 00F8 0AFC 00F8 0AFE 00F8 0B00 00F8          ................
  657. > 00000062: 0B02                                             ..
  658. > 00000064: 00F810F4 00F81152 00F81188 00F811E6              .......R........
  659. > 00000074: 00F8127C 00F812C6 00F81310 00F80B70              ...|...........p
  660. > 00000084: 00F80B72 00F80B74 00F80B76 00F80B78              ...r...t...v...x
  661. > 00000094: 00F80B7A 00F80B7C 00F80B7E 00F80B80              ...z...|...~....
  662. > 000000A4: 00F80B82 00F80B84 00F80B86 00F80B88              ................
  663. > 000000B4: 00F80B8A 00F80B8C 00F80B8E 00F80B90              ................
  664. > 000000C4: 00F80B92 00F80B94 00F80B96 00F80B98              ................
  665. > 000000D4: 00F80B9A 00F80B9C 00F80B9E 00F80BA0              ................
  666. > 000000E4: 00F80BA2 00F80BA4 00F80BA6 00F80BA8              ................
  667. > 000000F4: 00F80BAA 00F80BAC 00F80BAE 00000000              ................
  668. > 00000104: 00000000 00000000 00000000 00000000              ................
  669. > 00000114: 00000000 00000000 00000000 00000000              ................
  670. > 00000124: 00000000 00000000 00000000 00000000              ................
  671. > 00000134: 00000000 00000000 00000000                       ............
  672.  
  673. You can see that the memory starting at location 50 is listed in Word/Ascii
  674. format.
  675.  
  676. < addtag 100 50 ba <enter>
  677.  
  678. We define the next 50 bytes of memory as Byte/Ascii and :
  679.  
  680. < addtag 150 50 as <enter>
  681.  
  682. the next 50 bytes of memory as full Ascii and :
  683.  
  684. < addtag 200 50 co <enter>
  685.  
  686. the next 50 bytes of memory as code.
  687.  
  688. < view 0 <enter>
  689. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  690. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  691. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  692. > 00000030: 00F8                                             ..
  693. > 00000032: 0AEA 00F8 0AEC 00F8 0AEE 00F8 0AF0 00F8          ................
  694. > 00000042: 0AF2 00F8 0AF4 00F8 0AF6 00F8 0AF8 00F8          ................
  695. > 00000052: 0AFA 00F8 0AFC 00F8 0AFE 00F8 0B00 00F8          ................
  696. > 00000062: 0B02                                             ..
  697. > 00000064: 00 F8 10 F4 00 F8 11 52 00 F8 11 88 00 F8 11 E6  .......R........
  698. > 00000074: 00 F8 12 7C 00 F8 12 C6 00 F8 13 10 00 F8 0B 70  ...|...........p
  699. > 00000084: 00 F8 0B 72 00 F8 0B 74 00 F8 0B 76 00 F8 0B 78  ...r...t...v...x
  700. > 00000094: 00 F8                                            ..
  701. > 00000096: .z...|...~........................................
  702. > 000000C8: 00F8 0B94                     ORI.?    #$F8,($B94)
  703. > 000000CC: 00F8 0B96                     ORI.?    #$F8,($B96)
  704. > 000000D0: 00F8 0B98                     ORI.?    #$F8,($B98)
  705. > 000000D4: 00F8 0B9A                     ORI.?    #$F8,($B9A)
  706. > 000000D8: 00F8 0B9C                     ORI.?    #$F8,($B9C)
  707. > 000000DC: 00F8 0B9E                     ORI.?    #$F8,($B9E)
  708. > 000000E0: 00F8 0BA0                     ORI.?    #$F8,($BA0)
  709. > 000000E4: 00F8 0BA2                     ORI.?    #$F8,($BA2)
  710. > 000000E8: 00F8 0BA4                     ORI.?    #$F8,($BA4)
  711. > 000000EC: 00F8 0BA6                     ORI.?    #$F8,($BA6)
  712. > 000000F0: 00F8 0BA8                     ORI.?    #$F8,($BA8)
  713. > 000000F4: 00F8 0BAA                     ORI.?    #$F8,($BAA)
  714. > 000000F8: 00F8 0BAC                     ORI.?    #$F8,($BAC)
  715. > 000000FA: 0BAC00F8 0BAE0000 00000000 00000000              ................
  716. > 0000010A: 00000000 00000000 00000000 00000000              ................
  717. > 0000011A: 00000000 00000000 00000000 00000000              ................
  718. > 0000012A: 00000000 00000000 00000000 00000000              ................
  719. > 0000013A: 00000000 0000                                    ......
  720.  
  721. (The code example is useless in this case since that memory clearly isn't
  722. code).
  723. You can see that tags are very versatile. They can be very useful when you
  724. are debugging and do not want to loose track of all the different types of
  725. memory. If you still want to look at memory in a uniform way (either data
  726. or code) you can still use the 'memory' and 'unasm' commands. These commands
  727. ignore the tags.
  728.  
  729. You can see which tags are defined :
  730.  
  731. < tags <enter>
  732. > 00000000 : 00000032 LA
  733. > 00000032 : 00000032 WA
  734. > 00000064 : 00000032 BA
  735. > 00000096 : 00000032 AS
  736. > 000000C8 : 00000032 CO
  737.  
  738. (All values in this output are hexadecimal).
  739.  
  740. Note that it is possible to create ²overlapping tags. This is not encouraged
  741. since the search order of these tags is not defined. If you have an address
  742. that is defined in two different tags, you can never be sure which tag is
  743. taken as the correct one.
  744. However, PowerVisor will automatically detect overlapping tags when the
  745. new tag is not completely in another tag or when the new tag does not
  746. completely redefine another tag. In that case the other tag is made
  747. smaller.
  748.  
  749. You can remove a tag using the 'remtag' command :
  750.  
  751. < remtag 100 <enter>
  752.  
  753. will remove the definition for the range starting at address 100.
  754.  
  755. You can remove all tags at once with the 'cleartags' command.
  756.  
  757. < cleartags <enter>
  758. < tags <enter>
  759.  
  760. All tags are gone.
  761.  
  762. You can load and save tags using the 'loadtags' and 'savetags' commands.
  763.  
  764.  
  765. If you want different tag lists for different applications you can use any
  766. of the other 15 ²tag lists. PowerVisor has 16 tag lists numbered from 0 to
  767. 15. The default tag list is 0.
  768.  
  769. You can change the current tag list using the 'usetag' command :
  770.  
  771. < usetag 1 <enter>
  772.  
  773. will use tag list 1.
  774.  
  775. < usetag 0 <enter>
  776.  
  777. Back to tag list 0.
  778.  
  779. All commands on tags ('addtag', 'remtag', 'loadtags', 'savetags',
  780. 'cleartags', 'view', ...) only look at the ³current tag list.
  781.  
  782. You can temporarily set the current tag list using the 'tg' command :
  783.  
  784. < tg 1 view 0 <enter>
  785.  
  786. will view the memory starting at 0 using tag list 1. After the operation
  787. it will restore the current tag list.
  788.  
  789. Use the 'taglist' function to see the current tag list.
  790.  
  791. < disp taglist() <enter>
  792. > 00000000 , 0
  793.  
  794. ======================== Using tags and structures ===========================
  795.  
  796. In the previous section we saw five different tag types :
  797.  
  798.    BA    Byte/Ascii
  799.    WA    Word/Ascii
  800.    LA    Long/Ascii
  801.    AS    Full Ascii
  802.    CO    Code
  803.  
  804. There is a sixth tag type :
  805.  
  806.    ST    Structure
  807.  
  808. We explain structure tags with an example :
  809.  
  810. Clear all structures and tags in memory :
  811.  
  812. < clearstruct <enter>
  813. < cleartags <enter>
  814.  
  815. Load the exec structure file :
  816.  
  817. < addstruct exec.pvsd <enter>
  818. > UNIT
  819. > IS
  820. > IV
  821. > IO
  822. > IOSTD
  823. > LIB
  824. > LH
  825. > MLH
  826. > ML
  827. > ME
  828. > MH
  829. > MC
  830. > LN
  831. > MLN
  832. > MP
  833. > MN
  834. > RT
  835. > SSR
  836. > SS
  837. > SM
  838. > TC
  839. > ETask
  840. > StackSwapStruct
  841.  
  842. (See the 'Structure' section for more info about these commands).
  843.  
  844. Now we can use these structures to define structure tags :
  845.  
  846. < task <enter>
  847.  
  848. < list <enter>
  849. > Task node name      : Node     Pri StackPtr  StackS Stat Command        Acc
  850. > ---------------------------------------------------------------------------
  851. > Background Process  : 07E28330 00  07E2D500    4096 Wait iprefs     (02) -
  852. > RexxMaster          : 07E4DD38 04  07E4E57A    2048 Wait            (00) -
  853. > PowerSnap 1.0 by Nic: 07E41B48 05  07E42392    2000 Wait            PROC -
  854. > ...
  855. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  856. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  857. > Background Process  : 07E72728 04  07E88122   12000 Run  pv         (05) -
  858.  
  859. < addtag ram stsize(tc) st tc <enter>
  860.  
  861. What have we done ? We have defined a new tag starting with the address
  862. of the RAM task. This tag defines a region of memory that is 'stsize(tc)'
  863. bytes big. 'stsize' is a function that returns the size of a structure.
  864. The structure is the 'TC' structure (task structure). The tag we define
  865. has type 'ST' (structure tag). When you use the 'ST' type for a tag
  866. you need another argument to 'addtag': the pointer to the structure
  867. definition. This is 'TC'.
  868.  
  869. < tags <enter>
  870. > 07E1E6F0 : 00000054 ST TC
  871.  
  872. Now we view the memory surrounding this task structure :
  873.  
  874. < view ram-50 <enter>
  875. > 07E1E6BE: 000001F8 57AB0000 000207E1 8A0C0000              ....W...........
  876. > 07E1E6CE: 00000000 125F0000 03F30000 0A090000              ....._..........
  877. > 07E1E6DE: 00000000 00000000 000001F8 2EBC0000              ................
  878. > 07E1E6EE: 0000                                             ..
  879. > 07E1E6F0: TC
  880. > FLAGS        : 00       | STATE        : 04       | IDNESTCNT    : 00
  881. > TDNESTCNT    : FF       | SIGALLOC     : 0000FFFF | SIGWAIT      : 00000010
  882. > SIGRECVD     : 00000100 | SIGEXCEPT    : 00000000 | ETask        : 80000000
  883. > EXCEPTDATA   : 00000000 | EXCEPTCODE   : 00F83AEC | TRAPDATA     : 00000000
  884. > TRAPCODE     : 00F8FFCE | SPREG        : 07E1EEF0 | SPLOWER      : 07E1E7D4
  885. > SPUPPER      : 07E1EFD4 | MEMENTRY     : 07E1E732 | Userdata     : 000007E1
  886. > 07E1E744: E5780000 00000000 00000000 00000000              .x..............
  887. > 07E1E754: 00000000 00000008 07E1E6F0 07E1E764              ...............d
  888. > 07E1E764: 00000000 07E1E760 00000000 01F87965              .......`......ye
  889. > 07E1E774: 00000800 07E0F944 00000000 01F879F5              .......D......y.
  890. > 07E1E784: 00000000 01FA2E94 00000000 00000000              ................
  891. > 07E1E794: 00000000 07E10544 00000000 07E1EFD0              .......D........
  892. > 07E1E7A4: 00000000 00000000 00000000 00000000              ................
  893. > 07E1E7B4: 00000000 00000000 00000000 07E1E7C4              ................
  894. > 07E1E7C4: 00000000 07E1E7C0 00000000 00000000              ................
  895. > 07E1E7D4: 00000000 00000000 00000000 00000000              ................
  896. > 07E1E7E4: 00000000 00000000 00000000 00000000              ................
  897. > 07E1E7F4: 00000000 00000000 0000                           ..........
  898.  
  899. The output is the same as with the 'interprete' command.
  900.  
  901.  
  902. Of course it would be cumbersome if you hade to repeat this procedure for
  903. each task in the task list. You can use the 'for' command to automate
  904. this process (also see the 'Listing Things' section) :
  905.  
  906. < for task addtag rc stsize(tc) st tc <enter>
  907.  
  908. This command will define a tag for each task in the task list.
  909.  
  910. =================== Some miscellanious viewing commands ======================
  911.  
  912. PowerVisor also has a lot of other smaller view commands. These are all
  913. explained in this section.
  914.  
  915. You can list all ¹gadgets in a window with :
  916.  
  917. < list wins <enter>
  918. > Window name         : Address  Left  Top Width Height WScreen
  919. > ---------------------------------------------------------------------------
  920. >                     : 07EA69D8    0   12   692    430 07EA6378
  921. >                     : 07E45E38    0    0   704    456 07E46110
  922. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  923. >                     : 07E3B398    0   16   692   1008 07E2D258
  924.  
  925. < gadgets my <enter>
  926. > Gadget ptr : left right width height Render   Text     SpecInfo ID
  927. >
  928. > 07E100D4   :  -22     0    24     16 07E4687C 00000000 00000000     0
  929. > Flags      : GADGHCOMP GADGIMAGE GRELRIGHT LABELITEXT
  930. > Activation : RELVERIFY BORDERSNIFF
  931. > Type       : SYSGADGET WUPFRONT CUSTOMGADGET
  932. >
  933. > 07E10114   :  -45     0    24     16 07E489C4 00000000 00000000     0
  934. > Flags      : GADGHCOMP GADGIMAGE GRELRIGHT LABELITEXT
  935. > Activation : RELVERIFY BORDERSNIFF
  936. > Type       : SYSGADGET WDOWNBACK CUSTOMGADGET
  937. >
  938. > 07E1FDFC   :  -17    -9    18     10 07E48DF4 00000000 00000000     0
  939. > Flags      : GADGHCOMP GADGIMAGE GRELBOTTOM GRELRIGHT LABELITEXT
  940. > Activation : RELVERIFY BORDERSNIFF
  941. > Type       : SYSGADGET SIZING CUSTOMGADGET
  942. >
  943. > 07E1FE3C   :    0     0    20     16 07E58E0C 00000000 00000000     0
  944. > Flags      : GADGHCOMP GADGIMAGE LABELITEXT
  945. > Activation : RELVERIFY BORDERSNIFF
  946. > Type       : SYSGADGET CLOSE CUSTOMGADGET
  947. >
  948. > 07E1FE7C   :    0     0     0     15 00000000 00000000 00000000     0
  949. > Flags      : GADGHCOMP GADGIMAGE GRELWIDTH LABELITEXT
  950. > Activation : BORDERSNIFF
  951. > Type       : SYSGADGET WDRAGGING CUSTOMGADGET
  952.  
  953.  
  954. You can list all ¹hunks for a process with :
  955.  
  956. < list task <enter>
  957. > Task node name      : Node     Pri StackPtr  StackS Stat Command        Acc
  958. > ---------------------------------------------------------------------------
  959. > Background Process  : 07E28330 00  07E2CDD8    4096 Wait iprefs     (02) -
  960. > RexxMaster          : 07E51458 04  07E51C9A    2048 Wait            (00) -
  961. > Background Process  : 07E5B258 00  07E5AC9A    4096 Wait addtools   (06) -
  962. > ...
  963. > trackdisk.device    : 07E0F1B4 05  07E0F3C6     512 Wait            TASK -
  964. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  965. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  966. > Background Process  : 07EA7EA8 04  07EB231E   12000 Run  pv         (04) -
  967.  
  968. < hunks 07EA7EA8 <enter>
  969. > Nr    Hunk     Data         Size
  970. > ---------------------------------------------------------------------------
  971. >     0 07F0AD7C 07F0AD80    68628
  972. >     1 07EA8F44 07EA8F48     1256
  973. >     2 07EA1F5C 07EA1F60       48
  974. >     3 07EAE3AC 07EAE3B0     4572
  975. >     4 07EA677C 07EA6780      156
  976. >     5 07EA2124 07EA2128       28
  977. >     6 07EA681C 07EA6820      228
  978. >     7 07E280DC 07E280E0        8
  979.  
  980. You can ask the ¹pathname for a lock with the 'pathname' command. Note that
  981. you MUST use normal pointers for the 'pathname' command. The result from
  982. the AmigaDOS 'Lock' function is a ¹BPTR. You must convert this BPTR to
  983. an APTR.
  984.  
  985. You can use the 'libinfo' command to ask information about a
  986. ²library function in an fd-file you have loaded (see the 'Fd-File' tutorial
  987. for more information).
  988.  
  989. Use the 'llist' command to ³traverse a list with nodes. The argument to
  990. this command is a node. 'llist' will then follow the ln_Succ field in this
  991. node for all other nodes. It will display the addresses to these nodes :
  992.  
  993. < task <enter>
  994.  
  995. < llist df0 <enter>
  996. > Node name           : Node     Pri
  997. > ---------------------------------------------------------------------------
  998. > Work                : 07E189B0 0A
  999. > Workbench           : 07E34018 01
  1000. > input.device        : 07E08B22 14
  1001. > RAM                 : 07E23BF8 0A
  1002.  
  1003. Use the 'owner' command if you want to know the ¹owner of a piece of memory.
  1004. This command tries the best it can to find the owner. At this moment only
  1005. the 'task' list is searched.
  1006.  
  1007. < list task <enter>
  1008. > Task node name      : Node     Pri StackPtr  StackS Stat Command         Acc
  1009. > -----------------------------------------------------------------------------
  1010. > Background Process  : 07E45D88 00  07E571A8    4096 Rdy  clock      (04) -
  1011. > Background Process  : 07E28330 00  07E2D500    4096 Wait iprefs     (02) -
  1012. > RexxMaster          : 07E51410 04  07E51C52    2048 Wait            (00) -
  1013. > PowerSnap 1.0 by Nic: 07E43588 05  07E43DD2    2000 Wait            PROC -
  1014. > ...
  1015. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  1016. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  1017. > Background Process  : 07E1F7C8 04  07E8C216   12000 Run  pv         (01) -
  1018.  
  1019. < owner 07E51C52 <enter>
  1020. > Found in stack
  1021. > RexxMaster          : 07E51410 04  07E51C52    2048 Wait            (00) -
  1022.  
  1023. ================== Commands for MMU and other processors =====================
  1024.  
  1025. If you have an 68020, 68030 or 68040 you can use some extra commands.
  1026.  
  1027. You can use the 'specregs' command to view all ³special 680x0 registers :
  1028.  
  1029. < specregs <enter>
  1030. > MSP  : 560F5B16
  1031. > ISP  : 07E02228
  1032. > USP  : 07E8C304
  1033. > SFC  : 00000007
  1034. > DFC  : 00000007
  1035. > VBR  : 00000000
  1036. > CACR : 00002111
  1037. >    Write Allocate set
  1038. >    Disable Data Burst
  1039. >    Clear Data Cache not set
  1040. >    Clear Entry in Data Cache not set
  1041. >    Freeze Data Cache not set
  1042. >    Enable Data Cache
  1043. >    Enable Instruction Burst
  1044. >    Clear Instruction Cache not set
  1045. >    Clear Entry in Instruction Cache not set
  1046. >    Freeze Instruction Cache not set
  1047. >    Enable Instruction Cache
  1048. > CAAR : B8F77BED
  1049.  
  1050. For all following commands you need a ¹MMU. This means that you either
  1051. must have an ¹68851 or an 68030.
  1052. At this moment I have not tested PowerVisor on an ¹68040 processor. I suspect
  1053. there could be some problems. Especially the 'mmutree' and 'mmureset'
  1054. commands can cause problems on this new processor.
  1055.  
  1056. Also the 'mmureset' and 'mmutree' commands do not support everything from
  1057. the ¹68030 mmu. I suspect this is the reason that these commands perform
  1058. an infinite loop in ²AmigaDOS 1.3 on an ²Amiga 3000.
  1059.  
  1060. I have also not been able to test these commands on a computer other
  1061. than the Amiga 3000.
  1062.  
  1063. Use the 'mmuregs' command to view all ²mmu registers (registers extra in
  1064. the 68851 processor are not printed) :
  1065.  
  1066. < mmuregs <enter>
  1067. > CRP  : 000F0002   07FFF140
  1068. >    L/U bit is cleared
  1069. >    LIMIT = 0000000F
  1070. >    DT    = Valid 4 byte
  1071. >    Table address = 07FFF140
  1072. > SRP  : 80000001   00000000
  1073. >    L/U bit is set
  1074. >    LIMIT = 00000000
  1075. >    DT    = Page descriptor
  1076. >    Table address = 00000000
  1077. > TC   : 80F08630
  1078. >    Enable address translation
  1079. >    Disable Supervisor Root Pointer (SRP)
  1080. >    Disable Function Code Lookup (FCL)
  1081. >    System page size    = FFFF8000
  1082. >    Initial shift       = 00000000
  1083. >    Table Index A (TIA) = 00000008
  1084. >    Table Index B (TIB) = 00000006
  1085. >    Table Index C (TIC) = 00000003
  1086. >    Table Index D (TID) = 00000000
  1087. > TT0  : 04038207
  1088. >    Log Address Base = 00000004
  1089. >    Log Address Mask = 00000003
  1090. >    TT register enabled
  1091. >    No Cache Inhibit
  1092. >    R/W set
  1093. >    RWM cleared
  1094. >    FC value for TT block = 00000000
  1095. >    FC bits to be ignored = 00000007
  1096. > TT1  : 403F8107
  1097. >    Log Address Base = 00000040
  1098. >    Log Address Mask = 0000003F
  1099. >    TT register enabled
  1100. >    No Cache Inhibit
  1101. >    R/W cleared
  1102. >    RWM set
  1103. >    FC value for TT block = 00000000
  1104. >    FC bits to be ignored = 00000007
  1105.  
  1106. With the 'mmutree' command you can view the current mmu tree :
  1107.  
  1108. < mmutree <enter>
  1109. > 00000000   4 BYTE (imuw)  Log: 00000000 # 00000000
  1110. > 07FFF140      4 BYTE (imUw)  Log: 00000000 # 01000000
  1111. > 07FFF180         PAGE   (IMUw)  Log: 00000000 # 00040000  -> 00000000
  1112. > ...
  1113. > 07FFF274         PAGE   (iMUw)  Log: 00F40000 # 00040000  -> 00F40000
  1114. > 07FFF278         PAGE   (iMUW)  Log: 00F80000 # 00040000  -> 07F80000
  1115. > 07FFF27C         PAGE   (iMUW)  Log: 00FC0000 # 00040000  -> 07FC0000
  1116. > 07FFF144      PAGE   (iMUw)  Log: 01000000 # 01000000  -> 01000000
  1117. > 07FFF148      PAGE   (iMUw)  Log: 02000000 # 01000000  -> 02000000
  1118. > 07FFF14C      PAGE   (iMUw)  Log: 03000000 # 01000000  -> 03000000
  1119. > 07FFF150      PAGE   (iMUw)  Log: 04000000 # 01000000  -> 04000000
  1120. > 07FFF154      PAGE   (iMUw)  Log: 05000000 # 01000000  -> 05000000
  1121. > 07FFF158      PAGE   (iMUw)  Log: 06000000 # 01000000  -> 06000000
  1122. > 07FFF15C      4 BYTE (imUw)  Log: 07000000 # 01000000
  1123. > 07FFF280         INV    (imuw)  Log: 07000000 # 00040000
  1124. > ...
  1125. > 07FFF34C         INV    (imuw)  Log: 07CC0000 # 00040000
  1126. > 07FFF350         PAGE   (iMUw)  Log: 07D00000 # 00040000  -> 07D00000
  1127. > 07FFF354         INV    (imuw)  Log: 07D40000 # 00040000
  1128. > 07FFF358         INV    (imuw)  Log: 07D80000 # 00040000
  1129. > 07FFF35C         INV    (imuw)  Log: 07DC0000 # 00040000
  1130. > 07FFF360         PAGE   (iMUw)  Log: 07E00000 # 00040000  -> 07E00000
  1131. > 07FFF364         PAGE   (iMUw)  Log: 07E40000 # 00040000  -> 07E40000
  1132. > 07FFF368         PAGE   (iMUw)  Log: 07E80000 # 00040000  -> 07E80000
  1133. > 07FFF36C         PAGE   (iMUw)  Log: 07EC0000 # 00040000  -> 07EC0000
  1134. > 07FFF370         PAGE   (iMUw)  Log: 07F00000 # 00040000  -> 07F00000
  1135. > 07FFF374         PAGE   (iMUw)  Log: 07F40000 # 00040000  -> 07F40000
  1136. > 07FFF378         PAGE   (iMUW)  Log: 07F80000 # 00040000  -> 07F80000
  1137. > 07FFF37C         PAGE   (iMUW)  Log: 07FC0000 # 00040000  -> 07FC0000
  1138. > 07FFF160      PAGE   (iMUw)  Log: 08000000 # 01000000  -> 08000000
  1139. > 07FFF164      PAGE   (iMUw)  Log: 09000000 # 01000000  -> 09000000
  1140. > 07FFF168      PAGE   (iMUw)  Log: 0A000000 # 01000000  -> 0A000000
  1141. > 07FFF16C      PAGE   (iMUw)  Log: 0B000000 # 01000000  -> 0B000000
  1142. > 07FFF170      PAGE   (iMUw)  Log: 0C000000 # 01000000  -> 0C000000
  1143. > 07FFF174      PAGE   (iMUw)  Log: 0D000000 # 01000000  -> 0D000000
  1144. > 07FFF178      PAGE   (iMUw)  Log: 0E000000 # 01000000  -> 0E000000
  1145.  
  1146. With the 'mmureset' command you can reset the 'M' and 'U' bits in this
  1147. tree. So you can see which pages are used and modified.
  1148.