🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #25851

Help on a two-monitor system

#25851
From: Kerry Strand
Date: Wed, 23 Mar 1988 19:27
39 lines
2116 bytes
My problem is (besides that I'm coding in BASIC) that I have some code for 
switching between two monitors that worked with QuickBasic 2.0, but
doesn't work with 4.0.  I'm not even sure why it ever worked.

I have a PC clone with two monitors, a monochrome with Hercules card and
a CGA card and monitor.  The BASIC code below was worked out by trial
and error, based on some buggy code I got from the net.  Under QB 2.0,
I could switch between the two monitors. The screen I was switching TO
would be cleared in the process, but that was ok, because the FROM
screen would be left as it was and I would redisplay what I needed on
the TO screen.  With QB 4.0, I get an error, Illegal Function Call, on
the statement SCREEN 1,0,0,0.  I can see where this would be illegal for
a monochrome screen to try to use mode 1,  but previously the code
wouldn't work without this.  Like I say, I don't know why it used to
work, so I don't know how to fix it for QB 4.0 so that it will work.

Does anyone know what's going on here?  Why did the code work before?
Is there a better way to do my monitor switching?   (more ?'s)

These are subroutines used with GOSUB to switch monitors.

980 REM - switch to color monitor
982 DEF SEG = 0: POKE &H410, (PEEK(&H410) AND %HCF) OR %H10
984 SCREEN 1,0,0,0
986 SCREEN 0: WIDTH 80
988 LOCATE ,,1,6,7  ' to set the cursor size
989 RETURN

990 REM - switch to monochrome monitor
992 DEF SEG = 0: POKE &H410, (PEEK(&H410) AND %HFF) OR %H30
994 SCREEN 1,0,0,0
996 SCREEN 0: WIDTH 80
998 LOCATE ,,1,12,13  ' to set the cursor size
999 RETURN

Thanks for any ideas you can come up with.

Kerry Strand        kerry@boeing.com
Advanced Technology Center, Boeing Computer Services
Technical Details
Message-ID: <4579@bcsaic.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!think!bloom-beacon!mit-eddie!uw-beaver!ssc-vax!bcsaic!kerry

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!think!bloom-beacon!mit-eddie!uw-beaver!ssc-vax!bcsaic!kerry
From: kerry@bcsaic.UUCP (Kerry Strand)
Newsgroups: comp.sys.ibm.pc
Subject: Help on a two-monitor system
Message-ID: <4579@bcsaic.UUCP>
Date: 23 Mar 88 19:27:47 GMT
Reply-To: kerry@bcsaic.UUCP (Kerry Strand)
Organization: Boeing Computer Services AI Center, Seattle
Lines: 39