We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# CS609 System Programming Assignment No 01 Solution & Discussion Spring 2019 Due Date: 13-05-2019

CS609 System Programming Assignment No 01 Solution & Discussion Spring 2019 Due Date: 13-05-2019

Problem Statement:You are required to writ C program using interrupt 65H to print your own Student ID, Name or your Study Program depending upon the number input i.e 1,2,3 respectively. When the user enters 1 it will print your own Student ID, if 2 then print your own Name and finally, if the user enters 3, it will print your Study Program.Instructions:Declare 3 character strings st1,st2,st3 having Student ID, Name and Study Program You should save interrupt 65H vector in a pointer to vector variable name oldint65 through getvect instruction. Call any new function i.e newint65( ) through setvect instruction.Through printf instruction, show message “What you want to print: Press 1,2,3= ” i.eprintf(“What you want to print: Press 1,2,3= ”);Then use scanf to take input input in an integer variable i.e scanf(“%d”, &i)In this program, you will implement interrupt 65H which is currently not used by operating system.Place service number in AH register. Interrupt 65H will check its value and will perform relevant function.Interrupt 65H function must check for Service Number using Switch Statement. In Case of Service Number 1, it should print Student ID i.e BC123456 and in case of Service Number is 2, it should print your own full name i.e Ali Ahmad. Similarly your study program i.e BS/MCS etc should be printed in case of number 3.Use keep() function to make this program TSR.
Note: Your assignment solution will be in this Word file (.doc or .docx) containing code of C only as given in sample solution:
Best of Luck!

Sample Solution://Header Files#include<stdio.H>#include<BIOS.H>#include<DOS.H>#include<conio.H>void interrupt (*oldint 65)(); //To store current interruptchar str1[80]={“BC123456\$”}  // Write your own particularschar str2[80]={“Ali Ahmad\$”}char str3[80]={“Degree Program:  BS\$”}int i;void interrupt newint65(void);  //NewInt prototypevoid main(){// Keep vector of current INT//setting to newint65 clrscr();printf(“What you want to print: Press 1,2,3=>”);scanf(“%d”,&i);_AH=i;getch();}void interrupt newint65(){ switch(i){  case 1:           //Service Number  // Register for output.  break; } case 2:      break; } case 3:      break; } default:  {  }}

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 6496

### Replies to This Discussion

koi bhe slution tkh nh hai.

bhaj do bhai boht sari try kr li koi ni mil rahi he

Where is the solution file

in case any issue please comment.

sorry for mistake in previous post.

#include<stdio.h>#include<stdio.h>#include<BIOS.H>#include<DOS.H>#include<conio.h>
void interrupt (*oldint65)();void interrupt newint65(void);
int i;
void main(){
oldint65 = getvect(0x65);
setvect(0x65, newint65);
clrscr();

printf("What you want to print: Press 1,2,3=>");

scanf("%d",&i);

_AH=i; geninterrupt(0x65); getch();
}
void interrupt newint65(){ switch(i) { case 1: printf("%s",str1); break; case 2: printf("%s",str2); break; case 3: printf("%s",str3); break; default: printf("Enter Valid Number"); break;
}}

yar ye konsay software per chalay ga code?

BorlanC

you can add keep after getch();

Hi,Just a one question Did you run this program yourself? because it does not run  Neither .C Nor .CPP Format.

Code compile ho jata ha pr jb keep ka function add krta hon to run nahi hota compile ho jata ha?? aisa ku hota ha? kis line k bd add hoga keep function?

## Latest Activity

Muhammad Faizan Alam liked ･༓☾ Shayna ☽༓･'s profile
16 minutes ago
17 minutes ago
20 minutes ago
28 minutes ago
29 minutes ago
40 minutes ago
Aysha Maqbool and madi ali joined +M.Tariq Malik's group

### CS506 Web Design and Development

40 minutes ago
43 minutes ago
49 minutes ago
50 minutes ago
52 minutes ago
++!!Zuni Khan(Am Cyco) posted discussions
59 minutes ago

1

2

3