This document is: http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/ This is Hamish Dewar's Imp compiler for the PDP15. It treats the PDP15 object file as if it were a virtual machine (eg like the JVM) and binds the object and an interpreter into a single binary. So to all appearances it looks like you are generating a windows binary. No other files are required at run time. Note that the mechanism used means you can actually embed PDP15 assembly code in your Imp program :-) Installation is simple. Download these files: http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/imp15.exe http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/link15.exe http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/run.c Put imp15.exe and link15.exe in your path somewhere (or just in the same directory as your imp15 source files). You must also download the file run.c (but don't compile it, just place it in the same directory as your Imp15 source files.) You will also need a C compiler in your path. By default the linker assumes TCC, but you can use any other compiler by passing its name as a switch argument, such as "link15 -gcc test" or "link15 -lcc test". The compiler must accept arguments of the form "-o file.exe file.c" A subset of the TCC suite can be installed very simply by creating subdirectories in the same place as your source files, named "lib" and "include", then saving these files into those subdirectories: http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/include/stdio.h http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/include/stddef.h http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/include/_mingw.h http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/lib/libtcc1.a http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/lib/msvcrt.def Save the compiler executable somewhere in your path, or in the same directory as imp15.exe and link15.exe: http://history.dcs.ed.ac.uk/archive/languages/imp-pdp15/windows_port/tcc.exe Imp15 source files must have the extension .i15 and the generated object files will be given the extension .o15. You do not need to give the extensions on the command line, although you can do so. The generated .EXE file is a stand-alone binary. It uses the Imp15 model of I/O, with 3 inputs streams and 3 output streams. Specify the input stream list as file names separated by commas - there must be *no spaces* between the names. The output list is specified similarly. Note that it is not possible to open a file as an input and an output (such as "edit file.txt file.txt") because the streams are all opened before the program is invoked. Most programs will take one input file and maybe an optional output file (eg "test file.in" or "test file.in file.out") After compiling there will be some leftover intermediate files: file.c - bound vm interpreter and object code file.map - addresses of procedures file.o15 - object code Have fun! Graham -------------------------------------------------------------------- PS Caveats: 1) Imp stream 0 is defined as "CON:" on Windows/DOS so if you use a version of GCC that needs Cygwin (eg MinGW) note that any output to CON: is lost. However running from a standard command line (DOS window) works as expected. 2) I have no idea what would happen if you redirect stdin or stdout using < and >. I doubt it will do what you expect, regardless of what you expect :-) 3) This dialect of Imp15 does not support implicit multiplication (i.e. you must write "40 * I" rather than "40 I"), and it does not support a stand-alone %ELSE (use %ELSE %START or %FINISH %ELSE %START) 4) If you want the full TCC suite, it's at: http://fabrice.bellard.free.fr/tcc/ - click on the "Windows binary distribution" 5) None of this is extensively tested yet. Source will be online soon.