SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void showProcess() {
  2.    int i;
  3.    char processPID[9];
  4.    char processState[9];
  5.    char enter[3];
  6.    struct PCB *process0, *process1, *process2, *process3;
  7.    struct PCB *process4, *process5, *process6, *process7;
  8.    for (i = 0 ; i < 9 ; i++) {
  9.       processPID[i] = '\0';
  10.       processState[i] = '\0';
  11.    }
  12.  
  13.  
  14.    i = 0;
  15.    setKernelDataSegment();
  16.    process0 = pcbPool + 0;
  17.    process1 = pcbPool + 1;
  18.    process2 = pcbPool + 2;
  19.    process3 = pcbPool + 3;
  20.    process4 = pcbPool + 4;
  21.    process5 = pcbPool + 5;
  22.    process6 = pcbPool + 6;
  23.    process7 = pcbPool + 7;
  24.  
  25.    processPID[0] = convSegmentToPID(process0->segment);
  26.    processState[0] = process0->state + '0';
  27.    processPID[1] = convSegmentToPID(process1->segment);
  28.    processState[1] = process1->state + '0';
  29.    processPID[2] = convSegmentToPID(process2->segment);
  30.    processState[2] = process2->state + '0';
  31.    processPID[3] = convSegmentToPID(process3->segment);
  32.    processState[3] = process3->state + '0';
  33.    processPID[4] = convSegmentToPID(process4->segment);
  34.    processState[4] = process4->state + '0';
  35.    processPID[5] = convSegmentToPID(process5->segment);
  36.    processState[5] = process5->state + '0';
  37.    processPID[6] = convSegmentToPID(process6->segment);
  38.    processState[6] = process6->state + '0';
  39.    processPID[7] = convSegmentToPID(process7->segment);
  40.    processState[7] = process7->state + '0';
  41.    restoreDataSegment();
  42.  
  43.    enter[0] = '\n';
  44.    enter[1] = '\r';
  45.    enter[2] = '\0';
  46.  
  47.    interrupt(0x21,0x00, processPID, 0x00 ,0x00);
  48.    interrupt(0x21,0x00, enter, 0x00 ,0x00);
  49.    interrupt(0x21,0x00, processState, 0x00, 0x00);
  50. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top