WRITING TIO VIDEO MEM

 BBS: Inland Empire Archive
Date: 06-24-92 (19:48)             Number: 1368
From: MATT HART                    Refer#: NONE
  To: MALKHA SINGH                  Recvd: NO  
Subj: WRITING TIO VIDEO MEM          Conf: (2) Quik_Bas
 MS> Does anyone know of an easy way to write characters directly to the
 MS> video ram in various colors in QB?

The video RAM is accessed at B800:0000 with two bytes per
character.  The first is the ASCII character to display,
the other is the attribute to display.  Example:

     COLOR 14,4 : LOCATE 1,1 : PRINT "A"

     A direct write would be:

          Attribute = 4*16+14
          DEF SEG = &HB800
          POKE 0,ASC("A")
          DEF SEG


---
 * Origin: Midnight Micro!  V.32/REL  (918)451-3306 (1:170/600)
46/50: The best command to open the com port is:
Name: D.J. Magic Mike #1 @19960
Date: Fri Jun 12 12:15:47 1992
From: Test Site BBS [DPS] [ASV] [919-760-4811]


OPEN "COMx:baudrate&,N,8,1,BIN,CD0,CS0,DS0,OP0" FOR RANDOM AS 1

x = port, baudrate& = duh, figure it out for yourself. Once you do this you 
can make a simple terminal program like:

OPEN "CONS:" FOR OUTPUT AS 2

DO
    IF NOT EOF(1) THEN
         LINE INPUT #1,T$
         PRINT #2, T$;     'You MUST include that ; on the end!
    END IF
    N$= INKEY$
    IF N$<>"" THEN PRINT #1, N$;   'You MUST include that ; !!!
LOOP UNTIL N$ = CHR$(0) + CHR$(45)   'Alt-X terminates program
CLOSE 1

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