10 P%=&D00 20 [ 30 OPT 0 40 LDY#0 50 .loop1 60 LDA&7C00,Y 70 PHA 80 LDA&6000,Y 90 STA&7C00,Y 100 PLA 110 STA&6000,Y 120 INY 130 CPY#&FF 140 BNE loop1 150 LDY#0 160 .loop2 170 LDA&7D00,Y 180 PHA 190 LDA&6100,Y 200 STA&7D00,Y 210 PLA 220 STA&6100,Y 230 INY 240 CPY#&FF 250 BNE loop2 260 LDY#0 270 .loop3 280 LDA&7E00,Y 290 PHA 300 LDA&6200,Y 310 STA&7E00,Y 320 PLA 330 STA&6200,Y 340 INY 350 CPY#&FF 360 BNE loop3 370 LDY#0 380 .loop4 390 LDA&7F00,Y 400 PHA 410 LDA&6300,Y 420 STA&7F00,Y 430 PLA 440 STA&6300,Y 450 INY 460 CPY#&FF 470 BNE loop4 480 RTS 490 ] 500 MODE7 510 FORA=0TO1 520 VDU145,157 530 PRINTTAB(7,A)CHR$(141)+CHR$(135)+"Demonstration of SCRNTOG" 540 NEXT 550 PRINT:PRINT"This is a machine code routine to copy the screen into memory and memory back onto the screen. This is particularly useful if you are toggling between two screens." 560 PRINT:PRINT"It problaly has no real use because is isn't very often you want to toggle between two screens. But it is interesting to see how quickly it can bedone." 570 PRINT:PRINT"‘abcdefghijklmnopqrstuvwxyz1234567890" 580 PRINT:PRINT"Press a key to use the routine" 590 G=GET:CALL&D00 600 CLS 610 FORA=0TO1 620 VDU146,157 630 PRINTTAB(7,A)CHR$(141)+CHR$(133)+"The other screen!!!!!" 640 NEXT 650 PRINT:PRINT"This is the other screen by pressing a key you can toggle between these two screens very quickly." 660 PRINT:PRINT" To do this the screen memory from &7C00 to &8000 is copied to &6000 and and at the same time the memory from &6000 is copied in the screen memory." 670 PRINT:PRINT"To use this facility the second screen must be set up and the the routine called ie 'CALL &D00' and then the firstscreen can be set up." 680 PRINT:PRINT"To toggle between the two the routine is simply recalled ie 'CALL &D00'" 690 PRINT:PRINT"Press a key to use the routine" 700 REPEAT 710 G=GET 720 CALL&D00 730 UNTIL0