Main()

float *students, *tests, *assns

1. Show page table

Load( *students, "students" )
3. Show page table

Load( *assns, "assigments" )
5. Show page table

Load( *tests, "tests" )
7. Show page table

Calc( *students, *tests, .6, TEST )
9. Show page table

Calc( *students, *assns, .4, ASSN )
11. Show page table

Print( *students, *assns, *tests )
13. Show page table

Exit
Load( &Array, Fname )

Open Fname

// Read 1st record of file to 
// determine number of entries 
size_info = read( Fname )

// Allocate memory to hold records to
// be read in. At this point, memory
// for the array will be placed in a
// real memory frame.
// * Allocate function is system call 
//     - not in vm space *
Allocate( &Array, size_info )

While ( Not = EOF )
  Read Fname into Array
EndWhile

2. & 4. & 6.  Show page table
Return
Print( &students, &assns, &tests )

  For each student in students
  Do
    // Display a specific record from the 
    // student array, then the assignment
    // array, and finally the test array.
    Display students[student].info;

    Display assns[student];

    Display tests[student];

  EndFor
 
12. Show page table

Return
Calc( &students, &grades, wgt, type )

// accessing students array
For each stu in students
Do
  students[stu].type += 
    grades[stu] * wgt;   
Done

8. & 10. Show page table