In the mid to late 1980s a requirement arose to teach some engineering students something about microprocessors. The students already had access to logins for the MUSIC operating system on an IBM compatible mainframe computer. It was decided to make use of existing resources and get two students to write a microprocessor simulator to run on MUSIC for their final year project. That way, future students would be able to get a feel for programming microprocessors without needing exclusive access to dedicated hardware. The selected microprocessor was the Z80. A Z80 cross assembler was already installed on a VAX belonging to another faculty and this machine was connected by a circuitous pathway involving DECNET to another VAX and NJE from there to the Amdahl machine running MUSIC (amongst other things) under IBMs VM operating system. A facility was set up allowing MUSIC users to submit Z80 assembly jobs to the VAX in batch and have the assembled output returned to them in some sort of hex format that we never saw the specification for but managed to figure out anyway without too much difficulty. The main languages available on the MUSIC system were WATFIV (Waterloo Fortran IV), the IBM FORTRAN G1 compiler, IBN REXX and IBM/370 assembly language. WATFIV offered various structural enhancements over FORTRAN IV. IF-THEN-ELSE-ENDIF, WHILE-ENDWHILE and character variables for example. However it also had disadvantages. All files used in a WATFIV program had to be statically declared at the beginning of the program using /FILE statements. It was not possible to dynamically open a file with a name determined within the program and it was not possible to recover from a problem opening a file and continue execution. Another big problem was that it was a compile-and-go compiler with no facility for generating object code. This meant that an eager class of students trying out their latest Z80 programs would generate significant machine loading as they compiled the simulator each time they ran it instead of being able to run a previously compiled and link edited program. The main alternative, FORTRAN G1 was not very attractive. No character variables, no structures such as IF-THEN-ELSE-ENDIF or WHILE-ENDWHILE and error messages that were a bit on the obscure side compared to WATFIV. However, FORTRAN G1 was the default compiler on MUSIC and large chunks of the operating system were written in it. On the plus side, all the facilities the operating system had to offer were available. There was no problem opening and closing files and many system subroutines unavailable to WATFIV could be used to perform various low level manipulations. Also, it produced object code which could be link edited to produce a load module which could be executed with significantly less machine resources than a WATFIV program. Some investigation showed REXX, an interpreted language, to be surprisingly powerful. However it seemed a little stitched-on to MUSIC compared to its seamless integration into CMS where it initially evolved. At the time there were no major facilities on MUSIC written in REXX so it was felt that tried and tested FORTRAN was probably a better bet. IBM/370 assembly language was felt to be too low level and to require too much work to complete the project in the time available. It was found that WATFIV offered a facility for translating a program using some if not all WATFIV extensions to FORTRAN IV into a regular FORTRAN IV compatible program. It was decided to write an initial proof of concept simulator in WATFIV, translate it into FORTRAN IV code that the FORTRAN G1 compiler could cope with and then add enhancements which were only possible using the FORTRAN G1 compiler. The WATFIV program was duly written and translated into FORTRAN IV compatible code. However, this is where my normally hazy memory gets even more hazy than usual. The translated output was truly ugly and very hard to work with. A lot of effort was expended making it a bit more readable and maintainable but I don't recall how much or how little of the translated code it was possible to make use of and how much had to be rewritten, particularly when new features that probably should have been in the original WATFIV program were added without going back to the WATFIV program and retranslating. The simulator was completed on schedule and installed for use by the following years students. MUSIC went away sometime in the early 1990s and I thought I would never see it again. However, I kept a few bits and pieces even though I thought I would never have any way of running them. Some years later, Hercules appeared as well as Sim390 by the late Dave Edwards of the MUSIC group. Sim390 came with the "MUSIC/SP Demo system version 6.1", a much later ESA/390 version of MUSIC than the version 1.something System/370 version of MUSIC/SP that the Z80 simulator was designed on. The license free FORTRAM compiler available for use with the newer MUSIC demo system is FORTRAN G which is slightly less capable than FDRTRAN G1. However it was found to be possible to get the FORTRAN G1 version of the Z80 simulator to compile under FORTRAN G with only minimal tweaking required. The only problem found was that FORTRAN G has a program unit size limitation which was being exceeded by the rather large main program unit. The solution was to extract two reasonably autonomous chunks of code from it and make them into separate subroutines, something we probably should have done anyway all those years ago :-)