Info — some of it useful

Running the real Intercode Translator

You have probably got here from the web page for running the real intercode translator (ITi). If not you can invoke this page by clicking here.

Put your little Intercode program into the big box, and click "Run this program". You will get back a kind of operator's log. Click back on the browser to get back the the starting page, where you will find links to the printer output, a diagnostic log (log.txt), and listings of the two magnetic tapes involved. You will see that a well known example program has already been provided on the form.

There are facilities for changing the log file output, controlled by the switches. These are documented in a comment at the head of the emulator source file:

Runing the Translated Program(me)

A little further down the page is a facility for running the translated program. This is rather new, and the proper implementation of peripherals awaits our work on the master routine. The printer only works if it is of type 9. If the printer is the first route (as is the case with the translator), its output appears on LP9.txt. If it is the second route (as is the case with the second example), its output appears on LP18.txt.

The long-term plan is to have both the Master Routine and the Intercode Translator preserved in an environment where they can be executed. So eventually, the peripherals will be driven by the Master Routine. Prior to the implementation of the Master Routine, those of its functions that are needed for running the Intercode Translator are implemented by the temporary routine master() in the emulator, leo3.c.

Other facilities

Various files are created by the emulator, and there is a section of links to the more relevant of these files.

You can create your own program in a file and upload it using the next section, and there are facilities for translating with different diagnostic levels, and for using different versions which may be available from time to time when bugs are being investigated.

Consecutive Runs of the Translation

There are two facilities that enable information to pass between consecutive runs.
  1. At the start of each run the magnetic tape A2 generated by the previous run is copied to file A1. This enables an AMEND to be done building on the previous run.
  2. This second facility is temporarily disabled, as it can seriously slow down response, and is not very valuable at the current stage of development.
    Also any log file from a previous run is saved, and then compared with the newly generated log file. This enables detection of errors in the emulation by running two very similar programs in succession, and using the differences (linked at the very bottom of the page) to point to the parts of ITi that are involved in bits that are not translating properly.

Finding errors using the log.txt file and the differences file diff.txt

This facility is currently suspended owing to the absence of known errors (what Donald Rumsfeld would have called “known unknowns”).

I certainly do not even consider printing out the log.txt files.

You need to browse them with a plain text editor. In the event that you do not have such a beast on your machine, I personally use PFE (program file editor):

A really good thing for this purpose is that you can go straight to a given line number, and the diff.txt file shows the line numbers at which there are differences between the two logs. It is usually easy to spot the differences which are just the different data being read in. A key point is often when the line numbers shown in diff.txt are different. This indicates that one path has obeyed a different number of instructions from the other. I noticed a loop for input characters that gets picked up here if the number of characters on the line is different, so I try to make my two examples have the same line length, e.g.:

Now, I must admit that it is bound to take a little while to download from my R-Pi, just because it is limited to my own upload speed, which is much less than the 8 Mbit/s that I get on download

The listing of ITi is in:

When you have a hardware address from the left-hand side of the line from the log.txt file, you can search for this in demo.htm (use cntrl-F in the web browser). The absolute machine addresses are in square brackets, so just do a search of 12304] to find machine address 12304 and not source line 12304. Because the code is overlaid you will usually have to repeat the search until you find a line obeying the proper instruction, which is at the extreme left of demo.htm. The refs in demo.htm are hot links to the start of the relevant PROCR, so you can follow the entry to a subroutine, and then click back in the browser when you get to subroutine exit. Refs to sections lead to a file containing all the comments ever made about each item.

Other Minor Aspects

The loader phase of my emulator just reads computer code from the start of each line, ignoring the rest of the line. Lines starting with E for entry, O for overlay, L for load address, and X for eXtra chapter are also significant. Any line starting with a space is ignored.

My translation of ITi has chapter 1 located at the top of division 0 starting at 5000, and chapters 2 to 10 are overlaid starting at 8192, i.e. division 1. Chapter 0 starts at 160, and has just section 10 and the annexes. Switches and simulated modifiers are at the top of division 1.

The proper bootstrapped version has a similar layout with chapter 1 at 5000, and chapters 2 onwards overlaid at 8192. The extra chapter is at 160, and starts with chapter 0. There is also some code which immediately follows this.

The Intercode cross-reference file in the manuals page, shows my code for translating each action. The numbered link goes to the manual page describing the action, and the gen link goes to the appendix where the generated code is specified (or at least hinted at).