arg( IR )
arg( IR )
Figure 5.10 FSA for I
the data. Clearly this approach simulates the high-level functionalities
without taking into account the low-level details such as temporization.
The INPUT and OUTPUT instructions can be executed by the CPU intro-
ducing into the FSA the new states presented in Figure 5.10.
How does the hard disk simulate the interaction with the file system?
In real computer systems the high-level operations of opening, closing
and reading from file are implemented by the operating system. The hard
disk component emulates the combination of both a hardware device and
The FREAD instruction is similar to the INPUT instruction: it reads a line
from a text file and copies it into a memory cell.
The instructions FOPEN , FCLOSE and FREAD can be executed by the CPU
introducing into the FSA the new states presented in Figure 5.11.
The CPU new instructions can be easily implemented using the algorithm
described in Sidebar 5.2. The lengthy code resulting from the application of
the algorithm is not shown here.
Since all the classes must access information on the BUS it is important
that they share a common codification for such information. The initial
version of such information is contained in the RAM class. Since all the
devices must share this codification a better place to define it is the class