$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" '/*------------------------------------------------------------------*/ ' DSCREENC(SCREEN$) ' Display Screen format C. ' Display Screen from upper left to lower right. ' SCREEN$ = Mem (binary) screen to display. ' Returns old screen. ' EXAMPLE: OLD$ = DSCREENC(SCREEN$) '/*------------------------------------------------------------------*/ FUNCTION DSCREENC(TEMP$) PUBLIC AS STRING R$ = GETSCREEN '/*-12---------------------------------------------------------------*/ A$=TEMP$ Row%=CSRLIN Col%=POS(0) DEF SEG=GETVIDEOSEGMENT O$=PEEK$(0,4000) I%=0 DO UNTIL R%=25 AND L%=160 INCR I% R%=0 DO UNTIL R%=25 OR R%=I% Flag%=0 INCR R% IF (I%-(R%-1))*4<=160 THEN Flag%=-1 POKE$ (((R%-1)*160)+1)-1,MID$(A$,(((R%-1)*160)+1),(I%-(R%-1))*4) END IF LOOP IF Flag%=0 THEN EXIT FUNCTION CALL MDELAY(1) LOOP LOCATE Row%,Col% FUNCTION = R$ 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$ = DSCREENC(TD$) ' Y$ = GETKEY '/*------------------------------------------------------------------*/