' *** SCREEN2.LST *** 2nd GFA-Manual, page 9-9 > 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 logical screen is BMOVEd to the physical screen ' *** Usually swapping screens is faster than BMOVEing ' *** The physical screen (monitor) starts at address screen.1% ' *** The (invisible) logical screen starts at address screen.2% ' IF move! BMOVE screen.2%,screen.1%,32000 ! copy logical screen ELSE SWAP screen.1%,screen.2% ~XBIOS(5,L:screen.2%,L:screen.1%,-1) ! swap the screens ENDIF RETURN > PROCEDURE screen2_restore ' ' *** Restore original (default) physical and logical screens ' ' *** Standard: logbase% physbase% ' ~XBIOS(5,L:logbase%,L:physbase%,-1) RETURN ' ********* '