I am new to c programming, and have looked all over the internet and found conio.h but it does not have a background prototype. Can someone help me out and show me what to do to just change the background color in my c program running in dos?
I am new to c programming, and have looked all over the internet and found conio.h but it does not have a background prototype. Can someone help me out and show me what to do to just change the background color in my c program running in dos?
when you say dos do you really mean dos or do you mean the windows console which looks very much like dos. In dos nearly everything like this is done by calling an interrupt routine but in windows console these routines are no longer valid.Instead you have the win32 api at your beck and call. now which is it?
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
I would like to know how to change the background color in a DOS program. If I were to write a program in c, then exit to dos and run that program, how do I make the screen color change to say blue? Furthermore I would like to learn how to do this without an existing .h function so I may put it in just about any program. I have an idea that it would involve dos interrupts but do not know how to invoke them, and put my display on the screen. I have looked all over the net and only found bits and pieces to my question, nothing very clear. Can anyone help?
Use Borland's Turbo Pascal 7. It doesn't get much easier than that...
Quzah.
Hope is the first step on the road to disappointment.
suggest your first port of call be google to look for "Ralf Brown's interrupt list".
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
or... tinker with b800:0000... that's the 80x25 conventional memory address... just make sure you stay within your 3200 bytes tho... and RBIL is a great tool, dl it today!
hasafraggin shizigishin oppashigger...
would you please tell me more about what you mean when you talk about working with b800:0000, the 80x25 conventional memory address? and if you can give some examples? Thank you so much.
set up a pointer to the address... and use that pointer to alter the data at the memory location which it points to... then you'll see the changes on the screen...
unsigned char * text_addr = (unsigned char *) (0xb8000000);
hasafraggin shizigishin oppashigger...