CP/M, which stood for Control Program for Microcomputers, is an operating system originally for the 8-bit Intel 8080 and Zilog Z80 CPUs from Digital Research Inc. It was popular for business computing in the 1970s and 1980s.
Questions tagged [cpm]
14 questions
6
votes
2 answers
Terminate hanging program and return to Turbo Pascal 3
I am running Turbo Pascal 3.01A on CP/M 2.2. Suppose my Pascal program, which I run using the R menu option in Turbo Pascal, has a bug and goes into an infinite loop. Is there a special control character that will interrupt my program and return…

Vebjorn Ljosa
- 17,438
- 13
- 70
- 88
5
votes
1 answer
Minimal assembler program for CP/M 3.1 (z80)
I seem to be losing the battle against my stupidity.
This site explains the system calls under various versions of CP/M.
However, when I try to use call 2 (C_WRITE, console output), nothing much happens.
I have the following code.
ORG 100h
LD…

Andrew J. Brehm
- 4,448
- 8
- 45
- 70
4
votes
2 answers
Problems with Z80 Assembler
I trying to write in Z80 Assembler in a CP/M 2.2 Emulator (z80pack) in Debian:
A>dir
A: DUMP COM : SDIR COM : SUBMIT COM : ED COM
A: STAT COM : BYE COM : RMAC COM : CREF80 COM
A: LINK COM : L80 COM : M80 …

Rafa_Asp1
- 89
- 2
- 8
4
votes
1 answer
How can I compile C/C++ to a CP/M-86 executable (CMD)
I have this project: Compile a C/C++ program to a CP/M-86 executable (CMD-file) with a modern compiler. The target architecture is 16-bit x86. You may think I am crazy but I am doing this for fun and to learn about CP/M-86 and low level x86…

pvh1987
- 621
- 5
- 8
- 12
3
votes
2 answers
Why using char type as index for looping gives unexpected results?
Bear in mind this is an old version of the C compiler: CP/M for Z80.
#include
main()
{
char i = 0;
do
{
printf("0x%04x | ", i);
} while (++ i);
}
Expected:
0x0000 | 0x0001 | 0x0002 | 0x0003 | 0x0004 |…

vDom
- 53
- 3
3
votes
1 answer
How can I relocate CP/M BDOS to a custom memory address?
Maybe it's a newbie CP/M question, but anyway ... Is it possible to relocate CP/M BDOS? I have a hardware I've written BIOS for, to be able to use with CPM 2.2. However that BDOS (seen by disassembling it) uses fixed addresses. Since I don't know…

LGB
- 728
- 1
- 9
- 20
2
votes
3 answers
Waiting for some time on Z80 CP/M
I want to write a game loop on CP/M 2.X (Z80) and would need to wait for some time e.g. a second. I've looked at BDOS but did not find a function, a loop depends on processor (emulation speed), interrupts like vertical blank do not exist.
Any ideas…

KingOfCoders
- 2,253
- 2
- 23
- 34
2
votes
1 answer
m80 macro assembler org directive
I am using Microsoft's ancient m80 macro assembler and haven't run into any major problems for a while.
However, I am now trying to use the ORG directive with a hex number and it fails.
This works:
;; Tell the assembler that this is z80 code …

Andrew J. Brehm
- 4,448
- 8
- 45
- 70
1
vote
2 answers
Can I include continuous variable when optimising with CPMpy?
I need to run a model, where I optimise a diet within a set of constraints and call all integer solutions in the end. I have found a diet example matching almost what I need here: hakank.org. However, in my case, my variables take continuous values,…
1
vote
0 answers
CP/M get running program name
For a hobby project I'm porting the Standard C Library to the Digital Research CP/M.
Inside CRT0.S (this is the code that runs before your main() C function is called) I have no trouble parsing the tail of the command line arguments from the lower…

Tomaz Stih
- 529
- 3
- 10
1
vote
2 answers
Building ROM images on CP/M
I'm trying to use the venerable M80 and L80 tools on CP/M to build a ROM image. (It's for a CP/M emulator, hence why I'm using CP/M tools.)
Unfortunately L80 seems to be really crude --- AFAICT it just loads each object file at its absolute address,…

David Given
- 13,277
- 9
- 76
- 123
0
votes
0 answers
Cannot perform connective-based predictive modelling analysis by the Network Toolbox package in R
I have to run a cpm analysis to predict a behavioral stat from fMRI data. I ran conn and downloaded a z-score matrix from matlab but I have problems with convertConnBrainMat function in R.
Specifically when i…
0
votes
1 answer
Cmake CPM link with GameNetworkingSockets
I am trying to link Valves GameNetworkingSockets with my c++ cmake project, and am having errors (first failed to compile due to missing defines when I was able to include the headers, later errors were due to unrecognized targets...). I am using…

crazicrafter1
- 309
- 5
- 18
0
votes
2 answers
Z80 Assembly (1MHz) CP/M: How to get correct physical input using buttons
I am a freshman studying computer science. In computer engineering we are working on a Zilog Z80 8-bit microprocessor (1MHz) and a set of components that need to be manually connected using a breadboard and cables.
The connecting part doesn't worry…

MichaelP
- 41
- 10