!*! Updated on 25-Nov-91 at 8:24 AM by Michele Tonti; edit time: 0:00:21 !*************************** AMUS Program Label ****************************** ! Filename: INPTMR.BAS Date: 11/25/91 ! Category: UTIL Hash Code: 514-337-167-756 Version: 1.1B(105) ! Initials: RELI/AM Name: MIKE SELVY ! Company: REL Inc. Telephone #: 5039292704 ! Related Files: INPTMR.M68,INPTMR.DOC ! Min. Op. Sys.: Expertise Level: ! Special: Requires NOECHO ! Description: Program to demonstrate use of INPTMR.SBR ! ! !***************************************************************************** PROGRAM INPTMR,1.1B(105) MAP1 STRNG,S,40 MAP1 STG,S,1 MAP1 CNT,F,6,10 PRINT "INPTMR DEMO: demonstration for INPTMR subroutine" LOOP: PRINT "TYPE SOMETHING...:" CNT = 10 ! time out value (seconds) XCALL INPTMR,STRNG,CNT PRINT PRINT STRNG PRINT CNT ! num. of chars. typed in subroutine PRINT "TYPE SOMETHING, NO SHOW...:" CNT=-10 ! time out value (neg means noecho) XCALL INPTMR,STRNG,CNT PRINT PRINT STRNG ! no-show while input, print here PRINT CNT ! num. of chars. typed in subroutine PRINT "TYPE SOMETHING, * SHOW...:" STRG="" ! initialize destination string THLOOP=0 ! initialize loop counter THLOP: THLOOP=THLOOP+1 ! increment counter CNT=-10 ! time out value (neg means noecho) XCALL INPTMR,STG,CNT ! returns 1 if char, 0 if c/r, else -1 IF CNT>0 STRG=STRG+STG ! if char, add to destination string IF CNT<1 GOTO NDLOP ! if c/r or ^C then exit IF THLOOP>10 GOTO NDLOP ! if counter > map length of string... PRINT "*"; ! otherwise: echo "cover" character GOTO THLOP ! go get next char NDLOP: PRINT:PRINT PRINT STRNG ! false show while input, print here PRINT CNT ! will be 1 if THLOOP overflow, or 0 or -1 (for STG) GOTO LOOP