TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: Marty Blankenship
from: Andrew Belov
date: 2002-12-31 01:35:26
subject: SUB needed

Hello Marty!

29 Dec 02 19:53, Marty Blankenship wrote to All:

 MB> I have been trying to get GET to grab a 25x80 screen and save it into
 MB> an array, and later on in the program to use PUT to recall the
 MB> screen. I keep getting illegal function calls and I can't seem to
 MB> figure it out. I have read and re-read the section on GET and PUT in
 MB> the QuickBasic Bible and it seems to not help. The screen that I want
 MB> to grab is an ANSI screen. The bottom 2 lines are a status line that
 MB> doesn't need to be grabbed as this is a door game I'm working on.
 MB> Anyone willing to help me on this?

GET/PUT just aren't intended for text-mode operation. You may copy the
screen into an array by reading SCREEN(y, x) together with SCREEN(y, x, 1)
and incrementing the x/y in a loop, however this way you'll suffer a
performance degradation - BASIC obviously can't unfold that into a direct
memory copy and makes too many extra moves. Alternatively, you may take
advantage of the multi-page text mode, e.g.:

PCOPY 0, 3
PRINT "TEST"
SLEEP
PCOPY 3, 0

(on a EGA/VGA adapter, the pages are numbered 0...7; CGA has 4 pages in the
range 0...3).

                                        Sincerely yours - Andrew

---
* Origin: Conea Software Mail system - Moscow, Russia (2:5020/181.2)
SEEN-BY: 633/267 270
@PATH: 5020/81 181 54 123/140 500 106/1 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.