home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / MAXONC3_6OF8.DMS / in.adf / LIBSRC.LHA / LIBSRC / time.asm < prev    next >
Encoding:
Assembly Source File  |  1994-04-16  |  617 b   |  42 lines

  1.  
  2. * Maxon C++ Library:
  3. * Modul "time"
  4. * Jens Gelhar 28.05.92
  5.  
  6.     xdef    _time,time__PUi
  7.  
  8.     xref    _DOSBase
  9.  
  10. DateStamp    = -192
  11.  
  12. ; time_t ist LW mit komprimiertem Datestamp:
  13. ;  0 - 16        sec.
  14. ; 17 - 31       days
  15.  
  16. _time:
  17. time__PUi:
  18.     movem.l d1-d3/a6,-(a7)
  19.     move.l _DOSBase,a6
  20.     lea -12(a7),a7
  21.     move.l a7,d1
  22.     jsr DateStamp(a6)
  23.     move.l (a7)+,d0         ; Days
  24.     moveq #17,d1
  25.     asl.l d1,d0
  26.     move.l (a7)+,d1         ; Minutes
  27.     mulu #60,d1
  28.     or.l d1,d0
  29.     move.l (a7)+,d1         ; Ticks
  30.     divu #50,d1
  31.     ext.l d1
  32.     add.l d1,d0
  33.     movem.l (a7)+,d1-d3
  34.     tst.l 4+4(a7)
  35.     beq.b t1
  36.     move.l 4+4(a7),a6
  37.     move.l d0,(a6)
  38. t1    move.l (a7)+,a6
  39.     rts
  40.  
  41.     end
  42.