' *** XBIOS_5.GFA *** ' ' *** After installing new (invisible) logical screen, first PRINT-command ' *** is sent to physical screen. After that, PRINT goes to logical screen ' ' *** TOS-bug ' CLS ' physbase%=XBIOS(2) logbase%=XBIOS(3) ' PRINT PRINT " You're looking at the physical screen (monitor) right now. Because this is" PRINT " also the logical screen, everything that is sent to the logical screen is" PRINT " immediately visible. Like this text." PRINT PRINT " If you press any key, an invisible new logical screen is installed. After" PRINT " that, three PRINT-commands will be sent to the logical screen:" PRINT " PRINT ""*** 1st PRINT-command ***""" PRINT " PRINT ""*** 2nd PRINT-command ***""" PRINT " PRINT ""*** 3rd PRINT-command ***""" PRINT " Watch what happens on the physical screen (nothing should happen!), then" PRINT " press any key to examine the logical screen (where all three PRINT-commands" PRINT " should have arrived). Press a key again to restore the original screens." PRINT AT(1,25);" Press a key to install invisible logical screen..."; ~INP(2) ' CLS PRINT AT(1,25);" Press a key to examine the logical screen..."; LOCATE 1,1 @screen2_init(FALSE,s1%,s2%) PRINT "*** 1st PRINT-command ***" CLS ! clear logical screen first (INLINE may contain garbage) PRINT "*** 2nd PRINT-command ***" PRINT "*** 3rd PRINT-command ***" ~INP(2) ' LOCATE 1,10 PRINT " This screen was the invisible logical screen a moment ago. After a screen-swap" PRINT " this is now the physical screen. Above these lines you can see which of the" PRINT " three PRINT-commands was properly sent to the logical screen. As you can see," PRINT " the first PRINT-command was sent to the physical screen instead of the logical" PRINT " screen. All following PRINT-commands are properly sent to the logical screen." PRINT " This is a TOS-bug, not a GFA-bug." PRINT AT(1,25);" Press a key to restore the original screens..."; @screen2_swap(FALSE,s1%,s2%) ~INP(2) ' @screen2_restore CLS ' > PROCEDURE screen2_init(move!,VAR screen.1%,screen.2%) ' ' *** Install second screen as invisible logical screen (at address screen.2%) ' *** If move!=TRUE the physical screen is copied to the logical screen ' *** If you use PRINT: the first PRINT-command goes to physical screen! ' *** Don't forget to restore the screens with Procedure Screen2_restore ' ' *** Standard: physbase% ' LOCAL screen% ' *** Buffer for second screen in INLINE-line: INLINE screen%,32255 screen.2%=AND(ADD(screen%,255),&HFFFFFF00) ! multiple of 256 screen.1%=physbase% ! physical screen ~XBIOS(5,L:screen.2%,L:-1,-1) ! second screen now active IF move! BMOVE screen.1%,screen.2%,32000 ! copy physical screen ENDIF RETURN > PROCEDURE screen2_swap(move!,VAR screen.1%,screen.2%) ' ' *** Call this Procedure after completion of invisible second screen ' *** Sometimes VSYNC is necessary before calling this Procedure! ' *** After the swap you can continue with drawing on (new) invisible screen ' *** If move!=TRUE the (new) physical screen is copied to the logical screen ' *** The physical screen (monitor) starts at address screen.1% ' *** The (invisible) logical screen starts at address screen.2% ' SWAP screen.1%,screen.2% ~XBIOS(5,L:screen.2%,L:screen.1%,-1) ! swap the screens IF move! BMOVE screen.1%,screen.2%,32000 ! copy physical screen ENDIF RETURN > PROCEDURE screen2_restore ' ' *** Restore original (default) physical and logical screens ' ' *** Standard: logbase% physbase% ' ~XBIOS(5,L:logbase%,L:physbase%,-1) RETURN ' ********* '