[an error occurred while processing this directive]

HP OpenVMS Systems

Ask the Wizard
» 

HP OpenVMS Systems

OpenVMS information

» What's new on our site
» Upcoming events
» Configuration and buying assistance
» Send us your comments

HP OpenVMS systems

» OpenVMS software
» Supported Servers
» OpenVMS virtualization
» OpenVMS solutions and partners
» OpenVMS success stories
» OpenVMS service and support
» OpenVMS resources and information
» OpenVMS documentation
» Education and training

Quick Links

» Non-javascript page
» Ask the Wizard
» OpenVMS FAQ

Test Drive OpenVMS

» OpenVMS I64 test drive
» Java test drive

Other information resources available to you include:

» OpenVMS freeware
» ECO kits, software and hardware support, prior version support
» Alpha SRM, ARC, and AlphaBIOS firmware updates
» ENCOMPASS - HP user group
» OpenVMS software downloads, OpenVMS freeware CD-ROM
» OpenVMS firmware locations
» DECconnect passive adaptor charts
» Cables reference guide
» MicroVAX console commands
» OpenVMS student research

Select a topic below to see Questions Frequently Asked by partners

» Using the online documentation library(installing BNU from the asap SDK)
» Global sections(how to create and use.)
» xx$CREATE_BUFOBJ system service(usage)
» Ethernet address(methods of determination)
» Shareable images(cookbook approach to creating one)
» Sharing data/code at absolute addresses(a guide with examples)
» Determining the Alpha microprocessor
» Using GETSYI to get hardware status

Evolving business value

» Business Systems Evolution
» AlphaServer systems transition planning
» Alpha RetainTrust program

Related links

» HP Integrity servers
» HP Alpha systems
» HP storage
» HP software
» HP products and services
» HP solutions
» HP support
disaster proof
HP Integrity server animation
HP Integrity server animation
Content starts here

Ask the Wizard Questions

DECterm text color

The Question is:

Dear Wizard,

I'm in seoul, korea.

I tried to find out how to get color text at DECterm in
OpenVMS/AXP for days. but just failed.

you know, I coded some C program which produce
 "hello, world" in reverse
video mode or be underlined like the following :

        main()
        {
                /* "[7mhello,world[m" */
                putchar(0x1b);
                putchar('[');
                putchar('7');
                putchar('m');
                printf("hello, world\n");
                putchar(0x1b);
                putchar('[');
                putchar('m');
        }

and I succeeded.

But I couldn't find out how to get RED "hello, world" or
BLUE "hello, world" at DECterm in OpenVMS/AXP.

I think that getting a RED or BLUE text is similar to
that of reverse.

Please help me. And I would appreciate your kindness.
Thanks.


The Answer is:

I wrote this DCL some time ago (COLORS.COM):

$!
$       esc[0,7]=27
$       black == 0
$       red == 1
$       green == 2
$       yellow == 3
$       blue == 4
$       purple == 5
$       lightblue == 6
$       white == 7
$       foreground == 30
$       background == 40
$       normal == "''esc'[0m"
$       ws:= write sys$output
$       color0 = "black"
$       color1 = "red"
$       color2 = "green"
$       color3 = "yellow"
$       color4 = "blue"
$       color5 = "purple"
$       color6 = "lightblue"
$       color7 = "white"
$!
$!
$       ws "Demonstrating changed foregrounds"
$       counter = 0
$ loop1:
$       bg = 0 ! "normal" background
$       fg = 30 + counter
$       a = color'counter'
$       ws "''esc'[''bg';''fg'm", "This is ", ''a', normal
$       counter = counter + 1
$       if counter .lt. 8 then goto loop1
$!
$       ws "Demonstrating changed backgrounds"
$       counter = 0
$ loop2:
$       bg = 40 + counter
$       fg = 30 ! "black" foreground
$       a = color'counter'
$       ws "''esc'[''bg';''fg'm", "This is ", ''a', normal
$       counter = counter + 1
$       if counter .lt. 8 then goto loop2
$ exit