IDIAC Stored Program Computer Emulator About Page

About IDIAC Index:

Overview

IDIAC is a web based interactive educational tool consisting of a simple stored program computer emulator.  The IDIAC computer has 10 instructions, one hundred 64 bit words of memory, one instruction address register, one 64 bit arithmetic register, and one condition code register.  Anyone with Internet access can learn to write IDIAC programs in machine language and assembly language and then interactively debug and execute them. 

Users who find IDIAC useful are encouraged to share it with other family members and friends.  IDIAC was my first introduction to stored program computers and it led to a career in Information Technology including lots of programming which I still love doing today.  See the
history of IDIAC.  There is an open IDIAC Facebook group for users to learn from each other and share information including example IDIAC source programs which can be uploaded and downloaded or simply opened to copy and paste source code to the IDIAC console for loading and execution.  Users are encouraged to join the group and post questions and also share any example source programs they would like to inclusion on the IDIAC Example Program Page.

The
IDIAC open source tool is now available in both PHP and Java.  The PHP version runs on a web server at www.idiac.org and has been tested using most browsers on PC's, tablets, and cell phones including Chrome, Firefox, Internet Explorer, Opera, and Safari.  Currently Network Solutions provides the www.idiac.org website hosting service.  The server running the PHP IDIAC emulator code indicates that it is capable of IDIAC instruction execution rate of up to about 10 million instructions per elapsed second (MIPS).  However, most of the time the server has a shared workload of other websites which results in a calculated MIPS rate of about 0.3 MIPS or 300,000 IDIAC instructions per elapsed second.  At the end of each IDIAC execution run, the total number of instruction is divided by the elapsed time to calculate an approximate MIPS rate.  Source idiac programs can be copy and pasted from text file or entered directly followed by IPL and RUN to execute the idiac program loaded in memory by the IPL process.

The Java version can be downloaded as idiac.jar executable file and run on any platform supporting J2SE Java.  On an Intel i7 core processor, idiac instructions can be executed at over 40 MIPS.  Both versions support copy and paste or direct entry of idiac source code.  The Java version also supports reading text source program files from directory on the platform it is running on.  The default directory can be specified as parameter to the idiac.jar file. 

All the example programs have been run on both the PHP and Java versions of idiac.

Machine Console Home Page


The
www.idiac.org home page serves as the console to perform initial program load (IPL), run and step commands.  Additionally the console supports copying and pasting program code to or from a text area from which the IPL loads machine language or assembly language code.
The console also displays memory contents and requested instruction trace (up to last 100 instructions with default last 10 instructions).  The trace entries contain the following:

Instruction ID Sequential ID from first instruction following last IPL
Instruction LOC memory location of current instruction (0 to 99)
Instruction memory memory location content
Instruction label Assigned assembly language instruction or data label if any
Instruction operation Operation code (L, ST, A, S, M, D, C, BP, BZ, B) or ? if undefined
Operand label Assigned assembly language operand label if any
Operand address Operand address (0 to 99)
Register Register content
Condition Code Condition code set by A, S, M, D, or C to indicate high, equal, or low


Machine Instructions

Each machine instruction consists of 2 digit operation code followed by 2 digit memory address.   The 4 arithmetic instructions plus compare instruction set the condition code to indicate positive, zero, or negative result.  The load and store plus 3 branch instructions do not change the condition code.  After IPL, execution always started at memory location 0.


Opcode  Mnemonic  Operation
01 L load register from memory address location
02 ST store register at memory address location
03 A add word at memory address to register and set condition
04 S subtract word at memory address from register and set condition
05 M Multiply register by word at memory address and set condition
06 D divide register by word at memory address and set condition
07 C compare register to word at memory address and set condition
08 BP branch if condition positive to instruction at memory address
09 BZ branch if condition zero to instruction at memory address
10 B branch to instruction at memory address



IDIAC execution  will terminate for any of the following conditions:
  • Undefined operation code (1-10)
  • Run Limit Exceeded
  • Divide by zero
  • End of memory invalid address
  • Any branch instruction that branches to itself


Machine Language

Machine language instruction codes can be entered directly into the text area on the IDIAC home page console or the code can be copied and pasted from any of the IDIAC Examples or from any text files that you can save on your computer.  Each machine word value must be separated by semicolon or line feed character (enter key).  Comment lines starting with '*' are allowed and comments can follow each machine word value label references and machine values with leading space.  Here is an example of IDIAC machine language code for 3 word instruction counter loop: "302;1000;1"

IDIAC Assembly Language

Assembly language may be substituted for machine language by coding optional instruction label, operation code mnemonic, address label, and optional constants.

Instruction Label Optional Label starting in first position with character > '9'.  Lines starting with * are ignored as comments.
Operation mnemonic L, ST, A, S, M, D, C, BP, BZ, B or numeric value for memory word
Operand Label Label referencing Instruction label or literal starting with # followed by numeric value, preceded by space
Comments Optional comments preceded by space, may not contain double quotes
Delimiter Statements may be terminated by semicolon or line feed (return)

The Initial program loader performs the following steps to load assembler language:

  1. Load each instruction into memory starting at location 0.  Instruction labels are added to defined label table with assigned memory location.  Instruction mnemonics are converted to numeric value multiplied by 100 and stored in assigned memory word.  Operand labels are added to reference label table with reference location. Literals are also added to the reference label table.

  2. The reference table is searched for literal labels starting with #.  Unique literals are allocated to memory locations following last instruction and are set to the literal value.  Non-duplicate literal labels are added to the defined label table.

  3. Add one additional defined label named "END" allocated to the next word in memory after the last literal.  This label can be referenced in any IDIAC assembler program to address memory beyond the program for storing data.  See prime number and powers of 2 examples which use memory beyond program to build tables with results which can be viewed in the memory dump after execution.

  4. The reference table is searched again for each label or literal.  For each reference, the defined label table is searched for a matching label.  If found the defined label memory location is added to the referenced instruction word to complete .


  5. Instruction labels and operand labels must match case.  Operation mnemonics can be in upper or lower case.  Here is example of IDIAC assembler language code for 2 instruction counter loop:  "LOOP A #1; B LOOP".   Note the assembler assigns the constant to the next location in memory and sets the operand address in the add instruction.

Open Source PHP Version for the Web

The IDIAC open source PHP Version can be downloaded, modified, and implemented on your own web server.  The source module idiac/php/idiac_console.php consists of about 800 lines of PHP and HTML code to support the IDIAC console user interface, the IPL loader, the emulator, the trace table, and memory dump.  Some future development options might include the following:
  • Add more instructions
  • Expand memory
  • Support different data types such as text,  floating point, and hex
  • Support input and output options
  • Rewrite IDIAC 800 lines of PHP in Java in order to port execution to Windows, Linux, and Apple OSX (under development below)

Open Source Java Version for Windows, Linux, and Apple OSX

As of 2017/07/30 version V1.04 of IDIAC can be can be downloaded with a complete J2SE Java GUI console interface that supports menu with File (open, save, save as, ignore changes, exit), Edit (cut, copy, paste, and select all), View (Edit view, Run view), IPL, RUN, STEP, About, and Help.  The GUI has three scrolling panels: one for log of all actions, one for idiac source program,  and one for display of execution instruction trace table and memory.  The source module idiac.java consists of about 900 lines of Java code which can be compiled and linked into executable  idiac.jar file.  Once Java SE 8.1+ has been installed, you can double click on the idiac.jar file to execute it and bring up idiac GUI interface.  See the idiac/java/readme.txt for more information on java and eclipse IDE to use for java development. 

  • Add IDIAC Java support for mobile Android devices.

Regardless of your age, if IDIAC wets your appetite to take up system software development as your passion, here are some additional options:

History of IDIAC

In 1966 Dr. R. J. Wimmert, Chairman of the USF College of Engineering Industrial Department taught a course on FORTRAN programming for all engineering undergraduates which included IDIAC machine language as introduction to stored program computers.  At the time USF had an IBM 1410 mainframe and FORTRAN programs had to be punched on cards and submitted for overnight batch processing.  There were no PC's, cell phones, or Internet.  Read more on the early  History of USF College of Engineering

With the launch of this www.idiac.org website anyone with Internet access can learn about how all stored program computers work by coding and executing IDIAC Machine Language programs.  A very basic IDIAC Assembler Language is included to aide in coding more complex programs.  The assembler language support translates assembler language with alphabetic labels and operation codes into the equivalent machine code.  After coding a program with more than a few instructions, the power of assembler to make programs more readable and less error prone becomes clear.

If you have more questions about IDIAC, please join the Facebook IDIAC Discussion Group where members can learn together.
 
 
 
 
Copyright 2017 Don Higgins under open source general public license
Version  Open Source Downloads