Qbasicnews.com
February 22, 2020, 08:14:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Blinking text?  (Read 6573 times)
TECHsector
New Member

Posts: 5


« on: March 17, 2003, 09:22:24 PM »

is there a way to make text blink?  If so, how?
Also, can I put a color border around the outside of the screen?
Also, is there a way to make the font bigger in a program?
Thank you

-TECHsector
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #1 on: March 17, 2003, 09:40:52 PM »

i believe, this is just a rumor, but if you choose a color higher than 16 for your foreground color in screen zero, it takes that color minus 16 and blinks it.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Gamefreak
Member
*
Posts: 33


« Reply #2 on: March 17, 2003, 10:42:57 PM »

Before I knew that there were only 16 colors, I was using colors like 20 and, yes, they did blink!
Logged
Glenn
I hold this place together
*****
Posts: 786



WWW
« Reply #3 on: March 18, 2003, 02:54:06 AM »

'
'  This program displays the different color/background/blinking
' combinations you can get in QB's SCREEN 0 video mode using different
' attributes and POKE.
'
DIM I AS INTEGER,J AS INTEGER,ATTR AS INTEGER,OS AS INTEGER,K AS INTEGER
SCREEN 0
WIDTH 80
CLS
'
'  Attributes will be changed by directly modifying video memory.
'
DEF SEG=&HB800
'
'  "Turn off" display until it's generated.
'
OUT &H3C6,0
FOR I=0 TO 15
'
'  Set offset to beginning of line I (with respect to attribute, not
' character position).
'
OS=I*160+1
FOR J=0 TO 15
ATTR=I*16+J
'
'  Display attribute value in color of that attribute.  (Always print out
' a 3-digit string, prepadding with zeros if necessary.)
'
ATTRSTR$=LTRIM$(STR$(ATTR))
WHILE LEN(ATTRSTR$)<3
ATTRSTR$="0"+ATTRSTR$
WEND
PRINT ATTRSTR$;
'
'  Character's on screen.  Change attributes.
'
FOR K=1 TO 3
POKE OS,ATTR
OS=OS+2
NEXT K
'
'  Print space of attribute 0 (unless J = 15).
'
IF J<15 THEN PRINT " "; : OS=OS+2
NEXT J
'
'  Move print position to next line.
'
PRINT
NEXT I
DEF SEG
'
'  Print message to user.
'
PRINT
PRINT "  The numbers indicate the color/background/blinking combination you"
PRINT "can get when you POKE the particular attribute value into video memory."
PRINT "(And maybe looking at the code for this program will show you how to do"
PRINT "that if you don't already know.)"
'
'  Turn screen back on and pause so screen can be viewed before END clears
' it.
'
OUT &H3C6,255
WHILE INKEY$="" : WEND
END
Logged

ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #4 on: March 18, 2003, 04:11:06 PM »

Hehe, you don't use colors over 16.
This makes a green message blink:
Code:
clr=2     '2=green
COLOR clr+16     'Add 16 to any color, and make it blink :-)
PRINT "Blink"

Add 16 to any color (only in text mode) and get it to blink.
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #5 on: March 18, 2003, 04:12:46 PM »

Oops! You already said that, toonski64!
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Plasma
Na_th_an
*****
Posts: 1770


WWW
« Reply #6 on: March 18, 2003, 06:16:00 PM »

You can add a color border by changing the overscan color:

Code:
'$INCLUDE: 'QB.BI'

DIM Regs AS RegType

Regs.ax = &HB00
Regs.bx = BorderColor
INTERRUPT &H10, Regs, Regs


(BorderColor is 0-63)

In order for this to work, you'll need to start QB with the /L switch to enable interrupts. If you're using QBasic, you can change the overscan color directly by writing to index 11h of the VGA attribute controller (3C0h).
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #7 on: March 18, 2003, 06:50:02 PM »

interrupts are such a magical, mysterious thing, aint they?
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Glenn
I hold this place together
*****
Posts: 786



WWW
« Reply #8 on: March 18, 2003, 08:33:12 PM »

Then they're just annoying.
Logged

ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Neo
Na_th_an
*****
Posts: 2150



« Reply #9 on: March 19, 2003, 06:15:43 AM »

No, they are not!!!! Smiley LoL

I'd printed out the entire interrupt list (yes, 00h - FFh) and I paid for it, and I'm planning to make a library of it Smiley. The book was 1250 pages Cheesy
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #10 on: March 19, 2003, 08:32:34 AM »

well, unless it's the superbowl, in which case i sit and watch them.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Glenn
I hold this place together
*****
Posts: 786



WWW
« Reply #11 on: March 19, 2003, 10:42:57 PM »

I thought I'd never hear the end of it from the "save the trees" people.


Quote from: "Neo"
No, they are not!!!! Smiley LoL

I'd printed out the entire interrupt list (yes, 00h - FFh) and I paid for it, and I'm planning to make a library of it Smiley. The book was 1250 pages Cheesy
Logged

ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!