In this post we will check some programs for CP/M and learn how to load your own programs on “RAM-disk”.

External command POWER is intended to work with files in a RAM and the “RAM-disk”. It allows to view files, edit them, rename or erase them, as well as to view and edit data in RAM. POWER also can display information about a disk, test it and isolate mulfunctioned areas.

Program can be loaded from a tape. After POWER command is entered the following invitation message appears:

А!

The POWER command recognises metasymbols as well. For instance, to view a file list with files that have R as a first character in their names the following command can be used:

А! R*.*

To see the list of all commands that can be used in POWER program, you can use this command:

А! ?

The following command shows the list of all hidden commands:

A! ??

For disk test you can use this command:

А! TEST

Disk will be read, a control sum be generated and damaged sectors will be isolated in a file “===.===” for further desisions.

Disk info, including its capacity and format, can be shown with the following command:

А! DISK

Free disk info as well as file statuses (R/W ― read & write, R/O ― read only) can be displayed with this command:

А! STAT

To see a file list command DIR is used.

CommandSORT is used for file sorting.

There are five ways to sort files:

А! SORT 1 (by file names)

А! SORT 2 (by file names but with executable files at the end)

А! SORT 3 (by file extensions)

А! SORT 4 (by file extensions but with system files at the end)

А! SORT 0 (without any sorting)

Files can be renamed with REN command:

A! REN *** (old name)

To mark file as system and make it visible only for CP/M command SETSYS is used:

А! SETSYS *** (file name)

Command SETDIR is opposite to SETSYS command.

To change file staus to “read only” command SETRO can be used:

A! SETRO *** (file name)

Command SETWR changes file status to “read & write”.

Very detailed file info can be received with SIZE command.

The first column shows sectors that are used, the second – free sectors, the third – file size in Kbytes, the forth – a size of group of files in Kbytes.

Commands to copy data from RAM to disk and back:

1. А! LOAD (имя файла, тип) ХХХХ

This command loads file from a disk to RAM from address ХХХХН > 4000Н.

After thet the command shows the end RAM address and amount of sectors that is used by file.

2. А! SAVE (name.ext) ХХХХ YY

This command loads file from RAM to a disk from address ХХХХН to disk taking YY sectors (if the file has been previously loaded with LOAD command and its size hasn’t been changed, then amount of sectors can be voided).

3. DUMPA ― view file as ASCII characters.

DUMPH ― view file as hex data.

DUMPX ― view file in both formats.

There are several way of using command DUMP:

A! DUMPH ХХХХ YYYY ― show data from address ХХХХН to YYYYH

А! DUMPH XXXX,N ― show N bytes of data from address ХХХХН.

A! DUMPH ХХХХ ― show all memory starting from address ХХХХН.

4. To view and edit text command DS is used:

A! DS ХХХХ

ХХХХН ― starting address. The following data is displayed:

address, hex code, decimal code, binary code, ASCII code , ENTER (.)

ENTER ― shows in which code type changes are going to be made: (А), (Н), (В), (D). To change code command .В(.) can be used ― (code type symbol in brackets). Data can be viewed in forward or back direction. To change a direction to opposite “^” needs to be entered. “-“ symbol will be added to address in back direction is used. To exit from the editor two dots are entered.

5. Fill a memory range with a constant

А! FILL ХХХХ YYYY ZZ

Start address ХХХХН, end address YYYYH and the constant ZZH.

6. To move memory range command MOVE is used:

А! MOVE ХХХХ YYYY ZZZZ

ХХХХН ―start address, YYYYH ― end address, ZZZZH ― new start address.

7. Comparison of two memory ranges can be done with СМ command:

А! СМ ХХХХ YYYY ZZZZ

XXXXH, YYYYH ―the first and the last address of the first memory range, ZZZZH― the start address of the second memory range.

8. Command SEARCH searches a string in memory.

This command displays addresses and data (in ASCII format) of cells that match to the search string. The string length can be up to 128 characters.

А! SEARCH (start address) (end address) (byte) (byte)

Normally the command searches hex codes but if you put a search character in quotes it will be searching the ASCII symbol.

There are several commands in POWER to launch programs:

1. Command GO reads a program from disk, loads it to RAM and launches it. It is convenient to launch programs that have to be run from different address than standard 100Н.

A! GO (file name) ХХХХ

ХХХХН ― address to load a program from.

2. Command JP allows to run a program, that is already in RAM, from a specified address. Exit from POWER happens after that:

А! JP ХХХХ

ХХХХН ― start address of a program.

3. Command ЕХ is the same as previous one, but it returns to POWER after that.

In this case a program has to have code С9 (RETURN) ar the end.

4. Command RUN loads and runs one or several files.

Command CHECK is used for control sum calculaton:

А! CHECK (file name)

Also, there is a command to exit from POWER to СР/М:

А! EXIT

Lets have a look on some other CP/M programs.

ED.СОМ – a text string orientaded editor. Its description can be found here.

L80.СОМ – a program that links files after translation to an executable program. Also it merges several files in one. Its description is here: LINK-80.

Actually, most CP/M-80 (CP/M 2.2) can work on this computer. Many of them even don’t need any additional adjustments or installations. If you hava a CP/M program that you want to use on this computer, you can follow these steps to load it there:

Press Ctrl-L and enter 0x0100 in field From and choose your CP/M file.

Now file is loaded to emulator’s memory. But before you close debugger window, find what is the final address of your program in memory. To do this scroll the screen until zeros appear that uninterrupted up to address E000. Remember or write off this address. Decode two high digits of the address to decimal number. This number isa quantaty of blocks that your program requires on “RAM-disk”. For instance, if the last data of the program is in cell 2F55 after which only zeros in cells, then transfer2F to decimal number and get 47. It is number of blocks on disk that this program is required. Please remember or write it off.

Now close the debugger window and in the emulator enter Monitor-F command O0100,XXXX (XXXX – end address of the program (for instance, 2F55from our example). But before you press ENTER button after the command, launch recording to wav file, clicking on this button:

When recording is completed and invitation message ” =>” appears, press the red cicle button again to stop recording to wav file. Emulator has completed its part of job. Now we use our computer on DE1.

Load MONITOR-F as usual and turn off MONITOR-0 ROM (SW[2] in position “0”).

Load the wav file that we’ve got from emulator using command I through LINE IN jack. May be you a sound level needs to be adjusted if errors accurs (please read my previous post about MONITOR-F). Your program will be loaded from address 0100.

After the program successfully loaded, CP/M can be launched by “hot start” with GDA00 command.

Now we are able to save the program to “RAM-disk” with SAVE command using amount of blocks that you’ve recorded on step 5 and a file name. For instance:

A> SAVE 47 M80.COM

Now you can save file to tape using CHcommand to be able to load it later straight to CP/M. Or you can create a memory dump with this file, as I explained in one of my previous posts, through USB JTAG interface.

This computer doesn’t have a lot of programs. So, if you adapt or create any other programs for it and send them to me, I’ll add them to the library. Simple programs are easy to load through LINE IN, but for big ones or for collection of programs a memory dump is much more convenient.

I hope you enjoyed the posts about this unusial computer. I think it is the final post about it, but may be I’ll come back to this topic once again if any interest appears or some new information is found.

But now we will do much more serious project! I’m going to create a replica of another Soviet computer – AGAT-7. And this replica will use a real 6502 processor and FPGA as a replacement of original computer ICs. You can subscribe to the RSS feed with the button on the top right corner. See you soon!

As you may remember, I’ve designed a universal platform for building retro-computers “Retrobyte”. I have successfully tested it by building the “Mikro-80” computer a few months ago and now I’m working on adapting my other retro-computer project “AGAT-7” to this platform. “AGAT-7” requires more functionality than “Retrobyte” has, so I’ve build an extension board for[…]

A blog format is not very suitable for short status updates of my projects, sharing ideas or interesting facts and news. So, I have created a twitter account to supplement the blog. You can now see the latest tweets on the right side of the home page. The detailed articles are still going to be[…]

The computer “Mikro-80” was made in the Soviet Union in 1980 by a team of enthusiasts before in 1982, the magazine “Radio” began publishing its documentations and schematics. In a nutshell, this was the first accessible personal computer in the USSR; in that era, only single digits of people in the country had the ability[…]

In my previous post, I explained my idea of a modular platform for building modern replicas of retro-computers, of which the Rev.A has already been built and tested. In the process, I found a few things to improve: On the silkscreen, the diode D1 was shown incorrectly (the cathode points to the anode) The voltage[…]

During the time I worked on the “Agat-7” replica, I came across the need for constant changes and improvements; these resulted from either new ideas or troubleshooting. Some of these troubleshoots involve tinkering with the circuit board. Currently, I have four different revisions and modifications of PCB’s for “Agat”; this isn’t even the total amount,[…]

The multimedia center in my car is quite useful – it features a built in GPS navigator, a rear-view camera, an MP3 player and several other handy functions. However, its greatest weakness is the inability to play music via Bluetooth. The only supported option is the hands-free bluetooth phone connection mode. To listen to music[…]

Not so long ago I found out about a very interesting computer under the name of Maximite. It is built on the microprocessor PIC, on which are assigned all the main functions of this computer. This small device was made in 2011 and became popular enough so that now some games and programs were made for[…]

In the previous post, I promised to tell you about the holders that I made for the spool of plastic for my 3D printer. In the original kit, there is no holder or support for the plastic and it just sits there next to the printer. The spool, positioned thus, often tangles and requires constant attention. This[…]

It was always a problem to find a proper enclosure for my devices. So, I decided to build a 3D printer for these purposes. It is a great project to build. It can be used not only for customised enclosures but for all sorts of other projects. I didn’t want to buy a pre-build printer[…]

I’m about to finalise my Rev.0 of the modern replica of the retro-computer “AGAT-7”. The next step will be Rev.A design with fixed mistakes, improvements and some new ideas. In this post I’m going to summarise the Rev.0 experience and share with you with some ideas for Rev.A. At the moment the Rev.0 computer starts[…]