VOGONS


First post, by jennifer3

User metadata
Rank Newbie
Rank
Newbie

Hello Everyone,

This is my first time on this forum and I don't even know if this question belongs here. If not, would someone please direct me?

I'm running a program I wrote under Turbo C under DOSBox 0.74 under Debian Linux 6 (Wheezy) with MATE. I would expect the following code:

printf("\x1b[33YELLOW\x1b[37")

to output the word YELLOW in yellow to the screen. However, it comes out orange looking. (\x1b[33 is according to the ANSI.SYS standard.)

I'm certain this is a development-level situation, not an installation one. But what should I do about it?

I tried downloading the source and looking at it but it didn't make much sense. It was mostly header files and scripts of some sort -- nothing that looked like emulator code that I could see. (I have never successfully built a binary from downloaded source.)

Jennifer

Last edited by jennifer3 on 2015-02-17, 10:44. Edited 1 time in total.

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Start reading here:
Re: 40 Column Text Mode Issues

Basicly it is yellow on the videocard, but a period correct monitor has a special circuit that changes it to orange/brown.

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 3, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

You're also using incorrect ANSI code. First, you missed the m after the number. Second, as Qbix explained, "yellow" without intensity is brown on RGBI implementations, as explained in the RGBI palette section of Wikipedia's Color Graphics Adapter article. Therefore, to see yellow, you must specify the intensity text attribute along with the color attribute:

<ESC>[33m So-called yellow without intensity is brown on PCs.
<ESC>[1;33mTo get actual yellow, you must select the intensity attribute.
<ESC>[0;37mBack to normal...

If you find a file that produces yellow without the 1; part, it's because the intensity attribute was set by a previous definition.