BBS: Inland Empire Archive
Date: 02-21-93 (00:48)             Number: 332
From: EARL MONTGOMERY              Refer#: NONE
  To: OWEN GIBBINS                  Recvd: NO  
Subj: GET/PUT                        Conf: (2) Quik_Bas
'You asked that I comment (explain the code I sent you) which follows:
'You didn't mention how detailed an explanation you required.
'The following should help. If you need more help refer to
CONST arraysize = 4000
'Making the arraysize=4000 bytes of memory
'VGA 320*200*256 graphic screen
DIM scrn1(arraysize)
'Declaring scrn1 as (4000 bytes)
DIM scrn2(arraysize)
'Same as above
DEF SEG = VARSEG(scrn1(0))
'Determines segment where basic has placed scrn1
u = VARPTR(scrn1(0))
'Determines offset for scrn1
LINE (100, 100)-(150, 150), 142, BF
GET (100, 100)-(150, 150), scrn1
'Bsaving 4000 bytes starting at segment VARSEG(scrn1(0)) and
'offset U which is determined by VARPTR(scrn1(0))
BSAVE "earl.pic", u, arraysize
'Basically the same as above. I am Sure you can figure it out
'by reverse engineering.
DEF SEG = VARSEG(scrn2(0))
v = VARPTR(scrn2(0))
BLOAD "earl.pic", v
'This puts scrn2(0)) which is the BSAVED scrn1(0)
'at graphic location 50,50
'You could do away with scrn2 all together and just use
'scrn1. Experiment and see what I mean. Personally, I
'like to Dimension 2 variables one for the Bsave and
'1 for the BLOAD. But to each his own.
'Hope this helps.
PUT (50, 50), scrn2, PSET
999 GOTO 999

--- Maximus 2.01wb
 * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
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