#include<iostream>
#include<graphics.h>
using namespace std;
int main()
{
int gd=DETECT,gm=VGAMAX;
initgraph(&gd,&gm,"NULL");
setcolor(4);
poly[0]=50;
poly[1]=50;
poly[2]=600;
poly[3]=50;
poly[4]=600;
poly[5]=380;
poly[6]=poly[0];
poly[7]=poly[1];
rectangle(65,100,150,140);
setcolor(WHITE);
outtextxy(95,115,"ALU");
line(150,120,180,120);
rectangle(180,100,380,140);
outtextxy(200,120,"SEQUENCE CONTROLLER");
rectangle(410,100,550,160);
outtextxy(422,107,"GENERAL");
outtextxy(422,122,"PURPOSE");
outtextxy(422,136,"REGISTER");
rectangle(410,220,550,250);
outtextxy(422,228,"CACHE MEMORY");
rectangle(210,180,350,220);
outtextxy(240,190,"PROGRAM");
outtextxy(240,205,"COUNTER");
line(280,140,280,180);
rectangle(65,280,200,250);
outtextxy(85,255,"INSTRUCTION");
outtextxy(65,268,"REGISTER");
rectangle(65,340,200,310);
outtextxy(85,315,"INSTRUCTION");
outtextxy(85,328,"DECODER")
;
line(50,420,650,420);
line(50,450,650,450);
outtextxy(220,430,"ADDRESS AND DATA BUS");
outtextxy(190,460,"BASIC ARCHITECTURE OF CPU");
line(105,140,105,250);
line(260,380,260,420);
line(320,380,320,420);
delay(1000);
getch();
closegraph();
return 0;
}
awesome program.. ihave tried ..it works... :)
ReplyDelete