Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Assignment No. 02 Semester: Spring 2012 CS609: System Programming
#1
The objective of this assignment is to enhance your knowledge about;
 Basic concepts of System programming.
 Serial port Communication
Assignment

Attached please find a slightly modified version C-language program (ASSGN2.C) extracted from course handouts (page 127-129). In this program, we are taking input from user and writing these input characters to COM port in a Self Test mode i.e. in self test mode the output of the UART is routed to its input. So you receive what you send.

Part a) Read and Study the given program (ASSGN2.C) carefully and answer the following question. (02 Marks Each)

S.No. Question Answer
1 Which COM port is being used in the given program?
2 Which Key (when pressed) will terminate program execution?
3 What is the size of Word Length (in bits) being used in this program for data transmission?
4 What is the size of Stop bits being used in this program?
5 Is parity being used is this program? If Yes, then state Even or Odd.
6 What is the Baud rate being used is this program?

Part b) Execute the attached program (ASSGN2.C) and Take a snapshot after typing the following statement on output screen. (Note: You may get a warning while opening the port… Click Ignore) (08 Marks)

“I am a Student of VU and my ID is [Type your ID here]”
Allah Help those Who help them SelvesConfusedmileys44:
Reply
#2
Code:
#include <dos.h> #include <bios.h> #include <conio.h> void initialize (unsigned int far *com) { outportb ( (*com)+3, inport ((*com)+3) | 0x80); outportb ( (*com),0x60); outportb( (*com) +1, 0x00); outportb ( (*com)+3, 0x02); } void SelfTestOn(unsigned int far * com) { outportb((*com)+4,inport((*com)+4)|0x10); } void SelfTestOff(unsigned int far * com) { outportb( (*com)+4, inport((*com)+4) & 0xEf); } void writechar( char ch, unsigned int far * com) { while ( !((inportb((*com)+5) & 0x20) == 0x20)); outport(*com,ch); } char readchar( unsigned int far *com) { while (!((inportb((*com)+5) & 0x01)==0x01)); return inportb(*com); } unsigned int far *com=(unsigned int far*) 0x00400002; void main () { char ch = 0; int i = 1;int j= 1; char ch2='A'; initialize( com); SelfTestOn(com); clrscr(); while (ch!=64) { if (i==80) { j++; i=0; } if (j==13) j=0; gotoxy(i,j); ch=getche(); writechar(ch,com); ch2=readchar(com); gotoxy(80-i,j+14); putch(ch2); i++; } SelfTestOff (com); }
Allah Help those Who help them SelvesConfusedmileys44:
Reply
#3
cs609 solution required..
Reply
#4
solution plz
Reply
#5
sab ko hi solution chaheya.... ajj mujay bhi chheya solution.....

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply
#6
I also need the solution of cs609 assignment 2
Reply
#7
lagy raho.....last semester ne sara pani nikalna ha......kafi tough assignment han es subject ka
Reply
#8
tough tu nahi han. ager app khud karen tu.
Reply
#9
solution plz????????????????????????????????????
Reply
#10
updated soon..........

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,319 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,904 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,924 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,159 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,237 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 1,962 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,658 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,793 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,695 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,794 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)