Announcement

Collapse
No announcement yet.

Brighter background colors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Brighter background colors

    In PB 3.5 for Dos, is it possible to make a background of
    brighter colors, *AND* have text in it?

    For example, can I have a background of bright white with
    blinking red text to say: "Note: Payment Missed" ? Yes, I am
    familiar with COLOR, but I don't think the background color goes
    above color #7 (white), or does it? Please don't hammer me; I don't
    think it can be done but others are saying that it can.

    Thank you.

    ------------------

  • #2
    This is a snippet of code from M$ Basic 7 to reprogram the palette.
    As I understand it, PBDOS should be able to do something similar.
    You will need a UDT for the regs. (Or write it in Inline assembler)

    Code:
    dacreg% = BLUE
    redval% = 0
    greenval% = 0
    blueval% = 15
    '
    inreg.ax = &H1010                       'set colour register dacreg%
    inreg.bx = dacreg%
    inreg.dx = redval% * 256                'dh = red value
    inreg.cx = (256 * greenval%) + blueval% 'ch = green value, cl = blue value
    CALL interrupt(&H10, inreg, outreg)
    ------------------


    [This message has been edited by David J Walker (edited August 13, 2001).]

    Comment


    • #3
      I'm not sure that palette reprogramming will work in text mode, but it may
      be worth a shot. There's another way of doing it that involves using the
      "blink" bit to mean "bright background": INT &H10, AX = &H1003, BL = toggle.
      This won't allow you to combine bright white with blinking red, though:
      you can have either bright backgrounds or blinking, but not both. Of course,
      you could always do the blinking "manually" with a timer.


      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment


      • #4
        Works OK in text mode in M$B7!
        Note that the limit appears to be 64 levels per color (0 to 63) giving a possible 262,144 shades. Also they do not have to be related to the original color, I usually remap Magenta (ugh!) & Light brown to something more tasteful.

        ------------------

        Comment


        • #5
          Download VGACOLORS.BAS (VGACOLORS.ZIP) from my website.

          ------------------
          mailto:[email protected][email protected]</A>
          www.basicguru.com/zijlema/

          Egbert Zijlema, journalist and programmer (zijlema at basicguru dot eu)
          http://zijlema.basicguru.eu
          *** Opinions expressed here are not necessarily untrue ***

          Comment


          • #6
            Hello Egbert-

            I went to URL:
            http://www.basicguru.com/zijlema/,

            but did not see the file you suggested. Did I go to the correct
            place?


            Thank you.

            Robert

            ------------------

            Comment


            • #7
              Robert--

              Years ago I wrote a fairly sophisticated PB/DOS utility that
              you might find quite useful. Please contact me by email.



              ------------------
              -- Greg
              [email protected]

              Comment

              Working...
              X