home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / i / i_and_c.zip / MANUAL.I&C < prev    next >
Text File  |  1989-10-05  |  15KB  |  316 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                                      I&C - The Manual
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. I&C and IOPORT are copyright 1989 by R. A. Gramann.  No portion of this document or its
  36. accompanying programs may be reproduced without the written permission of R. A. Gramann.
  37.                                      Table of Contents
  38.  
  39. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
  40.  
  41. Copyright and plea for money . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
  42.  
  43. Advantages of Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
  44.  
  45. Invocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  46.  
  47. Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   3
  48.  
  49. I&C Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
  50.       To Exit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
  51.       Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  52.       Snap (Breakpoint). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  53.  
  54. IOPORT Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   6
  55.  
  56. Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   7
  57.  
  58.  
  59. Introduction
  60.  
  61. I&C (short for Inspect and Change) is a Terminate-and-Stay-Resident (TSR) debugger.  It is
  62. a TSR, and unlike DEBUG and CodeView, it can be used to debug TSR programs as they operate. 
  63. Operating off of a hot key, it provides the following capabilities:
  64.  
  65.       1.  Memory inspection.
  66.       2.  Memory modification.
  67.       3.  Instruction breakpoint (snap) with data collection.
  68.  
  69. IOPORT, included with this package allows port input and output off of a hot key.
  70.  
  71. Unlike the standard DEBUG, this package allows you to interrupt processing at any time and
  72. to put a breakpoint in resident code.  While it is crude (it requires the use of an assembly
  73. level listing), it is simple to operate and can be used together with higher level debuggers.
  74.  
  75.  
  76. Copyright and plea for money
  77.  
  78. I&C and IOPORT are copyright 1989 by R. A. Gramann.  If you find these programs useful,
  79. please register them by sending $22.00 to:
  80.  
  81.       R. A. Gramann
  82.       122 Laurel Ave.
  83.       Fredericksburg, Va.  22401
  84.  
  85.  
  86. Advantages of Registration
  87.  
  88. These are the advantages of being a registered owner of this software:
  89.  
  90.       1.  You get the satisfaction of knowing that you have paid for what you are using. 
  91.       I get some return on my effort to create this program and the pleasure of knowing that
  92.       someone is using one of my programs.
  93.  
  94.       2.  I will send you a disk containing the latest version of I&C and IOPORT as well as
  95.       the source code for these programs.
  96.  
  97.       3.  The disk will also contain source code for the shell of a TSR hot-key driven
  98.       program.  Supply the guts of this program to do whatever you want to do off of a hot
  99.       key.
  100.  
  101. Invocation
  102.  
  103. To start I&C:
  104.  
  105. Make sure that I&C.COM is in the current path.  Then type I&C at the DOS prompt as shown
  106. below.  I&C responds with the invocation message shown below identifying the hot key and
  107. stating the copyright.
  108.  
  109.  ┌──────────────────────────────────────────────────────────────┐ 
  110.  │C:\->i&c                                                      │
  111.  │                                                              │ 
  112.  │   I&C Installed.  Hit <Ctrl><Alt> L to invoke I&C routine.   │
  113.  │   I&C copyright 1989 by R.A. Gramann                         │
  114.  │C:\->                                                         │  
  115.  └──────────────────────────────────────────────────────────────┘              
  116. When invoked this way, operation of the I&C is inhibited while disk operations are taking
  117. place.  If for some reason you want to be able to interrupt disk operations and risk wrecking
  118. the FAT on the disk you may be writing to as well as any data you may be writing, invoke I&C
  119. with /D as an argument.  That is at the DOS prompt, type:  I&C /D.  If you use I&C in this
  120. mode, you risk destroying any disk you are writing to if you activate the hot key while you
  121. are writing to a disk.  
  122.                         
  123. To start IOPORT:
  124.  
  125. Make sure that IOPORT.COM is in the current path.  Type IOPORT at the DOS prompt.  IOPORT
  126. responds with the invocation message shown below identifying the hot key and stating the
  127. copyright.  As stated above for I&C, to allow hot key interruptions during disk accesses,
  128. start IOPORT with the /D argument:  
  129.   IOPORT /D
  130. This permits you to destroy your disk as described above.
  131.  
  132.  ┌─────────────────────────────────────────────────────────────┐  
  133.  │   C:\MASM->ioport                                           │
  134.  │                                                             │
  135.  │ IOPORT Installed.  Hit <Ctrl><Alt> I to invoke I/O routine. │
  136.  │ IOPORT copyright 1989 by R.A. Gramann                       │
  137.  │ C:\MASM->                                                   │ 
  138.  └─────────────────────────────────────────────────────────────┘  
  139.  
  140.  
  141. Operation
  142.  
  143. Note:
  144.  
  145. If you plan to use CodeView after you have loaded I&C or IOPORT, you may need to invoke
  146. CodeView with the /S (screen swapping) option in order to get the I&C or IOPORT display
  147. screen when the hot key is activated.
  148.  
  149.  
  150. I&C Operation
  151.  
  152. To access I&C at any time, hit <Ctrl><Alt> L together at any time.  Please note that if you
  153. have uninhibited the disk operation lockout, that hitting this key combination will a disk
  154. operation is occurring will probably destroy that operation in sometimes unpredictable ways. 
  155. (If the disk operation lockout is active, hitting these keys during a disk operation will
  156. have no effect.  You'll have to wait until the disk operation is over and try again.)
  157.  
  158.  
  159. To Exit
  160.  
  161. To exit I&C, hit <esc> at any time
  162.  
  163.  
  164. More on Operation
  165.  
  166.  
  167. When I&C is accessed, the screen shown below is displayed.  (The original screen is saved,
  168. to be restored when you exit I&C.)  Operation of I&C is possible in graphics modes since it
  169. writes to the screen through BIOS services, but the original graphics screens are not
  170. properly saved and will not be properly restored upon exit of I&C.
  171.  
  172. ┌─────────────────────────────────────────────────────────────────────────┐
  173. │  CS=0183  IP=1C95                                                       │
  174. │                                                                         │
  175. │  Segment  Length  Program                                               │
  176. │     09C6   00CA0  COMMAND.COM                                           │
  177. │     0A91   00030  unused                                                │
  178. │     0A95   00180  This block belongs to a program listed above.         │
  179. │     0AB4   007B0  C:\VIDEO.COM                                          │
  180. │     0B32   00630  c:\util\INSTALL.COM                                   │
  181. │     0B97   007F0  c:\util\DOSEDIT.COM                                   │
  182. │     0C1B   02B50  C:\MASM\I&C.COM                                       │
  183. │     0EC9   00060  unused                                                │
  184. │     0ED1   01420  C:\UTIL\CAPTURE.COM                                   │
  185. │  0000:0000 =   3F                                                       │
  186. │  Enter (B)yte, (W)ord, New (A)ddress, (N)ext, (P)revious, (C)hange, or  │
  187. │  (R)epeat, (S)nap, (D)einstall snap:                                    │
  188. │                                                                         │
  189. └─────────────────────────────────────────────────────────────────────────┘
  190.                                         I&C Screen
  191.  
  192. The code segment and instruction pointer at time of interrupt are shown.  This can be helpful
  193. if you suspect you are in an infinite loop when you interrupt your program.  You can see
  194. where you are.
  195.  
  196. A map of memory follows showing the segment address, the length of each program in bytes,
  197. and the program name as shown in its environment block.  Where the program name is not found
  198. within the block, I&C assumes that it belongs to a previously loaded program and prints the
  199. message: "This block belongs to a program listed above."  As you use I&C this map will scroll
  200. upward off of the screen but it can be recalled at any time by exiting (hit <esc>) and
  201. reactivating I&C (hit <Ctrl> <Alt> L).
  202.  
  203. The address of the program block shown is the address of the Program Segment Prefix preceding
  204. the program.  The programs executable code begins 100h bytes past this address.  
  205.  
  206. After the memory map is the currently open inspect and change address.  The letter in
  207. parenthesis indicates the command letter for the listed action.  I&C is case insensitive for
  208. both command letter and hex number entries.  The Byte and Word command affect display format. 
  209. (Remember that with the 8086 class of processors that the least significant bits are in the
  210. byte with the lowest address.  When you display in word format, I&C puts the most significant
  211. byte first so that a true 16-bit value is displayed.  That's why the byte order seems to
  212. reverse when you change formats.)  
  213.  
  214.  
  215. Commands
  216.  
  217. The New Address, Next, and Previous commands affect the current open address.  Next and
  218. Previous immediately move to the indicated word or byte, depending on the format.  New
  219. Address prompts for the entry of a new segment and address in hex format.  The new segment
  220. entry is optional.  If no segment is entered, the last used segment is the one that is
  221. active.  If a segment is entered, a colon must separate the segment from the relative
  222. address.  Free form entries are permitted for any numerical entry.  Up to 4 hex digits per
  223. segment, address, or content value are permitted.  Leading zeroes are not required to fill
  224. unused digit spaces.  Letter entries are honored in both upper and lower case.
  225.  
  226. The Change command permits a byte or word, depending on the format. entry into the currently
  227. open address.  It prompts for the new contents.  Either 2 or 4 digits will be accepted
  228. according to the format.
  229.  
  230. Repeat simply redisplays the currently open cell.
  231.  
  232.  
  233. Snap (Breakpoint)
  234.  
  235. The Snap and Deinstall Snap commands control the breakpoint.  Snap prompts for the segment
  236. and address of an instruction at which execution is to pause.  The rules for segment and
  237. address entry are the same as for the New Address command.  Please note that if the address
  238. you enter is not the first byte of an executable instruction, you will witness unpredictable
  239. results as program execution passes through the address entered.  A Snap in a ROM area will
  240. not operate since instructions in ROM cannot be replaced with a breakpoint instruction.  I&C
  241. Snap does not get along with breakpoints installed in other debuggers.  Please do not try
  242. to use I&C and DEBUG breakpoints together.  Use I&C breakpoints for your interrupt
  243. processors.  DEBUG won't work well with interrupt processor breakpoints.  If you're not
  244. debugging a TSR or a resident interrupt processor, you'll probably want to use DEBUG or
  245. Codeview or some other wraparound debugger with more features than I&C.
  246.  
  247. When you set the snap address to an executable instruction, the screen shown below appears
  248. when that instruction is executed.
  249.  
  250. ┌────────────────────────────────────────────────────────────────────────┐
  251. │                                                                        │
  252. │ AX=0224  BX=0007  CX=0001  DX=0322  SP=09B6  BP=000C  SI=0FA0  DI=13E9 │
  253. │ DS=0EDA  ES=0183  SS=0183  CS=0EDA  IP=023D  NV UP EI PL ZR NA PE NC   │
  254. │ 0EDA:023D                                                              │
  255. │ Enter <esc> to continue, anything else for I&C.                        │
  256. │                                                                        │
  257. └────────────────────────────────────────────────────────────────────────┘
  258.                                         Snap screen
  259.  
  260. where the flags are displayed as follows:
  261.  
  262. OV = Overflow set,            NV = Overflow clear
  263. DN = Direction down,          UP = Direction up
  264. EI = Interrupt enabled,       DI = Interrupt disabled
  265. NG = Sign negative,           PL = Sign plus
  266. ZR = Zero,                    NZ = No zero
  267. AC = Auxiliary carry,         NA = No Auxiliary carry
  268. PE = Parity Even.             PO = Parity Odd
  269. CY = Carry,                   NC = No carry
  270.  
  271.  
  272. The contents of the registers, the flag states, and the current snap address are displayed. 
  273. <esc> continues program execution but does not reset the snap address.  Hitting any other
  274. key displays the regular I&C screen from which any address can be inspected or modified and
  275. from which another snap or the same snap address can be entered.  To repeat the same snap,
  276. or to set up another snap in the same segment, only the lower part of the address must be
  277. entered.  The segment address will not change unless you change it.
  278.  
  279.  
  280. IOPORT Operation
  281.  
  282. To access IOPORT at any time, hit <Ctrl><Alt> I together at any time.  Please note that if
  283. you have uninhibited the disk operation lockout, that hitting this key combination will a
  284. disk operation is occurring will probably destroy that operation in sometimes unpredictable
  285. ways.  (If the disk operation lockout is active, hitting these keys during a disk operation
  286. will have no effect.  You'll have to wait until the disk operation is over and try again.)
  287.  
  288. IOPORT will save your current screen and prompt you to enter W or B for word or byte
  289. Input/output (IO).  Note that Word IO has no meaning if you are not communicating with a 16
  290. bit port.  It will then prompt you for a port number.  Enter a hex port number.  It will then
  291. ask if you want an input or an output operation.  If you reply with I for input, the
  292. requested port will be read and the result will be displayed.  If you reply O for output,
  293. it will prompt you for the byte or word to be output.  Once your entry is finished, an output
  294. operation will be performed on the specified port.  
  295.  
  296. You can hit <esc> at any time to exit IOPORT, or at the end of any operation, strike any key
  297. as prompted to go around again.  
  298.  
  299. Note:  If you are trying to output to the printer to test this, remember that printer output
  300. is a 3 step operation.  1) Output the character to print to the printer base port.  2)  Set
  301. the printer strobe high by outputting a hex D to the printer base port + 2.  3)  Restore the
  302. printer strobe by outputting a hex C to the printer base port + 2.  (The printer strobe is
  303. bit 0 of the second port past the printer base port.)
  304.  
  305.  
  306. Summary
  307.  
  308. That's all there is to operating I&C and IOPORT.  In short, invoke the COM files and follow
  309. the prompts.  Good Luck.  I hope this program proves useful for you.  If it does, please
  310. remember to register.
  311.  
  312. If you are a registered user, please do not distribute the source code that you got in return
  313. for registration.  Also, please do not steal I&C or IOPORT and remarket it under any name. 
  314. If you want to use my code in a program for sale, we can negotiate a license very cheaply. 
  315. (The TSR shell is yours to use in any way that it helps you.  No license is required to use
  316. it in a marketable program.)