Scrolling Screen

 BBS: Inland Empire Archive
Date: 03-17-93 (17:15)             Number: 284
From: CRAIG PALAZZO                Refer#: NONE
  To: TONY ELLIOTT                  Recvd: NO  
Subj: Scrolling Screen               Conf: (2) Quik_Bas
It is possible to do so in text mode using function 6 of Interrupt &H10.

DEFINT A-Z

'$INCLUDE: 'regType.bi'

DECLARE SUB Interrupt(serv, reg, reg)
DECLARE SUB Scroll(Row1%, Col1%, Row2%, Col2%, Lines%, Attrib%)

DIM reg AS regType

'\\ This should scroll the screen up 1 line and the color as I recall is
'\\ blue on white.
Scroll 2, 2, 24, 78, 1, 113

'\\ If Lines is a - number then the screen will scroll down. Attrib is the
'\\ combined forground background color. The magic math for the attribute
'\\ color cobo is BackGround * 16 + the ForeGround (well that's my way).
SUB Scroll (Row1%, Col1%, Row2%, Col2%, Lines%, Attrib%)
        IF Lines > 0 THEN
                reg.ax = &H600
        ELSE
                reg.ax = &H700 + ABS(Lines) MOD 256
        END IF
        reg.bx = (attrib * 256) AND &HFF00
        reg.cx = (Row1 -1) * 256 + Col1 -1
        reg.dx = (Row2 -1) * 256 + Col2 -1
        Interrupt &H10, reg, reg
END SUB

--- Maximus 2.01wb
 * Origin: |=[Bloom Co. Hospital>=--- |[GRapids,MI] (616)361-8345 (1:228/26)
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