A machine instruction is a pattern of bits that asks for one machine operation to be executed.
Each MIPS machine instruction is 32 bits (four bytes) long. The three lines after main: call for three machine instructions. The remaining lines consist of information for the assembler and comments (for the human).
For this first program some SPIM options must be set. For Windows, in the menu bar, click on Simulator then Settings to get the settings dialog. For Mac, in the menu bar, click on QtSpim then Preferences to get the settings dialog. Select the following options:
|ON||Save window positions|
|ON||General registers in hexadecimal|
|OFF||Floating point registers in hexadecimal|
|OFF||Allow pseudo instructions|
|OFF||Load trap file|
These settings simulate a bare machine with no user conveniences. Later we will include the conveniences.
(Thought Question) Do most actual computers start up as a bare machine?