ww0n#@andrew.cmu.edu.UUCP (03/14/87)
Something I have always wanted to straighten out is the proper way to prevent BASIC from resetting special screen settings. For example, I use: POKE &HE045, PEEK(&HE045) OR 16 POKE &HE047, 0 ATTR 3,2 to set my COCO 3 up for a monochrome monitor in 80-column mode. For the regular old 32-column mode, I use: POKE &H95C9, 255 POKE &HFF22, &H3D POKE &HE033, 16 POKE &HE035, 0 which sets up the COCO 3 for monochrome and lowercase. The important point here is my use of POKE &H95C9, 255 to prevent BASIC from resetting the value I POKEd into $FF22. The method you see most of the time is: POKE 359, x or POKE &H167, x where x=0 or 57 or some other value claimed to do the job. Don't use this method! Address $167 is a jump vector which points to the disk i/o routines and funny things happen when it is changed. I disassembled the code which actually resets the screen and found: $95C5 LDA >$FF22 $95C8 ANDA #$07 $95CA STA >$FF22 Therefore, when you change the value at $95C9, you change what is ANDed with the contents of the PIA register at $FF22. By using 255, no change is made to the current contents. Of course, you could NOP out all the code or get fancy and do something else -- the choice is yours -- this is just a quick, easy method. Walter L. Wimer, III Carnegie Mellon University Arpanet: ww0n@@andrew.cmu.edu Bitnet: ww0n%andrew.cmu.edu@@cmuccvma or ww0n@@cmuccvma