Fix for CoCo Extended BASIC 1.0 PCLEAR bug
Posted: Sun Oct 31, 2010 2:03 pm
The following BASIC program pokes in a position independent machine code routine which gets round the PCLEAR bug in Extended Color BASIC 1.0. Steve Woolham asked if I would post it here as there does not appear to be any other routine available to do this anywhere on the internet. The routine works under all versions of Extended Color BASIC, and can also be used to do the equivalent of a 'PCLEAR 0' from within a CoCo BASIC program.
Regards,
Steve
Regards,
Steve
Code: Select all
10 'COCO PCLEAR FIX V1.0
20 'FOR EXTENDED COLOR BASIC 1.0
30 'BY STEPHEN J WOOLHAM
40 '***************************
50 'BASIC EXAMPLE PROGRAM
60 '***************************
70 ADDR = 474 : MC$="D67686063DDBBC1E895C1F0293193406D31B1F013506D3A6DDA67E96B4"
80 FOR I = 1 TO 58 STEP 2 : H$ = MID$(MC$,I,2) : POKE ADDR,VAL("&H"+H$) : ADDR = ADDR + 1 : NEXT
90 '
100 'LOCATION 118 DETERMINES HOW
110 'MANY PAGES ARE CLEARED
120 '
130 'PCLEAR8 = POKE118,8:EXEC474
140 '
150 POKE118,8:EXEC474