$CPU 8086 ' make compatible with XT systems $LIB ALL OFF ' turn off all PowerBASIC libraries $ERROR ALL OFF ' turn off all PowerBASIC error checking $OPTIMIZE SIZE ' optimize for smaller code $COMPILE UNIT ' compile to a UNIT (.PBU) '$COMPILE EXE ' compile to a UNIT (.PBU) DEFINT A-Z ' Required for all numeric functions, forces PB to not ' include floating point in UNIT (makes it smaller) '/*------------------------------------------------------------------*/ DECLARE FUNCTION GETSCREEN() AS STRING DECLARE SUB PUTSCREEN(BYVAL X AS STRING) DECLARE SUB MDELAY(COUNT AS WORD) DECLARE FUNCTION GETVIDEOSEGMENT() AS INTEGER '/*------------------------------------------------------------------*/ $CODE SEG "MLIB5" '/*------------------------------------------------------------------*/ ' DSCREENK(SCREEN$) ' Display Screen format K. ' Display Screen by moving new in left half from top, right half ' from bottom. ' SCREEN$ = Mem (binary) screen to display. ' Returns old screen. ' EXAMPLE: OLD$ = DSCREENK(SCREEN$) '/*------------------------------------------------------------------*/ FUNCTION DSCREENK(TEMP$) PUBLIC AS STRING R$ = GETSCREEN Rip TEMP$,0,200 FUNCTION = R$ END FUNCTION '/*------------------------------------------------------------------*/ ' DSCREENL(SCREEN$) ' Display Screen format L. ' Display Screen by moving new in left half from bottom, right half ' from top. ' SCREEN$ = Mem (binary) screen to display. ' Returns old screen. ' EXAMPLE: OLD$ = DSCREENL(SCREEN$) '/*------------------------------------------------------------------*/ FUNCTION DSCREENL(TEMP$) PUBLIC AS STRING R$ = GETSCREEN Rip TEMP$,1,200 FUNCTION = R$ END FUNCTION '/*-19-20------------------------------------------------------------*/ SUB Rip(TEMP$,Effect%,Speed%) DEF SEG=GETVIDEOSEGMENT IF Effect% = 1 THEN LeftSide% = 80 : RightSide% = 0 ELSE LeftSide% = 0 : RightSide% = 80 END IF Up% = 26 : Down% = 0 FOR Row% = 1 TO 25 DECR up% : INCR Down% CALL MDELAY(10) North% = ((25 - Row%) * 160) South% = 0 FOR i% = 1 TO 25 PrintRow% = ((i% - 1) * 160) IF i% <= Down% THEN POKE$ PrintRow% + LeftSide%,GetByte$(TEMP$,North% + LeftSide%,80) : INCR North%,160 END IF IF i% >= Up% THEN POKE$ PrintRow% + RightSide%,GetByte$(TEMP$,South% + RightSide%,80) : INCR South%,160 END IF NEXT i% NEXT Row% DEF SEG END SUB '/*------------------------------------------------------------------*/ FUNCTION GetByte$(BaseScreen$,Address%,NumBytes%) GetByte$ = MID$(BaseScreen$,Address% + 1,NumBytes%) END FUNCTION '/*------------------------------------------------------------------*/ ' $INCLUDE "C:\CODE\MLIB\MLIB.INC" ' TD$ = GETMEM("c:\code\mapper\APOGEE.MEM") ' T2$ = GETMEM("c:\code\mapper\VMESAM.MEM") ' PUTSCREEN T2$ ' Y$ = GETKEY ' T$ = DSCREENL(TD$) ' Y$ = GETKEY '/*------------------------------------------------------------------*/