;
; subroutine time: assembly language routine to allow the acquisition
; of the current value of the system clock
;
; fortran call is : call time(hours,mins,secs,hsecs) 
;
; where j = hour:minute, i = secs:hsecs
;
;	interface to ms-fortran 3.2

frame		struc
savebp	dw	?
saveret	dd	?
hsecs		dd	?
secs		dd	?
mins		dd	?
hours		dd	?
frame		ends

;
code		segment	'code'
		assume	cs:code
time		proc		far
		public	time
		push	bp
		mov	bp,sp
		mov	ah,2ch
		int	21h
		les	bx,[bp]+hours

		mov	al,ch
		cbw				; in effect, zero extend hour count
		mov	es:[bx],ax		;store hours
		mov	al,cl
		les	bx,[bp]+mins
		mov	es:[bx],ax		;store mins
		mov	al,dh
		les	bx,[bp]+secs
		mov	es:[bx],ax		;store secs
		mov	al,dl
		les	bx,[bp]+hsecs
		mov	es:[bx],ax		;store hsecs
		pop	bp
		ret	16
time		endp
code		ends
		end
bx] =  &secs
;	es:12[bx] =	&hsecs

;	format ret