8-Bit Software Online Conversion

Screen Transfer Routine - Listing

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