🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #638

Re: GET/PUT in QBasic 4.50

#638
From: Michael Rye S�rensen
Date: Mon, 13 Apr 1998 00:00
66 lines
3109 bytes
The get/put statement does not work in xmode, because in xmode you use a
different
addressing technique. You have to work out your own code to make it happen.
If you have build a 320x240 xmode the screen is divided into 4 plans and every
plan are therefor 80x240 of size. To change to the plan you whant to write to,
you use:

out &h3c4,2      'Index register
out &h3c5,val[plan]

where 'plan' is
plan 0 1 2 3
val   1 2 4 8

Now you need to set the pixel :

Def seg = &hA000
Poke (80 * Y + (X\4)),Color

I think I'm at your porblem now(what color to put?)

If you have stored a picture in a file and whant it on the screen, make a string
buffer that is 320 bytes long and read 320 bytes from the file (one line at the
time):

Def seg = &hA000

out &h3c4,2      'Index register

for y = 0 to 239
    for x = 0 to 319
        out &h3c5,val[x and 3]
        Poke (80 * y + (x\4)),asc(mid$(buffer$,x+1,1))
    next
next

Thats it.

If you need more code you can find some here
http://users.cybercity.dk/~bdc3729/

ms@cool.dk
-------------------------------------------------

Thomas Wopfner wrote:

> Hi there! I have a huge problem with ModeX in QBasic 4.50: I need to
> PUT a picture on the screen, but I don't have any clue how to do it! Who can
> help me with this Problem? I need to PUT a picture which is stored in an
> Array of the Type SINGLE. It would be great if anyone can explain me, how
> GET/PUT in Qbasic works and how I can manage it to PUT in ModeX.
>
> Thanx
>
> --
> m.wopfner@tirol.netwing.at
> http://www.geocities.com/TimesSquare/Dungeon/8468
>   ______           __
>  /__     __\ __    |   |
>       |   |  |   /  _ \    |  |
>       | from S.W.D .|
>       |__|__/       \__|
>     T.W. from S.W.D.
>
> PS: You don't need to answer in English if you speak German!
Technical Details
Message-ID: <3531F214.71EC1034@cool.dk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <892377145.110399@news.netwing.at>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c949,13bd89ebd5b7adf4
X-Google-Attributes: gid10c949,public
X-Google-Thread: 10ab99,13bd89ebd5b7adf4
X-Google-Attributes: gid10ab99,public
X-Google-Thread: 114ead,13bd89ebd5b7adf4
X-Google-Attributes: gid114ead,public
X-Google-Thread: f78f1,13bd89ebd5b7adf4
X-Google-Attributes: gidf78f1,public
X-Google-Thread: f7aba,13bd89ebd5b7adf4
X-Google-Attributes: gidf7aba,public
X-Google-Thread: 112458,13bd89ebd5b7adf4
X-Google-Attributes: gid112458,public
X-Google-Thread: 108717,13bd89ebd5b7adf4
X-Google-Attributes: gid108717,public
X-Google-Thread: fdc2a,13bd89ebd5b7adf4
X-Google-Attributes: gidfdc2a,public
From: "Michael Rye S�rensen" <mrs@cool.dk>
Subject: Re: GET/PUT in QBasic 4.50
Date: 1998/04/13
Message-ID: <3531F214.71EC1034@cool.dk>
X-Deja-AN: 343561966
Content-Transfer-Encoding: 7bit
References: <892377145.110399@news.netwing.at>
To: Thomas Wopfner <m.wopfner@tirol.netwing.at>
Content-Type: text/plain; charset=EUC-KR
Organization: CyberCity Internet
Mime-Version: 1.0
Newsgroups: alt.lang.basic,comp.graphics.algorithms,comp.lang.basic.misc,comp.programming,fido.ger.basic,microsoft.public.basic.dos,z-netz.rechner.programmieren,z-netz.sprachen.basic