|
Main()
int * Num1, * Num2, *Total
Allocate( Num1, Num2, Total)
Load( Num1, File2 )
Load( Num2, File1 )
Init( Total )
Calc( Total, Num1, Num2 )
Print( Total ) Exit |
Allocate( Num1, Num2, Total )
//Assume getmem is a system call outside of our virtual and real memory space.
Num1 = getmem(256) //Allocate memory for array Num2 = getmem(256) //Allocate memory for array Total = getmem(256) //Allocate memory for array 2. Show page table
|
|
Init( TArray )
For i = 0 to 255 8. Show page table Return |
Load( Array, Fname )
I = 0
While ( Not = EOF ) 4. & 6. Show page table (called twice from main) Return |
|
Calc( TArray, Array1, Array2 )
For i = 0 to 255 10. Show page table Return |
Print( Array )
For i = 0 to 255 12. Show page table Return |