[comp.sys.ibm.pc] Help on a two-monitor system

kerry@bcsaic.UUCP (Kerry Strand) (03/24/88)

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