Image Map Image Map
Results 1 to 3 of 3

Thread: Question about modifying CP/M 2.2

  1. #1

    Question Question about modifying CP/M 2.2

    Hi everyone, i'm designing a Z80 microcomputer. I'm waiting some IC's to arrive, while I wait, I want to prepare some software for it.

    My design has the entire memory address space dedicated to 64KB of RAM (SRAM), and when user hit "LOAD ROM" button, the system
    copy a 64KB EPROM in to the 64KB of RAM. Then, user hits "HARDWARE RESET" to start whatever the ROM have.
    My system has a UART, for a terminal thought a serial port, but this UART is not the same as the UART used in the original CP/M development board.
    So, the original CP/M BIOS source code will not work on my system.
    Can I write my own simple BIOS subroutines for making CP/M working on my system? If i can, how?, I have the original assembler source
    code of CP/M 2.2, and a simple example BIOS. And how i compile my code?

    PD: UART that i'm using is Intel's i8251
    PD2: I'm a noob in assembler

    Please, help me. Thanks.

  2. #2


    Oh, also, I don't want to write CP/M to a floppy, formatting it and executing putsys, no thanks, too much complication. I just will program a EPROM, or EEPROM and my system will copy it to RAM (with the same address, 0000h in ROM will be copied to 0000h in the RAM) and execute it directly. And my system is not ready, i'm waiting the chips for arriving. I will install them in breadboard, my design is not tested, and in this way it will be easier to do changes. Probably is not gonna work perfectly at the first time. And i'm starting in computer architecture, so probably something in my schematic is not properly designed. If anyone is interested in my design/schematic, ask me at

    PD. I'm spanish, may be I do some mistake writing in English, sorry about that. So much thanks to you.

  3. #3


    The tools you want will depend on the origins of your BIOS source code, as well as personal preferences. I only work in Linux. I use ZMAC (, and did some work with the developer to enable an option to be more compatible with the original CP/M assemblers. But there a many options out there for cross-compilers that should work for you. Like I said, the biggest factor is probably which assembler the source code was written to work with, and then match that to the correct cross-assembler for your needs.

    It should not be "too hard" to convert the BIOS routines from the original UART to an INS8251, but it will require some effort. How different the code will be will depend on what the original UART was. You'll probably need to get datasheets for both, and work out what the original code was doing and determine the equivalent on the INS8251. (or else just "throw out" the existing UART code and start over with the INS8251 datasheet) If you are new to CP/M, you'll also need to read through the "CP/M Alteration Guide", which will give you information on how the BIOS interface is organized and what is required of it.

    Being new to assembler, that's another hurdle. You will need to understand the basic architecture of the CPU (another datasheet to download and look through) and get familiar with the instruction set. Probably working through the BIOS code and making sure you understand the basics of what it is doing, or at least are able to read the instructions and know what they do.
    - Doug

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts