CP/M 2.2 on Solace
  • Introduction
  • Booting CP/M
  • A few CP/M commands
  • Getting PC Files On and Off a Virtual Disk
  • Importance of the SOLOS ROM Image


  • A Few CP/M Commands


    This section is intended to be a very brief refresher for those who haven't used CP/M for ages, or a cheat sheet for those who have never used CP/M and just want to try a few commands.

    CP/M's core functionality includes a few built-in commands:
     
    DIR  [filespec] Display the files that match the filespec, along with some basic file attributes 
    TYPE filename List the contents of the specified file to the screen
    ERA filespec Remove the files that match the filespec
    REN newfilename=oldfilename Change the name of the oldfilename to the newfilename
    SAVE <# pages> filename Dump <n> 256 byte pages starting at memory $0100 to the named file
    USER n CP/M 2 allows up to 16 user areas (0 to 15; default of 0).  Typing this changes the group of files that all other commands operate on.

    "filename" is <0-8 characters>.<0-3characters>, while "filespec" is a wildcard filename that can match more than one file.  filespec wildcards are "?" to match one character, and "*" to match 0 or more characters from that position on.  If you've ever used MS-DOS, this is the same convention that MS DOS uses, as MS DOS was derived from CP/M.

    When using the disk factory to create new disks, if the "Boot Tracks" option is set to install CP/M, only this core functionality will be available.  It requires external means to install other programs and utilities on the new disk.  There isn't a lot one can do with this minimal functionality.

    Do a web search to find out more about CP/M.


    Getting PC Files On and Off a Virtual Disk

    From within CP/M, you can use any CP/M program to create, move, copy, and edit files to your liking.  At some point, though, you will need to copy a file from the host PC onto a virtual CP/M disk, and you may need to copy a file from a virtual CP/M disk onto the host PC.

    There are a number of ways to do this within Solace, but they tend to be obscure and somewhat time consuming.  However, there is a better way.  The "cpm_util.svn" virtual CP/M disk supplied with Solace contains a number of standard CP/M utility programs, plus two special utilities: import.com and export.com.

    import.com solves the problem of copying a file from the host PC filesystem onto a virutual CP/M disk.  export.com copies files from the emulated CP/M disk to the host PC filesystem.  How they do this is a bit of emulator magic.

    Please read the help file for the import/export utilties for more detailed information.


    Importance of the SOLOS ROM Image

    The stock SOLOS ROM was created before anybody tried running CP/M on it.  One behavior of the terminal driver contained in SOLOS is to make a carriage return not only set the current cursor position to the first column of the line, but to first clear the line from the current cursor position to the end of line.  This seems harmless enough, but the problem is this: when the user types a command, the carriage return is the last thing the user types.  This manually entered carriage return causes SOLOS to clear the line from the cursor position to the end of line, then set the cursor to the first column.  CP/M then issues a CR/LF pair, causing SOLOS to clear the cursor position to the end of line (wiping out the entire line that just contained the command entered), then the LF causes the cursor to go to the next line.

    Thus the net effect is that each command entered on the CP/M command line causes that command line to get blanked out when using a stock SOLOS.

    The Solace archive web site has four different SOLOS images.  "solos1.asm" can be forgotten about since it is a one-off ROM with no real value other than it is the image in my own machine.  "solos2.asm" is the standard SOLOS program that suffers from the above bug.  "solos3.asm" appeared in a CPMUG archive (015) and fixes the bug, but stupidly, one of the routines is a different length and many entry points into the ROM get shifted around.  Well behaved programs that call SOLOS only through the officially sanctioned entry points would be just find, but many programs call into ad-hoc places in the SOLOS ROM.

    As a result, I've modified solos3.asm to create solos4.asm.  This has the erase-to-end-of-line modification, but pads the fix in such a way to maintain maximal compatibility with the official solos2.asm.

    It is recommended that solos_cpm.rom (assembled from solos4.asm, distributed with Solace in the ROMs subdirectory) be the personality ROM image you use if you are running CP/M on Solace.


    Back to Solace main page.

    Last update: November 26, 2001