Wierd things afoot

 BBS: Inland Empire Archive
Date: 06-04-92 (20:53)             Number: 150
From: MATT HART                    Refer#: NONE
  To: RICH GELDREICH                Recvd: NO  
Subj: Wierd things afoot             Conf: (2) Quik_Bas
I've got a graphics question for you:

I've tested some code that will change from blinking
attributes to highlight backgrounds.  But a strange thing
happens - I can POKE into video memory, but nothing is
displayed until the program ends.  Everything stays switch
though.  Subsequent writes will immediately show up.  Here
it is:


     Attr = 4*16+14           ' Yellow on red
     HighAttr = Attr + 128    ' Set blink/highlight bit

     DEF SEG = &HB800
     POKE 0,65 : POKE 1,HighAttr

     WHILE INKEY$="":WEND     ' A blinking yellow on red "A"

     X = INP(&H3DA)      ' Reset flip/flop
     OUT &H3C0,&H10      ' Index Mode Control register
     OUT &H3C0,8         ' Bit 3 Blink/Intensity set

     DEF SEG

     'Now the screen is blank


     The program ends, drops to DOS, and Presto - I have a
yellow on bright red "A", and subsequent writes and such
continue with intensity rather than blinks.  Any thoughts
on the blank screen?
 * Origin: Midnight Micro!  V.32/REL  (918)451-3306 (1:170/600)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET