My photo
Bangalore, Karnataka, India
Extending one hand to help someone has more value rather than joining two hands for prayer

Archives

program to print all the ascii values

Tuesday, September 1, 2009

#include<iostream.h>
#include<conio.h>
void show(char a,char b,int row,int col)
{  char far*p=(char far*)0xb8000000;
   p+=row*160+col*2;
   *p=a;
   p++;
   *p=b;
   p++;
}
void main()
{  clrscr();
   int x,y;
   x=y=0;
   for(int i=0;i<128;i++)
   {    show(i,i,x,y);
    y++;
    if(y>=80)
    {  x++;
       y=0;
    }
   }
   getch();
}

0 comments: