home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / xamn.lbr / XAMNKPRO.DZC / XAMNKPRO.DOC
Encoding:
Text File  |  1993-10-25  |  7.3 KB  |  106 lines

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