home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / FORTRAN / SUPERT87.ZIP / MSTIME.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-12-15  |  846 b   |  48 lines

  1. ;
  2. ; subroutine time: assembly language routine to allow the acquisition
  3. ; of the current value of the system clock
  4. ;
  5. ; fortran call is : call time(hours,mins,secs,hsecs) 
  6. ;
  7. ; where j = hour:minute, i = secs:hsecs
  8. ;
  9. ;    interface to ms-fortran 3.2
  10.  
  11. frame        struc
  12. savebp    dw    ?
  13. saveret    dd    ?
  14. hsecs        dd    ?
  15. secs        dd    ?
  16. mins        dd    ?
  17. hours        dd    ?
  18. frame        ends
  19.  
  20. ;
  21. code        segment    'code'
  22.         assume    cs:code
  23. time        proc        far
  24.         public    time
  25.         push    bp
  26.         mov    bp,sp
  27.         mov    ah,2ch
  28.         int    21h
  29.         les    bx,[bp]+hours
  30.  
  31.         mov    al,ch
  32.         cbw                ; in effect, zero extend hour count
  33.         mov    es:[bx],ax        ;store hours
  34.         mov    al,cl
  35.         les    bx,[bp]+mins
  36.         mov    es:[bx],ax        ;store mins
  37.         mov    al,dh
  38.         les    bx,[bp]+secs
  39.         mov    es:[bx],ax        ;store secs
  40.         mov    al,dl
  41.         les    bx,[bp]+hsecs
  42.         mov    es:[bx],ax        ;store hsecs
  43.         pop    bp
  44.         ret    16
  45. time        endp
  46. code        ends
  47.         end
  48.