🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #39989

Re: Changing Rez: What we _really_ want to know

#39989
From: Douglas Monk
Date: Thu, 04 Jan 1990 00:27
26 lines
1574 bytes
Thought I might drop in my 2 cents:

I typically write routines dostart() and doexit(exitval) in programs
which run in low res but for which I want to use 80 columns:

dostart saves the current resolution and if it is low res, changes
to high res and plays with the palette (and whatever other changes I
need, like turning on the cursor, etc.). Thus dostart contains a call
Setscreen(-1L, -1L, 1) as needed - and it doesn't crash.

doexit restores the original palette and resolution, and then calls
exit(exitval). Thus doexit contains a call Setscreen(-1L, -1L, 0) as
needed - and it doesn't crash.

I just call doexit then wherever I would be calling exit otherwise.
If the system crashes, I might be screwed up, but the worst would be to have
the parent wind up in the wrong resolution with funny colors, and that can
be fixed. But my programs do not crash :-) of course.

I use a program like this from my auto folder - but only use bios and xbios
calls in it.

Doug Monk

Disclaimer: These views are mine, not necessarily my organization's.
Technical Details
Message-ID: <4096@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!eunomia!bro
References: <8912301917.AA19200@TIS.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!eunomia!bro
From: bro@eunomia.rice.edu (Douglas Monk)
Newsgroups: comp.sys.atari.st
Subject: Re: Changing Rez:  What we _really_ want to know
Summary: I do it without doing an exit handler in C...
Message-ID: <4096@brazos.Rice.edu>
Date: 4 Jan 90 00:27:42 GMT
References: <8912301917.AA19200@TIS.COM>
Sender: root@rice.edu
Reply-To: bro@eunomia.rice.edu (Douglas Monk)
Organization: Rice University, Houston
Lines: 26