COM CP/M Simulator

Recently I've found this CP/M simulator called 'com'. I thought it'd be great to run
CP/M programs under various VAX BSD OS's... You can find more info on the simulator at it's home here:

http://userweb.windwireless.net/~jimc/com.html

I've included different exes in this build...

myname# ls ../cc*
../ccom* ../ccom8080* ../ccomz80* ../ccpu.c ../ccpu.o

ccom this was built with the default cc compiler with the -O flag.
ccom8080 this was built with gcc 2.7.2.2 with the O2 flag.
ccomz80 this was also built with gcc 2.7.2.2 but with the -O flag, and the z80
code turned on. I couldn't build it with O2 as I ran out of memory.

'benchmark' times are as follows:

myname# time ../ccom mac keycon
CP/M MACRO ASSEM 2.0
04E6
005H USE FACTOR
END OF ASSEMBLY
16.5u 0.1s 0:16 99% 49+149k 8+41io 0pf+0w

myname# time ../ccom8080 mac keycon
CP/M MACRO ASSEM 2.0
04E6
005H USE FACTOR
END OF ASSEMBLY
9.7u 0.2s 0:10 99% 43+146k 15+30io 0pf+0w

myname# time ../ccomz80 mac keycon
CP/M MACRO ASSEM 2.0
04E6
005H USE FACTOR
END OF ASSEMBLY
10.7u 0.2s 0:11 99% 51+147k 12+37io 0pf+0w

As you can see the gcc code wins for speed, with the z80 emulation adding a whol
e second overall...

And for comparasson, here is my NeXT cube.

(68040 33Mhz built with gcc 2.5.8 -O0)
bash-2.01# time ../ccom mac keycon
CP/M MACRO ASSEM 2.0
04E6
005H USE FACTOR
END OF ASSEMBLY

real 0m20.095s
user 0m19.248s
sys 0m0.312s

(68040 33Mhz built with gcc 2.7.2.3 -O2)
bash-2.01# time ../ccom mac keycon
CP/M MACRO ASSEM 2.0
04E6
005H USE FACTOR
END OF ASSEMBLY

real 0m12.435s
user 0m11.779s
sys 0m0.235s

Posted by Jason Stevens 2010-03-24