Table of Contents

WAITINP

Table Of Contents

  • [00004] WAITINP - WAIT FOR TERMINAL INPUT.
  • [00008] REQUEST WAIT FOR TERMINAL INPUT.

Source Code

WAITINP.txt
  1. IDENT WAITINP
  2.  
  3. ENTRY WAITINP
  4. TITLE WAITINP - WAIT FOR TERMINAL INPUT.
  5. *COMMENT WAITINP - WAIT FOR TERMINAL INPUT.
  6. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  7. SPACE 4
  8. *** WAITINP - REQUEST WAIT FOR TERMINAL INPUT.
  9. * F. R. SUTTON/J.R. HOGUE. 74/05/01.
  10. SPACE 4
  11. *CALL COMKMAC
  12. *CALL COMSPRD
  13. TRXCOM
  14. SPACE 4
  15. *** CALL FORMAT -
  16. *
  17. * FORTRAN EXTENDED
  18. * CALL WAITINP(STAT,TIME)
  19. * COBOL
  20. * ENTER WAITINP USING TIME STAT
  21. *
  22. * WHERE - STAT = STATUS AFTER REQUEST
  23. * < 0 IF ANOTHER TASK IS ALREADY WAITING FOR
  24. * INPUT FROM THE DESIRED TERMINAL.
  25. * = 0 IF REQUEST PROCESSED OK.
  26. * > 0 IF THE REQUEST TIMED OUT WITH NO INPUT
  27. * RECEIVED.
  28. * TIME = TIME IN SECONDS BEFORE FORCED RESTART IF NO
  29. * INPUT RECEIVED FROM THE TERMINAL. (OPTIONAL)
  30.  
  31.  
  32. WAITINP PS ENTRY/EXIT
  33. SB2 X1 STATUS ADDRESS
  34. SA5 A1+1
  35. BX7 X7-X7
  36. ZR X5,WAI1 IF NO TIME GIVEN
  37. SA5 X5
  38. BX7 X5
  39. WAI1 SA7 WAIA STORE TIME OUT VALUE
  40. WAITINP WAIA REQUEST WAIT FOR TERMINAL INPUT
  41. SA6 B2 STORE STATUS AFTER REQUEST
  42. NG X6,WAITINP IF TERMINAL ALREADY IN *WAITINP* STATE
  43. BX6 X6-X6
  44. SX2 1
  45. SA1 MSGC FIRST WORD OF TERMINAL DATA
  46. BX3 X2-X1
  47. SA6 B2 SET STATUS WORD TO ZERO
  48. NZ X3,WAITINP IF TERMINAL INPUT RECEIVED
  49. BX6 X2
  50. SA6 B2 SET STATUS NON ZERO
  51. JP WAITINP RETURN
  52.  
  53. WAIA BSS 1
  54.  
  55. END