CU.ASM CU.ASM is a program to move files from one user number to another. It is from an idea by Aubrey Hutchinson of Pompano Beach, Florida published in Dr. Dobbs Journal, March 1983 (page 82). OPERATION: CU [dr:]FILENAME.TYPE s,d [/N] Where dr: is the drive designator (optional), s is the source user number, and d is the destination user number. N means don't ask before each change Filename.typ may be ambiguous, same as with the ERA command. EXAMPLE: CU *.ASM 0,3 /N This would transfer all files of type ASM from user 0 to user 3 without asking before each change. R/O and SYS files can be moved. R/O files will be R/W after the move. CAUTION: If a file already exists in the destination user area, it is possible with this program to create another one with the same name. Using the ERA command will then erase BOTH of them. VIDEO ATTRIBUTES: The distributed version of the program uses no video attributes. To take advantage of clear screen and reverse video, place the required attribute strings in the video attribute area of the ASM file and reassemble. THEORY OF OPERATION: The first byte of each file specification in the directory is the user designation. CP/M sets this byte to E5 hex when a file is erased. This program finds the location of the E5 in the BDOS and changes it to the desired user number. CP/M's file erase function is then called, causing this user number to be written to the directory. The method used to find the E5 byte is to get the warm boot address at locations 1 and 2 and subtract 654H bytes and then to check that E5 is at the resulting addrress. This finds the correct byte on my system except when running under a progran such as QK20 which changes the warm boot address. In such a case the program then searches through memory looking for: MVI M,E5H MVI C,xx I am hopeful that this method will work on most CP/M systems, but I have only tested it on my own CP/M 2.2, and if it doesn't work on another system the program would have to be modified. Comments, corrections, etc. welcomed. Submitted by: Robert Wilcox 920 N. Washington Owosso, MI 48867