Every program for the ENIAC simulator consists of three major parts, the content, connect, and action blocks, which are enclosed in HTML-like tags. Comment lines have to start with a hash sign (#) or a double hash (##) for printing comments. Printing comment lines will be output on the ENIAC output screen during compilation. They can be used for short explanations of what the program does, and which accumulators it uses (try the example program files).
The reserved words content, connect, and action can easily be changed to suit different moods of the programmer (cf. class eniac.control.Loader).
The content block states
initial values for the accumulators and the fields of the constant
transmitter. Its syntax is
content_block ::=
"<content>"
{ content_line }
"</content>"
content_line ::=
accu_name
long_value
content_line ::=
const_name
const_field
long_value
(
means a literal tabulator,
means
a literal newline character. For unit and trunk names, see
Table 2.)
| Unit | unit_name |
| initializing unit | init |
| accumulators | accu 1 |
| constant transmitter | const |
| printer | |
| digit trunks | I, II, III, IV, V |
| program trunks | A-1 |
Wired connections between units or between different ports on
the same unit can be expressed in the connect block. As
on the original machine, a trunk must be used for every interconnection.
Thus, we have to specify a sender (unit and output port, or trunk)
and a receiver (trunk, or unit and input port) to establish a
connection.
connect_block ::=
"<connect>"
{ connect_line }
"</connect>"
connect_line ::=
unit_name
port_name
trunk_name
connect_line ::=
trunk_name
unit_name
port_name
{
unit_name
port_name }
The action block is exclusively for programming switch
settings on the accumulator units. As there are repetetive (5-8)
and non-repetitive program switches (1-4), the syntax is
varying. Every switch has a name (its number), and states an
action (expressed by alpha
epsilon, NOP, A, AS, or
S). Repetitive program switches take another two
optional arguments, the repetition count, and clear-correct
switch setting ("cc" means the switch is set).
action_block ::=
"<action>"
{ action_line }
"</action>"
action_line ::=
accu_name
switch_name
action_name
[
repeat_count ] [
"cc" ]