$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) DEFINT A-Z ' Required for all numeric functions, forces PB to not ' include floating point in UNIT (makes it smaller) '/*------------------------------------------------------------------*/ $CODE SEG "MLIB1" '/*------------------------------------------------------------------- ' GETKEY() ' Waits until key is pressed and returns value. ' EXAMPLE: Y$ = GETKEY '/*------------------------------------------------------------------- FUNCTION GETKEY() PUBLIC AS STRING WHILE NOT INSTAT:WEND FUNCTION = INKEY$ END FUNCTION '/*------------------------------------------------------------------- FUNCTION WAITKEY(BYVAL KL AS STRING) PUBLIC AS STRING DO Y$ = GETKEY LOOP UNTIL INSTR(1,KL,Y$) > 0 FUNCTION = Y$ END FUNCTION '/*-------------------------------------------------------------------