Java Reference
In-Depth Information
/* 8 */ CPU.LOADA ! " 17",
/* 9 */ CPU.LOADB ! " 16",
/* 10 */ CPU.MOVEAB,
/* 11 */ CPU.JUMP ! " 0",
/* 12 */ CPU.HALT,
/* 13 */ "12",
/* 14 */ "-1",
/* 15 */ "20",
/* 16 */ "0",
/* 17 */ "99",
/* 18 */ "0",
/* 19 */ "0",
/* 20 */ "0",
/* 21 */ "0",
/* 22 */ "0",
/* 23 */ "0",
/* 24 */ "0",
/* 25 */ "0",
/* 26 */ "0",
/* 27 */ "0",
/* 28 */ "0",
/* 29 */ "0",
/* 30 */ "0",
/* 31 */ "0",
};
}
5.6
Prototype 3: Persistent programs
The goal of the third prototype is to extend the simulator with the capability
of simulating input, output and storage devices. Once a storage device is
available, it is possible to load programs from it.
5.6.1
Analysis
The simulator is extended with three new components: keyboard, display
and hard disk. The keyboard enables the CPU to receive input from the user.
Actually it reads character strings that are entered through the keyboard
and writes them on the bus when requested by the CPU. The display prints
on the screen the character strings that are on the data bus when requested
by the CPU. The hard disk device is able to open a file and to read it line by
line. Accordingly, the instruction set is extended with the instructions set
out in Table 5.6.
 
Search WWH ::




Custom Search