$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) '/*------------------------------------------------------------------*/ $CODE SEG "MLIB1" '/*------------------------------------------------------------------*/ FUNCTION ISMOUSELBR() PUBLIC AS INTEGER REG 1,3 CALL INTERRUPT &H33 MButton% = REG(2) IF MButton% = 1 THEN DELAY .05 REG 1,3 CALL INTERRUPT &H33 MButton% = REG(2) IF MButton% = 0 THEN FUNCTION = 1 ELSE FUNCTION = 0 END IF END IF END FUNCTION '/*------------------------------------------------------------------*/ ' DO ' Y$ = INKEY$ ' IF ISMOUSELBR THEN PRINT "YES" ' LOOP UNTIL Y$ = CHR$(27)