home *** CD-ROM | disk | FTP | other *** search
- Using The XAMN Disk Utility
-
- By Ezra Shapiro
- N.W. Kaypro Users' Group
-
-
- Lurking buried on your Kaypro's CP/M disk is a handy-dandly little
- program by the name of XAMN.BAS that (when compiled) will allow you to
- modify every single byte on your disk. If you have a dot matrix
- printer, this will allow you to use graphics characters that your word
- processor doesn't recognize. And if you know assembler language and
- hex codes, you can probably alter anything. Here's how it works:
- Put your CP/M disk in drive A, and figure out where you want the
- XAMN command to go, and put that disk in drive B. XAMN takes up
- something like 27K and will fit nicely on the your word processor disk,
- and since it's a kind of editor that's not a bad place for it to go.
- Compile XAMN using the SBASIC assembler. Your command line for
- the compilation should read A>SBASIC XAMN.ABX (The ABX substituted for
- the filetype BAS means that the program source is on drive A, you want
- the compiled program to wind up on drive B, and the compilation listing
- will appear on the console, device X.). At this point, consider making
- and eating a large snack--it's a BIG program, and it takes a while to
- compile. When the console registers "compilation complete," you're
- ready to use XAMN. Put the XAMN disk in the A drive.
- A brief warning: though XAMN is a big, sophisticated program, it
- does have a few rough edges (for example, it can only read capital
- letters--if you don't have the caps lock on, it won't work), so watch
- what you're doing and follow instructions carefully.
- Type in your command (simple, A>XAMN). The program will then ask
- you to select the drive you wish to work on (0=A, 1=B, and so on).
- From this point on, when you specify a file leave off the drive
- name--the program is set to the drive, and all you'll do is foul up the
- way it reads the filename. The next thing that will appear is a main
- menu with help directory. It's a good move to read through the help
- paragraphs.
- Now enter command 4, map of file, and the name of the file you
- wish to edit. The program will come back with a series of hex numbers
- from the disk's directory. Jot them down--each number represents a
- block of 8 sectors, and if you forget how far the file goes, you may be
- in trouble. Also, as CP/M may occasionally wrap one file around
- another, you may need the map to prevent you from working on the wrong
- file.
- Next compute track and sector from block (command 8). In order to
- get the machine to read the hex correctly, you must add "H" to the
- group number (example: enter group 4D as 4DH). The program will give
- you the track and sector location of the file. Note: this is the
- LOGICAL sector!
- Enter command 2 (examine logical sector) enter the track and
- sector number, and presto! you're into the hex code for the file. If
- you were alert and consulted all the help sections earlier, you can now
- edit the file using the commands defined in help A. When you subsitute
- one character for another, you must use the hex code for the new
- character, not the character itself.
- If you are using XAMN to edit text to produce graphics characters
- not normally available through your word processor (which may only
- recognize 7-bit code--only 128 of the potential 256 characters), you
- must remember that the computer, your word processor, and your printer
- might have different interpretations for the second half of the 8-bit
- table. The computer will give you two columns of Greek characters and
- a second ASCII set on the screen. Should you TYPE the edited file
- using CP/M, you will get the printer's character set, as listed in your
- printer manual. But beware!--if you PRINT the file using your word
- processor, some characters may be read by it as control symbols and
- turn your printout to gibberish.
- You can also use XAMN to insert control characters into text that
- has already been formatted for printing by your word processor,
- enabling you to go back and forth between normal, proportional, and
- extended characters--an option not supported by most software. Check
- your printer manual for the codes that will produce this--and other
- similar possibilities. Just type a symbol you'll recognize when you
- look for it later, run the text through the formatter, then go in with
- XAMN and substitute the proper control characters for your dummy ones.
- With careful experimenting, you can produce some interesting effects.
- Finally, you can use XAMN to reclaim files you've accidentally
- removed from the directory, though this is dangerous at best. The
- directory, which starts at track 1, sector 1 (physical), lists all
- files as they are created. Each entry uses two lines; the first is the
- filename, the second contains the block locations of the file. The
- first character of the first line, right before the filename, tells the
- status of the file: (00) for active, (E5) if erased. Changing an (E5)
- to a (00) will reincarnate a deceased file. But be careful--once a
- file has been erased, CP/M will begin to overwrite the erased sectors.
- Bringing back a dead file can create all sorts of problems--the same
- sector occurring in two files, inexplicable garbage, etc., etc, etc.
- Remember that erasing a file does only one thing--it changes the (00)
- to an (E5)--period. If you've edited a file several times, creating a
- *.BAK file each time, the directory will show all the incarnations.
- Try to bring back the wrong one, and you risk insanity. Compared to
- CP/M, tana leaves and the Book of Thoth were a snap.
- NOTE: Once you have have followed XAMN's instructions and written
- your changes to disk, you must wait until you actually hear the drive
- move before you exit the program, or you'll lose your edit. Just look
- at a few more sectors; drive movement won't take long.
- To exit from XAMN, you go back to the main menu. Then either
- press the boot button on the back of the Kaypro, or type CONTROL C.
- That's it.
- Admittedly, this is a rather tedious way to get graphics into your
- text, but it does work. One way to beat the boredom is to set up a few
- short files that contain formats you'll use over and over. Say there's
- a fancy page header you want to use on more than one document--rather
- than XAMN editing every file you use it on, set up a file with the
- reusable format, XAMN edit the file, and APPEND it every time you want
- it. And if all you're after is inserting a few neat characters in
- text, it might be simpler to use the CONFIG utility to change the
- definitions of the numeric keypad to those characters you want to use.