Re: Virtual Screen S 2/

 BBS: Inland Empire Archive
Date: 03-15-92 (13:23)             Number: 127
From: MICHAEL MALLEY               Refer#: NONE
  To: ROBBIE CHURCH                 Recvd: NO  
Subj: Re: Virtual Screen S  2/       Conf: (2) Quik_Bas
>>> Continued from previous message
        IF CurrentCol < 146 THEN
          TopLine = TopLine + 1
          IF TopLine < 203 THEN
            GOSUB ShowScreen
          ELSE
            TopLine = 202
          END IF
        ELSE
          CurrentCol = 145
        END IF

    END SELECT
  ELSE
    IF ASC(KeyStroke$) = 27 THEN EXIT DO
  END IF
LOOP
END

ShowScreen:
  CurrentRow = 1 'Start at the top of the screen
  FOR Counter = TopLine TO TopLine + (NumberOfLines - 1)
    'Manual placement off the cursor will allow printing
    'on the 24th and 25 lines without screen scroll
    CurrentRow = CurrentRow + 1
    LOCATE CurrentRow, 1

    'Assume 80 columns on the screen
    PRINT MID$(Text(Counter), CurrentCol, 80);
  NEXT Counter
RETURN

DEFINT A-Z
SUB Scroll (Row1, Col1, Row2, Col2, Lines, attr)
DIM Regs AS RegType

IF Lines < 0 THEN
    Regs.ax = (256 * &H7) + (-Lines)
    Regs.bx = 256 * attr
    Regs.cx = 256 * (Row1 - 1) + (Col1 - 1)
    Regs.dx = 256 * (Row2 - 1) + (Col2 - 1)
ELSE
    Regs.ax = (256 * &H6) + Lines
    Regs.bx = 256 * attr
    Regs.cx = 256 * (Row1 - 1) + (Col1 - 1)
    Regs.dx = 256 * (Row2 - 1) + (Col2 - 1)
END IF

Interrupt &H10, Regs, Regs
END SUB

 -----------------------[ END PROGRAM ]-----------------------

 * SLMR 2.1a * It's not crippled, it's functionally challenged!

--- Maximus 2.01wb
 * Origin: UltraTech - Nashville, TN  (615) 356-0453 {HST} (1:116/30)
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