Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change palette
#11
Quote:I have tried the above examples but i cannot get them to work when i use &H3C9 i can only change the border.
I will try and give you an idea of what i want
Then you do something very wrong... this works fine:
Code:
DEFINT A-Z
SCREEN 12
FOR x = 0 TO 15
        OUT &H3C8, x
        OUT &H3C9, x * 4
        OUT &H3C9, x * 4
        OUT &H3C9, 0 * 4
        COLOR x
        PRINT "Color"; x
NEXT x
Reply
#12
NEO:
You posted:
Code:
DEFINT A-Z
SCREEN 12
FOR x = 0 TO 15
        OUT &H3C8, x
        OUT &H3C9, x * 4
        OUT &H3C9, x * 4
        OUT &H3C9, 0 * 4
        COLOR x
        PRINT "Color"; x
NEXT x

I ran it, and got the same 16 colors in the "Color"; x part as running
Code:
SCREEN 12
FOR x = 0 TO 15
        COLOR x
        PRINT "Color"; x
NEXT x

In fact, I entered and ran:
Code:
SCREEN 12
FOR x = 0 TO 15
   FOR Y = 0 TO 15
       FOR Z = 0 TO 15
          OUT &H3C8, x
          OUT &H3C9, x * 4
          OUT &H3C9, x * 4
          OUT &H3C9, 0 * 4
          COLOR x
          PRINT "Color"; x
       NEXT Z
  NEXT Y  
NEXT x
and got the same basic 16 colors, again.

I changed OUT &H3C8, x to OUT &3C8, 32000 --- same thing!
No matter what I did with the x in the OUT statements -- same!
I even remarked out each OUT statement, in turn, two by two, all, and -- same 16 colors!

Am I doing something wrong? Am I misssing something? Is your code supposed to run with other code?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#13
Nope I ran just that, and I got a nice fading colors palette from black to bright yellow.

What OS are you using QB on?
Reply
#14
Thanks, Neo, for the reply. I am using the SYS.com, IO.com and COMMAND.com that comes with Windows 95.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)