We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 2 Semester: Fall 2015 System Programming-CS609 Total Marks: 20 Due Date: june 11, 2015

Instructions

Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:

 

  • Assignment is submitted after due date.
  • Submitted assignment does not open or file is corrupt.
  • Assignment is copied (From internet/ to from students).

 

Assignment Submission Instructions

Zip file containing A2.c and A2.doc files

 

Assignment

 

 

[Marks = 20]

 

Write a C program to generate encoded text and print it using COM PORTS. When a key is pressed from keyboard, get its ASCII Code, add 1 in its ASCII Code value and use it as output of UART to direct the output to the lower part of the output screen.

 

Hint: Make sure to ON Self Test mode.

 

Sample output screen is as under;

 

 

Important Instructions:

 

ü  You have to submit your A2.c file containing your code and A2.doc file containing code of A2.c as text. Zip both files and upload on LMS page of CS609.

ü  Your assignment is checked for plagiarism, if found to be copied from internet or from / to students, it will award as zero straight away.

ü  15 Marks are for written code while 5 marks are for output format specified in sample output screen.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 11295

.

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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

bhai log ur IIn ki bhan log kaha ho aa jaaaoo solution ka liye

koi to kuch idea dy... kesy bany gi assigment... A2.c or A2.doc ya kon c files hy?

You have to save written code in tubro c compiler with extension .c and name it as A2.   

solution plz

koi Allah ka bnda solutn snd kr dy

code nai hai 

trying for code

void sendchar (char ch, int pno)
{
_DX = pno;
_AH = 1;
_AL = ch;
geninterrupt (0x14);
}
unsigned int getcomstatus (int pno)
{
unsigned int temp;
_DX = pno;
_AH = 03;
geninterrupt (0x14);
*((char*)(&temp)) = _AL;
*(((char*)(&temp)) + 1) = _AH;
return temp;
}
the sendchar() function sends a character to the COM port using BIOS service whose
number is passed as parameter. And the getcomstatus() function retrieves the status of the
COM port whose number has been specified and returns the modem and line status in an
unsigned int.
void main()
{
while(1) {
i = getcomstatus (0);
if (((*(((char*)(&i)) + 1)&0x20) == 0x20) && (kbhit()))
{
ch1 = getche();
sendchar (ch1, 0);
}i
f ((*(((char*)(&i)) +1) & 0x01) == 0x01) {
ch2 = receivechar (0);
putch (ch2);
}i
f ((ch1 == 27) || (ch2 ==27))
break;
}
}
Let’s suppose two UARTs are interconnected using a NULL modem
In the main () function there is a while loop which retrieves the status of the COM port.
Once the status has been retrieved it checks if a byte can be transmitted, if a key has been
pressed and its is clear to send a byte the code within the if statement sends the input byte
to the COM port using sendchar() function.
The second if statement checks if a byte can be read from the COM port. If the Data
ready bit is set then it receives a byte from the data port and displays it on the screen.
Moreover there is another check to end the program. The program looks for an escape
character ASCII = 27 either in input or in output. If this is the case then it simply breaks
the loop.

kya koi bata sakta hai k yeh code thek hai yeh nai handout se lia hai dekha b hai confirm karna hai page 125 and 126 hai

Saria khan this code is use for communication between two computer. so dont waste your time on it.

Lagta ha solution mil e gia ha

 

I got same typ of output bt this out put iz not matching with assignment'z out put. 

RSS

Latest Activity

+ ! ! ! ! ᎠixieᎠuຮt꧂ replied to +¢αяєℓєѕѕ gιяℓ's discussion Jin sey Mohabbat Ho.....
19 minutes ago
+ ! ! ! ! ! !blaire liked + Iuuoɔǝut+'s discussion koi asa shaks hua kare ....
22 minutes ago
+ ! ! ! ! ! !blaire liked + ! ! ! ! Noor E Kayenat's discussion When you know the truth !!
23 minutes ago
+ ! ! ! ! ! !blaire liked Biya's discussion Surat At- Tin / Ayat 4
23 minutes ago
+ ! ! ! ! ! !blaire liked Biya's discussion Surah-Al-Mulk 67 : 1 . 2
23 minutes ago
+ ! ! ! ! ! !blaire liked + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
23 minutes ago
+ ! ! ! ! ! !blaire liked +++Mahoo+++'s discussion Famous Logos With a Hidden Meaning(special for adeena)
23 minutes ago
+ ! ! ! ! ! !blaire liked Biya's discussion Surah Yusuf 12:64
23 minutes ago
+ ! ! ! ! ! !blaire liked 彡JK彡 ❤️'s discussion Dedicated To All Fake IDs............ :p:p
24 minutes ago
+ ! ! ! ! ! !blaire liked + ! ! ! ! Noor E Kayenat's discussion Girls Be Like........ :p
24 minutes ago
+ ! ! ! ! ! !blaire liked 彡JK彡 ❤️'s discussion ............. ایک تلخ حقیقت..........
24 minutes ago
+ ! ! ! ! ! !blaire liked + !! SARAH's discussion + i dnt knw where it could fit into ur story but it is......!!
24 minutes ago
+ ! ! ! ! ! !blaire liked + "Jɨyą's discussion okey :x
24 minutes ago
+ ! ! ! ! ! !blaire liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion Dedicated to All teachers
24 minutes ago
+ ! ! ! ! ! !blaire liked +¢αяєℓєѕѕ gιяℓ's discussion xD.........................پرانی محبوبہ کے نام
24 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked +++Mahoo+++'s discussion Famous Logos With a Hidden Meaning(special for adeena)
33 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + ! ! ! ! Noor E Kayenat's discussion Girls Be Like........ :p
33 minutes ago
+ ! ! ! ! ᎠixieᎠuຮt꧂ replied to +¢αяєℓєѕѕ gιяℓ's discussion xD.........................پرانی محبوبہ کے نام
35 minutes ago
+ ! ! ! ! ᎠixieᎠuຮt꧂ replied to + "Jɨyą's discussion okey :x
59 minutes ago
+ ! ! ! ! ᎠixieᎠuຮt꧂ replied to + "Jɨyą's discussion okey :x
1 hour ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service