View on GitHub

CCjs

Reimagining C as JavaScript

Here are the files for CCjs Candidate #1: the SimH PDP10 Emulator.

Size Date File
1115 May 27 2008 pdp10_bug_history.txt
105514 Apr 29 11:27 pdp10_cpu.c
39178 Apr 28 15:47 pdp10_defs.h
6534 Apr 18 2012 pdp10_fe.c
27518 Apr 29 09:48 pdp10_ksio.c
27730 Apr 28 20:45 pdp10_lp20.c
33803 Apr 28 20:42 pdp10_mdfp.c
32276 Apr 29 09:48 pdp10_pag.c
59896 Apr 29 09:38 pdp10_rp.c
39437 Apr 29 09:48 pdp10_sys.c
10857 Apr 18 2012 pdp10_tim.c
58348 Apr 29 09:48 pdp10_tu.c
30947 Apr 29 09:48 pdp10_xtnd.c
48427 Apr 28 20:46 pdp11_cr.c
31546 May 17 2006 pdp11_cr_dat.h
38782 Dec 11 2011 pdp11_defs.h
28991 Apr 18 2012 pdp11_dz.c
2287 Nov 19 2008 pdp11_io_lib.h
11646 Nov 15 2008 pdp11_pt.c
32105 Mar 21 2012 pdp11_ry.c
178514 Apr 29 10:38 scp.c
5460 Nov 21 2008 scp.h
36919 Apr 28 20:47 sim_console.c
3852 Nov 21 2008 sim_console.h
27310 Mar 18 2012 sim_defs.h
119426 Mar 30 2012 sim_ether.c
16179 Mar 18 2012 sim_ether.h
9752 Apr 28 20:40 sim_fio.c
2171 Nov 21 2008 sim_fio.h
126814 Apr 28 20:43 sim_rev.h
10605 Apr 28 20:40 sim_sock.c
4199 Nov 21 2008 sim_sock.h
37015 Apr 28 20:35 sim_tape.c
6630 Nov 21 2008 sim_tape.h
20192 Mar 29 2012 sim_timer.c
3571 Nov 21 2008 sim_timer.h
41920 Apr 28 20:40 sim_tmxr.c
5949 Nov 21 2008 sim_tmxr.h

which can be compiled and linked with a single command:

gcc -std=c99 -U__STRICT_ANSI__ -O2 -finline-functions -flto -D_GNU_SOURCE \
-DUSE_READER_THREAD -DHAVE_DLOPEN=dylib  pdp10_fe.c pdp11_dz.c pdp10_cpu.c \
pdp10_ksio.c pdp10_lp20.c pdp10_mdfp.c pdp10_pag.c pdp10_rp.c pdp10_sys.c \
pdp10_tim.c pdp10_tu.c pdp10_xtnd.c pdp11_pt.c pdp11_ry.c pdp11_cr.c scp.c \
sim_console.c sim_fio.c sim_timer.c sim_sock.c sim_tmxr.c sim_ether.c \
sim_tape.c -DVM_PDP10 -DUSE_INT64 -I . -I PDP10 -I PDP11 -o pdp10 -lm \
-lpthread -ldl