Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Program: Write a Terminate and Stay Resident program that will displayyour Name

ID: 3618299 • Letter: P

Question

Program: Write a Terminate and Stay Resident program that will displayyour Name and VU ID (ABC, xC0xxxxxxxx) in the centre of theblank screen after 5 seconds (only if no operation is performed for5 sec) and whenever Alt+Ctrl+Q is pressed your program shouldrestore the previous screen (i.e. screen before displaying your idand name). Q2: Can DMA be used for multi-core processors? If Yes, forwhat purpose? What is the concept of RDMA (Remote Direct memoryAccess)? Write a Terminate and Stay Resident program that will displayyour Name and VU ID (ABC, xC0xxxxxxxx) in the centre of theblank screen after 5 seconds (only if no operation is performed for5 sec) and whenever Alt+Ctrl+Q is pressed your program shouldrestore the previous screen (i.e. screen before displaying your idand name). Q2: Can DMA be used for multi-core processors? If Yes, forwhat purpose? What is the concept of RDMA (Remote Direct memoryAccess)?

Explanation / Answer

Don't forget to change your ID in code. #include #include void interrupt (*oldTimer)(void); void interrupt (*oldKey)(void); void interrupt newTimer ( ); void interrupt newKey ( ); void clearScreen(void); void printInfo(int); char far *scr = (char far* ) 0xB8000000; //Address of videomemory. char far *kbd = (char far* ) 0x00400017; //Keyboard statusbyte. int i, t = 0, m = 0; char charscr [4000]; void main( ) { oldTimer = getvect(8); //Save the old timer routine in oldTimer(interrupt function pointer) oldKey = getvect (9); //Save the old keyboard routine in oldKey(interrupt function pointer) setvect (8,newTimer); //Replace the functionality of orginalroutine with new one. setvect (9,newKey); keep(0,1000); //Making this program TSR getch(); getch(); } //This function will be invoked after every 1/18.2 th ofsecond. void interrupt newTimer ( ) { t++; if((t >= 91) && (m == 0)) { for (i =0; i < 4000; i ++) { charscr [i] = *(scr + i); //Save the original screen into charscr[]array } m=1; } if (t >= 91 && m == 1) //Check if 5 seconds havepassed. { clearScreen(); printInfo(1990); } (*oldTimer) ( ); } void clearScreen() { int i; // Write the spaces with withe back color in whole screen for (i =0; i