4.1 CODING :
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#define port 0×0378
void draw_screen();
void main()
{
long double ch;
ch = 0;
clrscr();
outportb(port,0);
draw_screen();
while(ch<=1)
{
gotoxy(55,20);
cin>>ch;
if(ch==0)
{
outportb(port,0);
gotoxy(25,7);
cout<<”System is presently in off state”;
}
else if(ch==1)
{
outportb(port,1);
gotoxy(25,7);
cout<<”System is presently in on state “;
}
}
clrscr();
}
void draw_screen()
{
int i;
for(i=2;i<80;i++)
{
gotoxy(i,1);
putch(char(205)); //Í
gotoxy(i,24);
putch(char(205)); //Í
}
for(i=2;i<24;i++)
{
gotoxy(1,i);
putch(char(186)); //º
gotoxy(80,i);
putch(char(186)); //º
}
gotoxy(1,1);
putch(char(201)); //É
gotoxy(80,1);
putch(char(187)); //»
gotoxy(80,24);
putch(char(188)); //¼
gotoxy(1,24);
putch(char(200)); //È
gotoxy(1,5);
putch(char(199)); //Ç
gotoxy(80,5);
putch(char(182)); //¶
for(i=2;i<80;i++)
{
gotoxy(i,5);
putch(char(196)); //Ä
}
for(i=2;i<30;i++)
{
gotoxy(i,12);
putch(char(196)); //Ä
gotoxy(i,16);
putch(char(196)); //Ä
}
for(i=13;i<24;i++)
{
gotoxy(30,i);
putch(char(179)); //³
gotoxy(11,i);
putch(char(179)); //³
}
gotoxy(11,12);
putch(char(194)); //Â
gotoxy(11,24);
putch(char(207)); //Ï
gotoxy(11,16);
putch(char(197)); //Å
gotoxy(1,12);
putch(char(199)); //Ç
gotoxy(30,12);
putch(char(191)); //¿
gotoxy(1,16);
putch(char(199)); //Ç
gotoxy(30,16);
putch(char(180)); //´
gotoxy(30,24);
putch(char(207)); //Ï
gotoxy(53,19);
putch(char(201)); //É
for(i=0;i<3;i++)
{
putch(char(205)); //Í
}
putch(char(187)); //»
gotoxy(53,20);
putch(char(186)); //º
cout<<” 0 “;
putch(char(186)); //º
gotoxy(53,21);
putch(char(200)); //È
for(i=0;i<3;i++)
{
putch(char(205)); //Í
}
putch(char(188)); //¼
gotoxy(20,3);
cout<<”ARTIFICIAL INTELLIGENCE FOR BLAST FURNACE”;
gotoxy(25,7);
cout<<”System is presently in Off state”;
gotoxy(5,10);
cout<<”You can”;
gotoxy(5,14);
cout<<”Press”;
gotoxy(13,14);
cout<<”to”;
gotoxy(7,18);
cout<<”0″;
gotoxy(7,20);
cout<<”1″;
gotoxy(7,22);
cout<<”2″;
gotoxy(13,18);
cout<<”Turn System off”;
gotoxy(13,20);
cout<<”Turn system on”;
gotoxy(13,22);
cout<<”Exit”;
}
Description :
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya
May 12th, 2010 at 8:43 am
probably time to remove this article
as parallel ports are very rare
August 5th, 2010 at 1:38 pm
It will be good to provide the circuit diagram.
January 18th, 2011 at 2:00 am
Some very fascinating factors however i think your analysis and bias leaves rather a lot to be desired. Then of course, that’s just my opinion. Have an amazing day undoubtedly a thought-frightening post.