;;01-11-87 SRW V 1.50 12/31/87 Eric Gans French Department, UCLA Los Angeles, CA 90024 Version 1.50 Allows 5-digit addresses for files (up to 1 megabyte). Adds online syntax help. Version 1.43 Fixed a bug that appeared in certain versions of v1.42. Version 1.42 Improvement: added 2-byte BIOS address for irregular systems that don't have the BIOS jump table on a page boundary. This will also allow you to run SRW using "R" in Wordstar, in case you ever wanted to do such a thing. Fix: bug that forgot to add in reserved tracks in calculating maximum track number. (Thanks to faithful SRW user Helmut Wilck for this one!) ***** SRW is just about the most practical, versatile and powerful disk/memory utility available for CP/M. SRW can access all data either on disk or in RAM. The different options allow the user to read the disk directory, a track, an allocation block, a disk file or the memory, and to search/write strings in both hex and ascii. The Jump command allows rapid movement around the disk/memory. For speed and convenience, prompts have been reduced to a minimum, but online help is now (1.50) available if you forget the command syntax. Instructions SRW can be called with or without an operand: srw or srw . If invoked alone, the program prompts you for the command line. COMMAND MODE The command line formats are: (B)lock: bd:hhh (d = drive, hhh = allocation block number in HEX) Example: srw ba:3f (drive A, block 3F) (D)irectory: d[dr] (dr is the drive; default=current). This function puts you at the start of the disk directory in track mode. Examples: srw d srw dc (drive C) (F)ile: f[du:]ufn (Current drive/user need not be entered.) Examples: srw fa11:blurk.com | srw f0:zap.dat | srw fu (Accesses a file named "U" in the current drive/user area.) (H)elp: Help on command-mode syntax (M)emory: mhhhh (hhhh = memory address in HEX) In order to simplify the display, the last digit will be set to 0; thus mffff will have the same effect as mfff0. Example: srw ma000 (T)rack: td:nnn (d = drive, nnn = track number in DECIMAL) Example: srw tc:11 (drive C, track 11) (E)xit: e Returns to CP/M (no warm boot). The D, M, B, T and F commands produce an immediate dump of the first sector/page of the block, track, file, or memory address selected. OPERATION MODE The options in operation mode are: D = (D)ump current sector/memory page N = dump (N)ext sector/memory page B = (B)ack one sector/page (N or B will not take you out of a Block or a File; this does not apply to Memory or Track reads.) J = (J)ump This command must be followed by an address: Track: Jnn (nn = absolute sector number in DECIMAL) On track 33, J63 will put you in sector # 63 of that track (if it has that many). Sector numbers in tracks/blocks begin with 0. Block: Jnn (nn = block-relative sector number in DECIMAL) If the block has 32 sectors then J0 goes to the first and J31 to the last. File: Jhhhhh (hhhhh = file address) Even for files of over 64 K, this address is based on an offset of 100h. Version 1.50 will address files of up to 1 megabyte (100000H) in length. Memory: Jhhhh (hhhh = memory address) S = (S)earch This function permits a search of up to 80 ascii/hex characters. Format: Hex bytes must be separated by commas, ascii enclosed in quotes. Commas before/after quotes are not strictly necessary, although you should use them. Examples: Scd,5,0 S"blurk"20"ZAP",d,a,27,"="45,45 The search function terminates if the string is found, or if the end of the file, block or memory is reached. To facilitate directory searches, it will go four tracks in track mode before giving up. C = (C)ontinue search Searches for the next occurrence of the same string. This function remains active until the search is unsuccessful or a new search is called. W = (W)rite You must enter a starting address: Memory: 1-byte address (0-FFH) File: Either 7 or 8 bits: D7 will be treated the same way as 57. Other modes: 7-bit sector address (0-7FH) As a check, SRW will output the present byte value. Strings to write follow the same format as for the search function. Nothing will be written beyond the current sector/page. Example: >W3f ;you enter this (3FH = sector/page address) >W3f = E5 >>? ;enter the string to write at the "?" >W type a to end F = (F)ile information This function operates only in file mode; it gives the "next address" (1 byte more than the last address of the file) and the number of sectors. This information is also given at the outset when the "F" command is given in command mode. R = (R)eturn to command mode H = (H)elp on operation-mode syntax E = (E)xit to CP/M ***************************************************************** Notes: 1. The Track function will continue on to the next track; if you want to step through the disk without returning to command mode, find out the number of sectors/track and do a J to the last sector followed by an N to get you to the beginning of the next track. 2. The Search function distinguishes between upper and lower case. 3. If a disk write has occurred, on exit the logged drives will be reset. 4. This program makes use of the Disk Parameter Block and (v1.40) SECTRAN and should thus be portable to all CP/M machines. It assumes that sectors/track is a one-byte number (< 256); are there any disks out there with 300 sectors per track?? The File function assumes that an E5 in the area reserved for the filename, (as opposed to the E5 that stands for erasure of a file) indicates the end of the directory. This saves searching four tracks of a hard disk that has only a few files, since CP/M always writes to the directory from the bottom up. If, however, something has gone wrong, or you have formatted one track in the middle of your directory, the program won't find all your files. Either find them via a directory search or put something other than E5 in the first byte of the filename (bytes 1,21,41 and 61 of each directory sector). This can be done using SRW itself. SRW has been considerably enhanced from version to version. If you have suggestions for further improvement, find bugs in the program, or simply find it useful, I would appreciate hearing from you.