Are you blogging on PH? Get your free blog.

Ascii character table and game programming. With C source.

Submitted By: caglar
Rating: starstarstarstarstar (Rate It)


// ASCII CHARACTER TABLE FOROM CAGLAR ULKUDERNER
// This is just regular table for all ascii codes.

#include <conio.h>
void main(){

int i,k=-9;
clrscr();

textcolor(WHITE);
gotoxy(17,2);
cprintf("Regular ASCII Chart (character codes 0 - 127)");
textcolor(7); // normal color
window(1,5,80,25); //for chart 1
for(i=0;i<=127;i++)
{
if (i%16==0) k+=10;
gotoxy(k,i%16+1);
cprintf("%03d %c",i,i);
}

window(1,1,80,25); //turn back to use whole screan
gotoxy(23,24);
textcolor(WHITE);
cprintf("Press any key to see EXTENDED Chart...");
getch();

clrscr();

gotoxy(17,2);
cprintf("Extended ASCII Chart (character codes 128 - 255)");
textcolor(7); //normal color
window(1,5,80,25); //for chart2
k=-9;
for(i=0;i<=127;i++)
{
if (i%16==0) k+=10;
gotoxy(k,i%16+1);
cprintf("%03d %c",i+128,i+128);
}
textcolor(7); // turn back to normal color
}
 
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A bootstrapLabs project.