Professional Documents
Culture Documents
2
2
n20
n10
n30
4. Run full boostrap 2. Run this program
Tiny bootstrap loader program Firmware
(initial program)
Loaded
Full Boostrap Loader
3. Load full boostrap
Program
1. Power on
RAM 5. Load OS
Loaded Full bootstrap loader
OS object code Boot block
OS object code
6. Run OS
Disk
Disk
header
1.
.exe
1. Reads the executable file header to determine size of the text and data segments
2. Creates a (virtual) address space large enough for the text and data
2. 3. instruction,
3. Copies the instructions and data from the executable file into memory. 4. parameter(argements) data
4. Copies the parameters (if any) to the main program onto the stack
5. Initializes the processor registers and sets the stack pointer to the first free location.
⋮ _start_up:
lw x10, offset($sp) // load argument
f31
jal x1, main // call main routine
exit // exit after return from main
stack pointer(sp)
6.
program counter
A
B
1 3 C
2
4 D
span(S)
L S
x si s1
!
S H
span(S)
L=S