Dumb question: Print color

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Dumb question: Print color

Post by Rink »

Hi,

This is probably the stupidest question I've ever asked but since I can't figure it out, I have no choice. :lol:

How can I change the colour of the text printed by the BASIC print commands? COLOR() only seems to affect high resolution graphics and apart from that, I have no ideas. Ideally I'm looking for white/buff text on a black background and don't want to waste memory by implementing my own text display routines or by using hi-res graphics when the text mode will do.

Any ideas?

Cheers.
Sarah
Posts: 177
Joined: Wed Apr 13, 2011 3:36 pm
Contact:

Re: Dumb question: Print color

Post by Sarah »

You need to find out the control sequence that your printer recognises for changing the ink colour. Then simply send it to the printer prior to whatever you want to print in that colour.

e.g. PRINT #-2, CHR$(whatever);CHR$(whatever);CHR$(whatever);

Replace the various 'whatever' with the ASCII values that the printer expects.
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: Dumb question: Print color

Post by Rink »

Sorry, my bad there - I blame the terminology adopted by BASIC - I meant the on-screen colours for the video display. :)
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: Dumb question: Print color

Post by sixxie »

You only have two colour set options in text mode (though you can invert - see "lower case" characters): Dark Green / Green and Dark Orange / Bright Orange.
Sarah
Posts: 177
Joined: Wed Apr 13, 2011 3:36 pm
Contact:

Re: Dumb question: Print color

Post by Sarah »

You want to change the text mode colours? :shock:

Sorry - you can't; they're fixed!

The only possibilities are inverting them or selecting the "orange" variants.

So these are all the options:

dark green on light green
light green on dark green
dark orange on light orange
light orange on dark orange

The dark colours are often described as "black" but they're not really true black and don't match with CHR$(128).

If you want the "orange" set instead of the "green" set then do SCREEN0,1 but it won't persist if you use the standard BASIC output routines (e.g. the PRINT command) because all the text mode attributes (equivalent to SCREEN0,0) are restored every time those are invoked.

Edit: Sorry, posted at the same time as sixxie!
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: Dumb question: Print color

Post by Rink »

Drat. :) I thought everything was fixable with a machine code hack or something back in the day. :lol:

I suppose the black on green gives it that special "Dragon" personality; but I'll see how much spare memory I end up with and maybe do a hi-res thing instead in.

Thanks very much for the info anyway. I wasn't aware of the "orange" mode so will have a play with that just for laughs.

Cheers.
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: Dumb question: Print color

Post by Alastair »

There was a program in one of the issues of Dragon User that inverted the text colours giving light green text on a dark green background (or light orange text on a dark orange background, if you wanted). According to Simon's database you want either the July 1986 (with corrections in the September 1986 issue) or October 1987 issue.

My own method for alleviating the green screen problem is to turn down the colour of the TV, this gives a far more pleasant dark grey text on light grey background!
Sarah
Posts: 177
Joined: Wed Apr 13, 2011 3:36 pm
Contact:

Re: Dumb question: Print color

Post by Sarah »

Alastair wrote:There was a program in one of the issues of Dragon User that inverted the text colours giving light green text on a dark green background (or light orange text on a dark orange background, if you wanted).
I think this recent upload from zephyr also does the same thing:
viewtopic.php?f=7&t=716
Rink
Posts: 236
Joined: Mon Sep 05, 2011 7:01 pm

Re: Dumb question: Print color

Post by Rink »

Cool. I'll have a play with those too - cheers guys.

Alastair - looks like I'll have to start reading Dragon User, I didn't realise it contained nice programming hints like that. Cheers mate.
User avatar
robcfg
Posts: 1533
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Dumb question: Print color

Post by robcfg »

If you use the graphic characters, you can use all the colours, as far as I remember.

Think of the microdeal text mode loading screens.

Also you can make a program to print all characters and see which are available in several colors, as they are also the base of the semigraphics modes.
Post Reply