• Please review our updated Terms and Rules here

CP/M-68K Simulator

tingo

Veteran Member
Joined
Aug 12, 2009
Messages
1,520
Location
Oslo, Norway
I found this while I was reading the comp.os.cpm newsgroup: http://home.earthlink.net/~schultdw/cpm68/simulator.html
with a small patch to cpmsim.c it compiles under FreeBSD:
Code:
#ifdef __FreeBSD__
#define TEMP_FAILURE_RETRY(expr) \
    ({ long int _res; \
        do _res = (long int) (expr); \
        while (_res == -1L && errno == EINTR); \
        _res; })
#endif
Not my invention, I just took one from the newsgroup thread and changed '__APPLE__' into '__FreeBSD__'.
Anyway, the simulator works:
Code:
tingo@kg-core1$ ./cpmsim
Read 32768 bytes from boot track


CP/M-68K(tm) Version 1.2  03/20/84 
Copyright (c) 1984 Digital Research, Inc.

CP/M-68K BIOS Version 1.0
Simulated system of April 2014
TPA =16251  K

C>AUTOST.SUB
AUTOST.SUB?
to quit, use the bbye command:
Code:
C>bbye
CP/M-68K terminating normally

Final PC=00008106
Just in case anyone else find this kind of stuff interesting. I useed FreeBSD 8.4-stable:
Code:
tingo@kg-core1$ uname -a
FreeBSD kg-core1.kg4.no 8.4-STABLE FreeBSD 8.4-STABLE #0 r253646: Thu Jul 25 10:12:31 UTC 2013
     root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
 
Back
Top