I've been working on some imp code and hitting problems, so I decided it was time to try installing imp2022 again. I had given up the last time as it was too complicated to install imp2022 while keeping the mostly-working imp77 and imp2021 installations, but this time I went about it more methodically by making a script to install it; and starting from a clean slate on every iteration. Also I created a new user (imp2022) with no sudo access and no write access to /usr/local etc so that there was no danger of accidentally breaking my existing installations. There are several problems with the imp2022 installation, starting with the documentation - the section on modifying the loader script is particularly hard to follow, so once I had worked out what ut meant, I wrote some code in my install script to generat a new ld file and insert the appropriate imp support automatically. I note that that everything in the Makefiles is installed to a BASEDIR and its subfolders. This is too restrictive for a setup that permits simultaneous use of older versions. This can be fixed by ignoring BASEDIR, and replacing it with separate SRCDIR, BINDIR, LIBDIR and INCDIRs. These can still be created automatically from a single base directory if desired, but splitting them out allows for finer-grained options. The attached script will use a master directory by default, but any or all of the individual directories can be specified explicitly with overriding command-line options such as: ./install-imp77 --src /tmp/imp --bin ~/bin Any missing parameters which cannot be guessed are prompted for. The changes to the Makefiles to handle separate directories all look like this: ifndef BINDIR BINDIR = ${BASEDIR}/bin endif ifndef LIBDIR LIBDIR = ${BASEDIR}/lib endif ifndef INCDIR INCDIR = ${BASEDIR}/include endif - the 'ifdef' lines allow an external symbol to be used if present, otherwise the behaviour will be the same as before with the hard-coded BASEDIR. The external symbols are set up in the new install script before invoking the Makefiles. Several utilities are called from within the makefiles without explicit paths, so if an older installation is still in place (eg Andy's imp77 or the first imp2021) then a utiliy from an older version may be invoked by error. This is awkward when there has been a change in parameters between the older and the new version, not to mention bug fixes having been applied. For example the pass3elf program changed the number of parameters between imp2021 and imp2022. The cleanup of -m32 flags was only partial. There are still some "-m32" literal strings in the Makefiles. The change below to the makefiles will use an M32 symbol if one is in the environment (which I determine dynamically in the main install script) but will fall back to the default hard-coded value if not present. As a reminder it is only the 64 bit systems which support the -m32 flag - 32 bit systems don't need it but also do not accept it. ifndef M32 M32= -m32 # remove on 32 bit systems endif CC = gcc $(M32) My install script handles the points above and modifies the necessary scripts and makefiles. It would be very helpful for the future to update the Makefiles with the same changes, which you can see by comparing the original Makefiles with the modified "Makefile-gt"s. The cleanup of files with Windows newlines was only partial - the makefiles use dos2unix to clean up *.imp and *.c, but there are others - I had problems with one Makefile that had carriage returns in it. Rather than making even more dos2unix calls, it would be nice to clean up the files on github and avoid ever uploading any more Windows format files again. A 'find' command: find . -type f -exec file {} \;|fgrep CRLF|grep -v .ibj discovers that these files on github all have CRLF line endings: ./lib/makelib.bat ./tools/icd/assemble2icd.pas ./scripts/setenv.bat ./tests/mcode000.imp ./tests/registers.386.inc ./compiler/makep1_2.bat ./tools/icd/buildtools.bat ./scripts/imp32p2.bat ./tests/mcode000test.imp ./tests/zzzsource.txt ./tools/icd/icd2dump.pas ./tools/icd/symTable.pas ./scripts/imp32.bat ./tests/teststring.imp ./tests/testreadstring.imp ./tools/icd/icdio.pas ./tools/icd/icd2assemble.pas ./scripts/imp32x.bat ./tests/baggins.imp ./pass3/pass3coff.c ./tools/icd/trimdump.pas ./tools/maketools.bat ./docs/ascii.txt ./tests/testsignalx.imp ./pass3/makep3.bat ./tools/icd/Makefile ./scripts/imp32xlink.bat ./tests/testsignal.imp ./tests/testarray.imp ./README.md ./tools/icd/icoderec.pas ./scripts/imp32link.bat ./tests/bilbo.imp ./tests/jdm.imp The install script - which should work on linux but probably not on FreeBSD or MacOS - is at https://gtoal.com/imp2022/install-imp77 The more improvements that are made to the github files, the shorter we can make the install script. At some point I'd like to discuss the imp77 script that invokes the compiler, but we can save that for a separate conversation. (Specific subjects to remember when we do - cc style -I include paths; and using the imp77 command to compile and link multiple .imp files along with object files) G