home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / demo / rscview.cpt / RSC_Viewer.Help < prev   
Encoding:
Text File  |  1992-02-11  |  21.5 KB  |  494 lines

  1.           +-------------------------------+
  2.           | Help panel for RSC_Viewer 6.3 |
  3.           +-------------------------------+
  4.  
  5.  
  6. ÑÑ USER╒S GUIDE
  7. ===============
  8.  
  9. The principle is as follows: after selecting a file, the application displays in the RSRC FILE WINDOW, the first resource available which type is the last specified (the default is CODE), and in dump or dissasemblage mode (the default is dump). If some symbols are available you can find them in the SYMBOLS WINDOW.
  10.  
  11. Then you can view the other resources by specifying their IDs (see Resource Table item in the Rsrc menu for the list of the available resources).
  12.  
  13. Each resource is shown by block of 512 bytes in dump mode, and by block of roughly 128 bytes otherwise. The vertical scrolling bar allows you to view the hidden part of the current block (the screen is generaly too short to display the entire block), whereas the horizontal scrolling bar allows you  to view the other blocks of the current resource.
  14.  
  15. To patch into a resource, use the Pach Mode item in the Rsrc menu,  and valid your modifications with the Write Block item. If you have made a mistake, the Restore Block item may be used.
  16.  
  17. Note: If you have modified the current block and you decide to quit the application or change the current block (there are many way to do this, see menu descriptions), all the modifications are lost. However if you have saved them, a dialog box appears asking you if you really want the changes to be permanent.
  18.  
  19. You can also save or print disassembled or dumped resources. This process can be cancelled at any time.
  20.  
  21. The other capabilities of this application are described menu by menu, in the next pages.
  22.  
  23.  
  24.  
  25. ÑÑ THE ASSEMBLER
  26. ================
  27.  
  28. In order to simplify the lines acquisition to be assembled, some useful features are provided:
  29.  
  30. Ñ   When you are in the mnemo zone, and you press the tab key, the cursor is moved at the beginning of the operands zone, and the characters between the old cursor location and the new one are replaced with white spaces.
  31.  
  32. Ñ   When you are in the operands zone, and you press the return key, the cursor is moved at the beginning of the mnemo zone of the next line, and the end of the previous line is filled with white spaces.
  33.  
  34. The symbol zone can be filled with the following symbols:
  35.  
  36. :w  start write-assembly at the corresponding address.
  37. :c  start check-assembly mode.
  38. :   end assembly (either mode).
  39. =w  write-assembly mode, one line.
  40. =c  check-assembly mode, one line.
  41. @i  label definition.
  42.  
  43. If you mix:w and:c  symbols, the last one will determine the mode (check or write).
  44.  
  45. There are a maximum of 10 labels available:  @1, @2, ╔, @9.
  46.  
  47. The DC instruction can be used with the .B, .W or .L suffix. When .B is used, If the number of characters is odd, the assembler adds a 0 at the end of the sequence, to be word boundary.
  48.  
  49. Possible DC sequences are:
  50.  
  51.   DC.B  ╘ascii string╒ (22 chars max. \0, etc allowed).
  52.   DC.W  <expr1>
  53.   DC.L  <expr1>
  54.   DC.L  ╘xxxx╒         (for Restype)
  55.  
  56.   expr1  :=: $value    (hexadecimal value)
  57.           |  -$value   (negative hexadecimal value)
  58.           |  value     (decimal value)
  59.           |  -value    (negative decimal value)
  60.  
  61. The operands zone contains the standard MC680xx operands. BE CAREFUL: no white space are authorized between the operands. If you insert even one, the parser will fail.
  62.  
  63. Note: complex expressions with a combination of +, -, * and / signs are not implemented yet.
  64.  
  65. Available instructions are:
  66.  
  67. Inst    B W L  Operands
  68. --------------------------------
  69. ABCD    x      Dy,Dx
  70.                -(Ay),-(Ax)
  71. ADDA      x x  ea,An
  72. ADDI    x x x  #expr4,ea
  73. ADDQ    x x x  #[1..8],ea
  74. ADD     x x x  ea <-> Dn
  75. ADDX    x x x  Dy,Dx
  76.                -(Ay),-(Ax)
  77. ANDI    x x x  #expr4,ea
  78. AND     x x x  ea <-> Dn
  79. ASd     x x x  Dx,Dy
  80.                #expr4,Dy
  81.                ea
  82. Bcc     x S x  *expr3
  83. BCHG    x   x  Dn,ea
  84.                #data,ea
  85. BCLR    x   x  Dn,ea
  86.                #data,ea
  87. BFCHG          ea,{#offset or Dn1:#width or Dn2}
  88. BFCLR          ea,{#offset or Dn1:#width or Dn2}
  89. BFEXTS         ea,{#offset or Dn1:#width or Dn2},Dn3
  90. BFEXTU         ea,{#offset or Dn1:#width or Dn2},Dn3
  91. BFFFO          ea,{#offset or Dn1:#width or Dn2},Dn3
  92. BFINS          ea,{#offset or Dn1:#width or Dn2}
  93. BFSET          ea,{#offset or Dn1:#width or Dn2}
  94. BFTST          ea,{#offset or Dn1:#width or Dn2}
  95. BKPT           #vector
  96. BRA     x S x  *expr3
  97. BSR     x S x  *expr3
  98. BSET    x   x  Dn,ea
  99.                #data,ea
  100. BTST    x   x  Dn,ea
  101.                #data,ea
  102. CAS2      x x  Dc1:Dc2,Du1:Du2,Rn1:Rn2
  103. CAS     x      Dc,Du,ea
  104. CALLM          #data,ea
  105. CHK2    x x x  ea,Rn
  106. CHK       x x  ea,Rn
  107. CLR     x x x  ea
  108. CMP2    x x x  ea,Rn
  109. CMPA      x x  ea,An
  110. CMPI    x x x  #expr4,ea
  111. CMP     x x x  ea,Dn
  112. CMPM    x x x  (Ay)+,(Ax)+
  113. DBcc2     x    Dn,*expr3
  114. DIVx      x x  ea,Dn
  115.                ea,Dr:Dq
  116. DIVxL3      x  ea,Dr:Dq
  117. EORI    x x x  #expr3,ea
  118. EOR     x x x  Dn,ea
  119. EXG         x  Dx,Dy
  120.                Ax,Ay
  121.                Dx,Ay
  122. EXT     x x
  123. EXTB        x
  124. ILLEGAL
  125. JMP            *expr3
  126. JSR            *expr3
  127. LEA         x  ea,An
  128. LINK      x x  An,#expr4
  129. LSd1    x x x  Dx,Dy
  130.                #expr4,Dy
  131.                ea
  132. MOVE    x x x  ea,ea
  133. MOVEA     x x  ea,An
  134. MOVEM     x x  <D0-D7/A0-A7> <-> ea
  135. MOVEQ       x  #data,Dn
  136. MOVES   x x x  ea <-> Dn
  137. MULx3     x x  ea,Dn
  138.                ea,Dh:Dl
  139. NBCD    x      ea
  140. NEG     x x x  ea
  141. NEGX    x x x  ea
  142. NOP
  143. NOT     x x x  ea
  144. OR      x x x  ea <-> Dn
  145. ORI     x x x  #expr4,ea
  146. PACK           -(Ax),-(Ay),#adjust
  147.                Dx,Dy,#adjust
  148. PEA         x  ea
  149. RESET
  150. ROd1    x x x  Dx,Dy
  151.                #data,Dy
  152.                ea
  153. ROXd1   x x x  Dx,Dy
  154.                #data,Dy
  155.                ea
  156. RTD            #displacement
  157. RTE
  158. RTM
  159. RTR
  160. RTS
  161. SBCD    x      Dx,Dy
  162.                -(Ax),-(Ay)
  163. Scc2    x      ea
  164. STOP           #data
  165. SUBA      x x  ea,An
  166. SUB     x x x  ea <-> Dn
  167. SUBI    x x x  #expr4,ea
  168. SUBQ    x x x  #data,ea
  169. SUBX    x x x  Dx,Dy
  170.                -(Ax),-(Ay)
  171. SWAP      x    Dn
  172. TAS     x      ea
  173. TRAP           #vector
  174. TRAPcc2   x x  #data
  175. TRAPV
  176. TST     x x x  ea
  177. UNLK           An
  178. UNPK           -(Ax),-(Ay),#adjust
  179.                Dx,Dy,#adjust
  180.  
  181. (1) 'd'  = R or L
  182. (2) 'cc' = [CCCSEQGEGTHILELSLTMINEPLVCVS]
  183. (3) 'x'  = S or U
  184.  
  185. If the assembly process fails, on each line where an error was detected, a rather obscur message is displayed. We give their meaning in the following lines:
  186.  
  187. BAD mnemo  : The mnemonic you enter is not a valid one.
  188. BAD operand: One or more operands is (are) wrong.
  189. BAD lab val: If not in the range 0..9, or is a name.
  190. LAB exists : Once defined, a label can╒t redeclare it.
  191. BAD lab ref: Try to reference a label not defined yet.
  192. BAD pc rel : rsrc ID is wrong, or disp. is out of range.
  193. BAD address: The address you give is not valid.
  194. BAD asm sym: The symbol you enter is not valid.
  195. ADD not set: You try to define a label out of a :: pairs.
  196. BAD trap   : Obvious.
  197. BAD assoc  : No match between the mnemonic and the operands.
  198. INS ignored: For instructions are thar not implemented.
  199. OPE is out : For an operand out of range.
  200.  
  201.  
  202.  
  203. ÑÑ WARRANTY
  204. ===========
  205.  
  206. No warranty, expressed or implied, is provided with RSC_Viewer. If you find a bug, let me know and I╒ll fix it.
  207.  
  208. Since this application manipulates resources, you can easily corrupt them. Thus, when using it, be careful to work on files copy. Otherwise, I am not responsible for any incidental or consequential losses resulting from its use or misuse.
  209.  
  210.  
  211.  
  212. ÑÑ BUG REPORTS
  213. ==============
  214.  
  215. Any questions or bug reports can be sent to the author at the following network address:
  216.  
  217.                                  iron@imag.fr
  218.  
  219.  
  220.  
  221. ÑÑ FILE MENU DESCRIPTION
  222. ========================
  223.  
  224. Ñ Open file
  225. -----------
  226. Presents a Standard File package box. The files which are listed have all a Type and a Creator specified in the filter dialog box (see Filter item). The default is APPL for Type and nothing for Creator.
  227.  
  228. The Filter╔ button presents a dialog box, in which you can specify a "File Type" and a "File Creator" for the filter procedure used by the Standard File Package. If you want any kind of "File Type", or "File Creator", put a blank or ???? value. In addition, you can choose the type of the resource you want to study.
  229.  
  230. Ñ Close
  231. -------
  232. Closes the front window (which can belong to the application or to a Desk Accesory).
  233.  
  234. Ñ Get File Rsrc List
  235. --------------------
  236. Presents a Standard File Package dialog box (with the same filter procedure as in Open item). Once you have chosen a file, a dialog box appears, displaying the list of all the resources available in that file.
  237.  
  238. You can choose a specific resource by selecting it and double-clicking in the list-window or by writing its name directly in the edit box (don't forget a resource type is four bytes long). The selected resource becomes the current File resource (see Filter dialog box).
  239.  
  240. Then the application opens the file and loads the required resources.
  241.  
  242. Ñ Get File Info
  243. ---------------
  244. Shows the main attributes (file creator, file type, etc) about the file you study. You are allowed to modify them. These attributs are System 7 compatible.
  245.  
  246. Ñ Get Rsrc List for this File
  247. -----------------------------
  248. Same as Get File Rsrc List item.
  249.  
  250. Ñ Get Info For This File
  251. ------------------------
  252. Same as Get File Info item. However you cannot modify them (the save button is disabled).
  253.  
  254. Ñ Save Block
  255. ------------
  256. Saves the current dumped or disassembled block. The first time you use this item, a standard file package box proposes a file name (<file name>.RSRC.Samp). Then, each time you save an other block, it is appended to that file. This item may be very useful if you need only to retrieve some pieces of resource(s).
  257.  
  258. Ñ Save resource
  259. ---------------
  260. Saves the dumped or disassembled resource. The default mode is save current resource. You can change this mode by selecting the Option item in the Misc menu.
  261.  
  262. Each time you use this item, a standard file package box asks for a file name, which will contain the dumped or disassembled resource(s) specified by the Option item.
  263.  
  264. The name of the save file is the concatenation of the current file and a suffix which characterize the set of resources saved:
  265.  
  266. <file name>.<ResType>.<id>  for an unique resource. <file name>.<ResType>.List for a list of rsrcs of the given type. <file name>.<ResType>.All   if all the rsrcs of the given type are saved.
  267.  
  268. Ñ Save Resource As Text
  269. -----------------------
  270. Saves the resource without formatting it. You can only save resources that do not belong to the ╘FSYM╒ resource i.e. resources that do not contain instructions. This item is really useful if you want to save the entire content of a ╘STR#╒ resources for example. It is an extension of the Copy As Text item in the menu Edit (see Edit Menu description for more information).
  271.  
  272. Ñ Preferences
  273. -------------
  274. This item allows the user to save:
  275.   Ñ The application╒s different windows current locations,
  276.   Ñ The default File Type and File Creator
  277.   Ñ The default resource type to load and its default mode.
  278.   Ñ Must the Standard File Package dialog box be open at startup ?
  279.  
  280. This setting will be take into account the next time you launch the RSC Viewer application.
  281.  
  282. Depending on what you set or unset the effects are very different:
  283.  
  284.     Ñ If you activate the checkbox of a window (see dialog box below), its current location is saved when you choose OK. Otherwise its default location is saved. Of course, when you open again RSC_Viewer, each window is displayed (if visible) at its saved location.
  285.  
  286.     Ñ The Default button restores the default position for all the windows (very useful when you switch from a Mac II to a Mac SE screen for exemple), the default File Type i.e. APPL, the default file Creator (none), the default resource type i.e. CODE, and the default mode i.e. dump.
  287.  
  288. Ñ Background Setting
  289. ---------------------
  290. As you can open up to nine windows, it is sometimes desirable to close those cumbersome windows that hide your screen, when you switch from RSC Viewer to an other application (under Multifinder).
  291.  
  292. However, it is also a good idea to keep at least one window visible, to quickly return to the RSC Viewer application.
  293.  
  294. This item allows you to configure the way your different windows will react to a context switch.
  295.  
  296. You can choose to hide all the windows on suspend event or all but the main one (the RSRC FILE WINDOW). The default setting is ╥save all but the main one╙. If you do not want to hide the windows, click into the corresponding check box.
  297.  
  298. Ñ Print
  299. -------
  300. by default, prints the entire current resource. You can change this default mode by using the Option item which allows you to specify which resource(s) and within which addresses range you want to print. It is possible to cancel a printing operation (default is the Cmd - ╒;╒ sequence, see the USEFUL FEATURES chapter if you want to change it).
  301.  
  302. Ñ Page set up
  303. -------------
  304. Classic╔
  305.  
  306. Ñ Quit
  307. ------
  308. Leaves the application.
  309.  
  310.  
  311.  
  312. ÑÑ EDIT MENU DESCRIPTION
  313. ========================
  314.  
  315. Only copy operations are possible in RSC_Viewer i.e. Cut and Paste operation won╒t work.
  316.  
  317. However the Cmd-C/V/X mechanism is fully available in dialogs (thus, for example, you can copy a trap name from the OS TRAPS WINDOW, and paste it in the find dialog box).
  318.  
  319. Ñ Undo
  320. ------
  321. Not implemented yet ! (in fact will never be implemented╔).
  322.  
  323. Ñ Cut
  324. -----
  325. You are not allowed to cut any pieces of resources.
  326.  
  327. Ñ Copy
  328. ------
  329. Nothing special to say.
  330.  
  331. Ñ Paste
  332. -------
  333. You are not allowed to paste anything into a resource. It is mostly for safety purpose (patching a resource is sufficiently dangerous not to introduce anymore problems) and data consistency purpose (for example it is difficult to prevent pasting some ASCII text fragments into the hexadecimal zone of a dumped resource).
  334.  
  335. Ñ Select All
  336. ------------
  337. Selects the content of the entire window. For the RSRC FILE WINDOW only the content of the current block is selected.
  338.  
  339. Ñ Copy As Text
  340. --------------
  341. As in dump mode, you get both hexadecimal and ASCII values, it is sometimes preferable to retrieve only the ASCII part (think about ╘STR#╒, or ╘STR ╒ resources for example).
  342.  
  343. The only restriction is that, whatever you select, the minimum you can copy is 16 bytes (i.e. the ASCII part of a line). Thus, in short, selecting even any one byte of a line, selects in fact the whole ASCII part of that line.
  344.  
  345. Ñ Switch Zone
  346. -------------
  347. If the cursor is in the hexadecimal part of a dumped line, then it goes to its corresponding position in the ASCII part  (and vice versa in the ASCII part). Seems very useful╔
  348.  
  349.  
  350.  
  351. ÑÑ RSRC MENU DESCRIPTION
  352. ========================
  353.  
  354. Ñ Resource Table
  355. ----------------
  356. Shows the list of all resources of a given type present in the file. For each resource its ID, its SIZE (in decimal) and its NAME (if available) is displayed. There is also a summary which gives the total number of available resources and their total sizes.  If you want to view a particular resource, you can select it directly by simply double-clicking the corresponding line. In addition you can choose in which mode you want to see it (dumped or disassembled).
  357.  
  358. When the resource is of type CODE, this option shows the main entry point of the application. Unfortunately, some jump tables are not standard, and in which case it is impossible to give the correct entry point. You can however find it, by disassembling the jump table at address $00000010.
  359.  
  360. Ñ Show Current Rsrc
  361. -------------------
  362. Allows the window which contains the current resource (FILE RSRC WINDOW) to become the front window.
  363.  
  364. Ñ Symbol Table
  365. --------------
  366. Allows the window which contains the list of symbol names (SYMBOLS WINDOW) to become the front window. If the window is not visible, then it is first displayed.
  367.  
  368. Ñ Get Attributes
  369. ----------------
  370. Displays the attributes of the current resource. It is possible to modify all items but the resChanged and resInHeap attributes (for obvious reasons). If you set the resProtected bit on and if you have modified the current block, you won╒t be authorized to save it. In addition, if you are in Pach Mode, this mode becomes disabled.
  371.  
  372. Ñ Change Resource
  373. -----------------
  374. Changes the current resource ID. You can enter the resource ID in hexadecimal (HexVal checkbox active), or in decimal (HexVal checkbox inactive). In addition, you can choose to disassemble the resource (Dump checkbox inactive) or to dump it (Dump checkbox active).
  375.  
  376. For more convenience, it is also possible to change the default address where the application jumps for a new resource.
  377.  
  378. If the current block has been modified and saved, the following dialog box is displayed:
  379.  
  380. If you choose OK, you change the current resource (so the modifications are permanent, and the Restore Block item is disabled), otherwise you remain in the same resource, and you still have the possibility to use the Restore Block item.
  381.  
  382. This dialog box will appear as soon as you decide to leave a block that is modified and saved. The actions that can trigger this dialog are: changing the current address (menu com-mands, click in the horizontal scroll bar), changing the current resource (id), switching from dump mode to disassemblage mode, and leaving the application.
  383.  
  384. Ñ Change Address
  385. ----------------
  386. Use it, when you want to select a new address within the current resource.
  387.  
  388. The behaviour of this dialog is the same as in change resource item.
  389.  
  390. Ñ Dump mode
  391. -----------
  392. Allows you to switch between dump and disassemblage mode within the current resource.
  393.  
  394. Ñ Patch mode
  395. ------------
  396. Enters/leaves the patch mode, which allows you to write into resources. Be careful...
  397.  
  398. If patching is allowed, a ** Patch ** menu appears (it is an empty one and it is only for information purpose).
  399.  
  400. Ñ Write block
  401. -------------
  402. Writes the current block into the current resource.
  403.  
  404. Note: if you change the current block or the current resource before saving it, all the modifications are lost i.e. the resource is not changed.
  405.  
  406. Ñ Restore Block
  407. ---------------
  408. Restores the old values (those before the write operation).
  409.  
  410.  
  411.  
  412. ÑÑ MISC MENU DESCRIPTION
  413. ========================
  414.  
  415. Ñ Options
  416. ---------
  417. Allows you to change the default mode for finding strings and printring or saving resour-ces. You can select the addresses range, and the resource IDs range (of course, resource IDs must be valid ones).
  418.  
  419. The Default button restores the default values i.e. actions occur within the current resource, from its beginning to its end. Note: Each time you select a new resource, the options are set to their default values.
  420.  
  421. Ñ Magic Return
  422. --------------
  423. Each time you call Change resource, Change address or each time you select an address or a symbol by double-clicking, the previous address (offset[rsrc number]) is recorded in a LIFO stack.
  424.  
  425. This stack is able to store ten different addresses. Thus choosing Magic Return allow you to return to previous addresses within the limit of the ten stored adresses in the stack.
  426.  
  427. This item is very useful when there is a JSR instruction somewhere in a resource and you want to see the corresponding code, but you don't want to loose the address where the JSR was.
  428.  
  429. Ñ Mini Calc
  430. -----------
  431. Emulates a mini calculator in hexadecimal and/or decimal mode. This calculator is word or long-word oriented (a byte is interpreted as a word). The available operators are:
  432.  
  433.     Ñ [two operands]             : + (ADD), - (SUB), * (MUL), / (DIV), % (MOD),
  434.     Ñ [two operands]             : | (OR), & (AND), > (ASR), < (ASL), ^ (XOR),
  435.     Ñ [one operand (the top one)]: ~ (NOT), = (EQU).
  436.  
  437. The = operator is useful to convert number (decimal to hexadecimal or hexadecimal to decimal conversion).
  438.  
  439. Ñ Show Global Variables
  440. -----------------------
  441. Allows the window which contains the list of global variables (GLOBAL VARIABLES WINDOW) to become the front window. If the window is not visible, then it is first displayed.
  442.  
  443. If you want to view a low memory address, you can do it simply by pressing the command key and double-clicking on the address part ($xxx:size).
  444.  
  445. Ñ Show Toolbox Traps
  446. --------------------
  447. Allows the window which contains the list of toolbox traps (TOOLBOX TRAPS WINDOW) to become the front window. If the window is not visible, then it is first displayed.
  448.  
  449. Ñ Show OS Traps
  450. ---------------
  451. Allows the window which contains the list of OS traps (OS TRAPS WINDOW) to become the front window. If the window is not visible, then it is first displayed.
  452.  
  453. Ñ Available Memory
  454. ------------------
  455. Allows the window which contains the value (in Kbytes) of the free memory (AVAI-LABLE MEMORY WINDOW) to become the front window. If the window is not visible, then it is first displayed.
  456.  
  457.  
  458.  
  459. ÑÑ SEARCH MENU DESCRIPTION
  460. ==========================
  461.  
  462. Ñ String
  463. --------
  464. If you choose the ASCII checkbox, the string is interpreted as an ASCII one, otherwise it is interpreted as an hexadecimal value, and in that case, you can find a word (two bytes) or a long (four bytes).
  465.  
  466. Ñ Trap
  467. ------
  468. Trap name search (always in ASCII mode). It is possible to search for a trap with some bits set (bit 9 and 10 for OS-traps and bit 10 for TB-traps, see examples).
  469.  
  470.     NewHandle,CLEAR, NewHandle,CLEAR,SYS, GetTrapAddress,NEWTOOL, etc
  471.  
  472. Ñ Next
  473. ------
  474. As soon as a search string or a trap string is defined, this item becomes available. But if you change the current window, it is disabled since the search parameters are no longer valid.
  475.  
  476.  
  477.  
  478. ÑÑ MC680XX MENU DESCRIPTION
  479. ===========================
  480.  
  481. Ñ Show Format
  482. -------------
  483. Allows the window which contains the 680xx format to become the front window. If the window is not visible, then it is first displayed.
  484.  
  485. This panel is very useful, if you want to build an instruction on the fly (good luck!). Assuming you know its internal representation, see Codeop window for some examples.
  486.  
  487. Ñ Show Operation
  488. ----------------
  489. Allows the window which contains the 680xx operation to become the front window. If the window is not visible, then it is first displayed.
  490.  
  491. Ñ Show Codeop
  492. -------------
  493. Allows the window which contains some 68000 instructions to become the front window. If the window is not visible, then it is first displayed. Update it if you need.
  494.