home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / fortran / mslang / getkey / loopy.for < prev    next >
Text File  |  1993-08-23  |  631b  |  23 lines

  1.       PROGRAM LOOPY
  2.       implicit integer*2 (i-n)
  3. c
  4.       ic0 = 0
  5.    10 call gettim(ih,im,is,ic)
  6.       if (ic.eq.ic0) go to 10
  7.       ic0 = ic
  8.       print 20, ih,im,is,ic
  9.    20 format (' Time is : ',2(I2.2,1H:),I2.2,1H.,I2.2)
  10.       call chkkey(istat1)
  11.       if (istat1.eq.0) go to 10
  12.       print 30, istat1/256, mod(istat1,256)
  13.    30 format (' Key received: Scan Code = ',Z2,', ASCII = ',Z2)
  14.       print 40
  15.    40 format (' Enter a key ->')
  16.       call getkey(istat2)
  17.       print 30, istat2/256, mod(istat2,256)
  18.       print 50, istat1, istat2
  19.    50 format (' IS1, IS2 = ',2(1X,Z4))
  20. c
  21.       stop
  22.       end
  23.