$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" '/*------------------------------------------------------------------*/ ' DSCREENH(SCREEN$) ' Display Screen format H. ' Display Screen by moving new in from center of screen. ' SCREEN$ = Mem (binary) screen to display. ' Returns old screen. ' EXAMPLE: OLD$ = DSCREENH(SCREEN$) '/*------------------------------------------------------------------*/ FUNCTION DSCREENH(TEMP$) PUBLIC AS STRING R$ = GETSCREEN '/*-17---------------------------------------------------------------*/ A$=TEMP$ Z$=CHR$(25,1,24,2,23,3,22,4,21,5,20,6,19,7,18,8,17,9,16,10,15,11,14,12,13) Row%=CSRLIN Col%=POS(0) DEF SEG=GETVIDEOSEGMENT I%=26 DO UNTIL R%=1 AND LL%=>160 DECR I% R%=26 INCR L%,6 LL%=L% DO UNTIL R%=1 OR R%=I% DECR R% RR%=ASCII(MID$(Z$,R%)) C%=(80-(LL%\2))\2 IF C%<0 THEN C%=0 POKE$ (((RR%-1)*160)+(C%*2)),MID$(A$,((RR%-1)*160)+(C%*2)+1,LL%) LOOP 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$ = DSCREENH(TD$) ' Y$ = GETKEY '/*------------------------------------------------------------------*/