Switching programmatically between 40 and 80 column mode.

Started by Stephane Richard, October 13, 2006, 02:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stephane Richard

I know this can be, done, I've seen it done, my main question is can BASIC 7.0 do it directly or do I need ASM help?

Anyone know how to do this?  I've notced that the GRAPHICS command, if I'm in 80 column mode, and I issue a GRAPHICS 0 it switches to the 40 column display and everything else is printed there...however, once in there, if I tried to swich back to 80 column and shift everything there using GRAPHICS 5 it doesn't print things there, but rather, prints it still on the 80 column display.  Could someone with a 128 (and hopefully two monitors or a setup to test this) give this code a try and let me know what happens?

100 GRAPHICS 0
110 COLOR 5, 8
120 SCNCLR 0
130 PRINT "THIS IS A TEST"
140 GRAPHICS 5
150 COLOR 5, 2
160 SCNCLR 5
170 PRINT "THIS SHOULD BE ON THE 80 COLUMN DISPLAY"

Thanks all, I'm just wondering :-).
When God created light, so too was born, the first Shadow!

MystikShadows

istvan

The command you want is "GRAPHIC", not "GRAPHICS".  When you use "GRAPHICS", basic will assume you meant "GRAPHIC S", where S is a variable that equals zero.  So, wherever "GRAPHICS" is used it will be the equivalent of "GRAPHIC 0", unless the variable S has been assigned some other value.

I hope that makes sense, let me know if I need to reword that.

Stephane Richard

Thank you so much istvan, seems the doc I was reading had a typoe.  you're right, and the corrected code performs exactly as expected.  

Thank you, I really appreciate it :-).
When God created light, so too was born, the first Shadow!

MystikShadows