Java Reference
In-Depth Information
Table 5.8 Bootstrap program
Loc.
Content
Type
Description
1
Code
Open the configuration file
FOPEN 22
2
Code
Read the name of the executable file
FREAD 26
3
Code
Close the configuration file
FCLOSE
4
Code
Open the executable file
FOPEN 26
5
Code
Read the number of instructions of the executable file
FREAD 27
6
Code
Load into register A the number of instructions (yet to be read)
LOADA 27
7
Code
If it is zero then end the loop
JUMPZ 20
8
Code
Load into register B the address of the location for the next
instruction
LOADB 25
9
Code
Read the next instruction
FREAD 28
0
Code
Load it into register A
LOADA 28
10
Code
Move the instruction into the location (in register B)
MOVEAB
11
Code
Load the address of the current instructions
LOADA 25
12
Code
Load the increment (1)
LOADB 23
13
Code
Increment the address of the current instructions
ADD
14
Code
Store it
STOREA 25
15
Code
Load the number of instructions yet to be read
LOADA 27
16
Code
Load the increment (01)
LOADB 24
17
Code
Decrement the number of instructions yet to be read
ADD
18
Code
Store it
STOREA 27
19
Code
Jump to the beginning of the loop
JUMP 6
20
Code
Close the executable file
FCLOSE
21
Code
Jump to the first loaded instructions
JUMP 100
22
Data
Name of the configuration file
boot.ini
23
Data
Increment for address of instructions
1
24
Data
Decrement for number of instructions yet to be read
0 1
25
Data
Location of the next instruction: the first instruction is loaded at
location 100
100
26
Data
Will contain the name of the executable file
0
27
Data
Will contain the number of instructions of the executable file
0
28
Data
Will contain the last instruction read
0
architecture, such as the printer or the mouse. The CPU could be extended
by implementing internal components, such as the cache memory, the
arithmetic logic unit (ALU), and the read only memory (ROM).
It would be interesting to develop a graphical user interface that depicts
and animates the finite state machines describing the behaviour of the
simulator components.
5.8
Assessment
Analysis techniques . We analysed the description of a problem domain and
mapped the domain entities (the components of computer architecture) into
classes; then we described their associations and their behaviour.
 
Search WWH ::




Custom Search