{
//first init page table
// and work list
// look for the work list and pick one to fix the page table
for(int i=0; i<12;i++)
{
printf("Instruction sequence :%d\n",i+1);
int j = work[i].pageNumber;
printf("The page %d is in the memory?
%s!\n",j,(pageTAB[j].flag == YES)?"YES":"NO");
if(pageTAB[j].flag == YES)
{
int absoluteAddress =
pageTAB[j].memoryBlock*blockLength+work[i].unitNumber;
printf("Instruction absolute
address:%d\n",absoluteAddress);
}
else
{
printf("missing page interrupt, page fault interrupt!\n");
}
}