You are here:
Advertisement
| Rating(1-10) | Knowledgeability = 9 | Clarity of Response = 10 | Politeness = 10 |
| Comment | I was looking around on the internet to see about getting high-intensity back ground colors and I found a site that showed you how to do it in Pascal. I didn't know much about Pascal, but I was able to convert this code to Turbo-C. 16 background colors is done by: #include <conio.h> #include <dos.h> void brightness(int x) { union REGS reg; reg.h.ah = 0x10; reg.h.al = 0x03; reg.h.bl = x; int86(0x10, ®, ®); } void main () { textmode(3); textbackground(6); textcolor(1 128); brightness(0x00); clrscr(); cprintf("Blue over yellow.\n\r"); getch(); brightness(0x01); textbackground(0); textcolor(7); clrscr(); cprintf("Back to normal.\n\r"); getch(); } There's always something new to learn. Here's another program: /* Poking and Peeking characters on the screen */ #include <conio.h> #include <dos.h> void main () { int screen; screen=0xB800; /* Color Graphics Computer */ /* screen=0xB000; * Computer Without Graphics Card */ textmode(1); clrscr(); pokeb(screen,1000,6); pokeb(screen,1000 1,9); cprintf("Blue Spade.\n\r"); cprintf("Peek Address of 1000: %d \n\r",peekb(screen,1000)); cprintf("Peek Address of 1001: %d \n\r",peekb(screen,1001)); getch(); } Thanks... | ||
Answers by Expert:
I'm sure that I can solve any doubts in Turbo C ,Graphics Programing ,Mouse, Hardware Programming ,File System ,Interrupts, BIOS handling , TSR Programming , General Concepts in C Language, handling inline Assembly statements
Research over 6+ Years
Organizations
CG-VAK Softwares and Exports Limited
Education/Credentials
Masters in Computer Applications

©2012 About.com, a part of The New York Times Company. All rights reserved.