This short tutorial should get you started using the GIER simulator.
The following topics are explained:
If you print this page, please make sure that your browser prints underlines.
We assume that you already have installed the simulator.
Start the Linux version by cd'ing to the directory with the GIER executable, and simply type GIER. The windows version is started by double-clicking on the GIER.exe file.
You will see some windows on the screen:
Figure 1: The main window of the GIER simulator.
The menus are used as follows:
The File menu contains functions for saving and restoring the state of the simulator, and terminating it.
The View menu contains an item for each subwindow of the simulator. Click on an item to open or close the window for the paper tape reader, the punch, the typewriter, the main or auxilliary control board, or the line printer.
The Options menu selects certain options in the simulator: You can write-protect the channels 0 or 1 to 31 on the drum/disc, you can select the way zeroes are handled in floating point arithmetics, and you can enable/disable the sound.
If the simulator couldn't find a suitable sound driver, the sound item will be grayed out in the menu.
Enabling sound results in two things: First, you will hear the sound from the machine when the sign of the result register changes. Secondly, the speed of the simulator will match the speed of a real GIER machine.
Normally, tracks 0, 1-31 and the floating point zero options are enabled.
In the Debug menu most of the items select test printing. This doesn't work so well in Windows. In the Linux version, the test printouts appear in the terminal in which the simulator was started, unless you redirect the output when you start the program. If the Statistics item is selected, the GIER instructions executed are counted until you deselect this item. The statistics are stored in a file named gierstat.dat in the current directory.
Figure 2: The main control panel of the GIER simulator.
The main control panel is explained in details in vol. 2 of A Manual of Coding of GIER.
The buttons on the top, right hand side of the panel select the register to be displayed. Here, register O is selected. The lights at the bottom display the contents of the selected register. Click on the buttons with the mouse to change the contents of the register. Black is zero and white is one. The two switches to the left set all bits to either 0 or 1.
The overflow bit, the sign of the R register, and the contents of the indicator are displayed at the top left.
The YE light is on when GIER waits for an external unit, e.g. the typewriter or the paper tape reader.
The lights M1 to M4 indicates at what stage in the microcode GIER is in while executing an instruction.
Click on NORMAL START to restart the GIER machine if it is stopped. Right-click on this button to single-step through a program. The NORMAL STOP button stops the GIER machine at the end of the current instruction. Note, if GIER is waiting for a character from the keyboard or the paper tape reader, the current instruction won't be finished until a character arrives.
Use the MIKROTEMPI STOP button to stop GIER immediately, i.e. in the middle of an instruction. This is especially useful if GIER is waiting for a character from the typewriter or the paper tape reader.
The MIKROTEMPI START button executes a single step in the microcode each time it is pressed.
The switch at the bottom left exits the simulator.
When the Help-3 system has been installed on the GIER machine, the main control board is normally not used. You can control everything using the auxilliary control board and the typewriter.
Figure 3: The auxilliary control panel of the GIER simulator.
Most of the lights and switches follow corrensponding lights and switches on the main control panel.
The KLAR light means that GIER is stopped. The YE light lights up when GIER is waiting for an external unit. Str.læs. par.fejl lights when GIER is stopped with a paper tape parity error. Tromle fejl lights up if you try to write on a write-protected track or read/write a non-existing track. The simulator is trapped in the instruction in error until Reset is pressed. TO fejl lights when GIER encounters an unknown instruction. HP spærret lights when the HP button is inhibited. In this GIER simulator, the HP button is inhibited by setting bit 0 to one in the by register. i-løkke lights during indirect addressing; if this light is on permanent, GIER is trapped in an eternal chain of indirect addresses.
The Reset button works like MIKROTEMPI STOP on the main panel.
The HP button calls the HJÆLP or Help-3 system: The first 40 cells in the core store are stored on track 38 on the drum/disc, track 0 is read in, the program counter is stored in cell 0, and execution starts in cell 1. The code on track 0 will normally generate a parity check of the rest of the Help-3 system on the locked tracks 1-31, store the contents of the core on the drum, and start a command interpreter that accepts commands from the typewriter.
The switches at the bottom connect the bits in the by register with the external devices. The selection displayed is the normal selection: by value 8 is the lineprinter, 16 the typewriter, and 32 the paper tape punch.
Figure 4: The paper tape reader in the GIER simulator.
Click on Reset to load a new "tape". Tapes in this GIER simulator are files, stored on the PC disc. The Linux version of the simulator accepts only tapes in Flexowriter code, default with the extension .flx. The windows version accepts Flexowriter tapes as well as ASCII tapes. Tapes in ASCII should have the extension: .asc.
The row of holes above the ^-sign is the next character read by GIER. Above the "paper tape" is the character printed in lowercase.
The Read, Skip, and Up buttons are currently not implemented.
Figure 5: The paper tape punch of the GIER simulator.
If a character is sent to the paper tape punch, a window pops up requiring you to select a filename. Characters punched are appended to this file, until End Tape is pressed.
The punch can only produce tapes in Flexowriter code. In Linux, you can use the programs a2flx and flx2a to convert between ASCII and Flexowriter code.
A convertion table is located later in this document.
Figure 6: The typewriter in the GIER simulator.
The typewriter is used for both input and output. If GIER waits for input from the typewriter, the text INPUT (in green) is displayed in the upper right corner, like the green light on a real GIER typewriter. Select the typewriter window with the mouse, and use the keyboard on the computer to enter keystrokes.
Note: GIER has a typewriter with Danish layout. You will need to change your keyboard layout to write the Danish characters æ, ø, and å.
Figure 7: The lineprinter in the GIER simulator.
The Linux version of the lineprinter converts characters sent to the line printer into PostScript.
Use the lpr command in Linux to send the file produced to your printer.
The line printer in the Windows version works quite differently. Lines are buffered in the simulator until you press Start printing. Use Printer Setup before the printing anything in the GIER simulator. The fields Lines per inch and Lines per page should match the font and paper size you've selected.
When you start the GIER simulator, the contents of the core store, drum(s)/disc, and possible the buffer store is read in from a file, default.gier, in the current directory. If this file is missing, or you start from scratch by selecting New from the File menu, all cells in the core store, drum(s)/disc, and buffer are set to zero.
The GIER machine does not contain any BIOS, so in order to load the operating system, you'll have to manually enter a few cells on the control panel, and start reading tapes with the operating system.
The following is an example of how to create a GIER machine with a disc replacing the drum and a buffer store. More details on how to load a HELP-3 system are presented in the book A Manual of HELP 3.
First, erase the GIER machine by selecting New from the File menu. Select Disc and enable the buffer store.
Enable writing on track 0 and tracks 1-31 by deselecting these items in the Options menu.
Proceed as follows:
A listing of the catalog is produced by the command: "list,a<" You will see that the last program (print) starts on track 94 and fills 20 tracks. The first free track is 114. This number must be used when we load the GIER ALGOL 4 compiler.
Note, there are many ways one can generate a Help-3 system. I have not found any suggestions for doing this optimally. The one just described seems to work...
The first two commands to be used when you have started Help-3 is the command "check<" to calculate checksums of the disc areas, and the command "start,xx.xx.xx<" to set the date.
You can't use the backspace key to correct mistakes when writing commands to Help-3, because a GIER typewriter does not have a backspace key. If you make a mistake, you can tell GIER to ignore the whole line by typing the character å.
The GIER ALGOL 4 compiler is distributed as a series of tapes. The tapes are in the tapes/ga4 directory. One must load the first tape, set some parameters, and load the rest of the tapes. The last tape moves the compiler to the right place on the drum/disc.
To install a compiler on a system as created in the previous chapter, do as follows:
Your compiler is now in place. Store your GIER configuration!
Write "list,a<" to list the catalog. The ga4 entry should appear last.
To test the compiler, load the tape "demon3.flx" from the demo directory in the reader and give the command "r,algol<". After a while, GIER writes "ok", and waits for further input from the paper tape reader (because of the "r," in the beginning of the last command). Stop GIER by pressing Reset on the auxilliary control board, followed by pressing HP. Start the program by writing "run<". You can now play the game NIM!
You can write the code using any ASCII editor, e.g. notepad in Windows or vi in Linux. Store the file with the extension ".asc".
The paper tape reader in the Windows version of the simulator can read ASCII tapes directly.
In Linux, you'll need to convert the file into Flexowriter code manuallly:
$ a2flx <file.asc >file.flx
We will write a simple program that prints a table of the factorial function, i.e. the products of the integers 1 to the number n.
The program could look like this:
_b_e_g_i_n _i_n_t_e_g_e_r n; _r_e_a_l _p_r_o_c_e_d_u_r_e fac(n); _v_a_l_u_e n; _r_e_a_l n; fac := _i_f n=0 _t_h_e_n 1 _e_l_s_e fac(n-1)*n; select(17); _f_o_r n := 0 _s_t_e_p 1 _u_n_t_i_l 50 _d_o _b_e_g_i_n writecr; write(|<dddd|>, n); write(|< d.ddddd'-ddd|>, fac(n)) _e_n_d for n _e_n_d program
Note the following:
Start the GIER simulator. If you previously have installed Help-3 and the GIER ALGOL 4 compiler, everything is now ready to compile the program.
Load the program file in the paper tape reader.
Press Reset followed by HP on the auxilliary control panel.
Write the command "r,algol<" on the typewriter. GIER starts the compiler, reads the tape, compiles the program, and stores the compiled program in the area work.
Stop GIER waiting for further input from the reader by pressing Reset and HP.
Write the command "run<" to start the program. The table is printed on the typewriter. You can redirect the output to another device using the buttons on the auxilliary control panel or by changing the value in the call of the standard procedure select in the program.
Changes in the program are made either in the ASCII version of the "tape", or you can use the tape editing program, edit, in Help-3. However, this is not so easy to use.
You will find a lot of Algol programs in the demo directory.
The program a2flx or the conversion utility build into the reader in the Windows version of the simulator use the following conversion rules:
The conversion automatically inserts the necessary case shift characters.
You can find more GIER software in our Software database.
(C) Copyright 2002-2004 by Mogens Kjær, email@example.com