
		XDEF	_DiffEClock

		SECTION	SH_timer,CODE

_DiffEClock
		movem.l	d2/d3,-(sp)

		movem.l	(a0),d0/d1
		movem.l	(a1),d2/d3
		movem.l	d2/d3,(a0)

		sub.l	d0,d2
		subx.l	d1,d3

		movem.l	d2/d3,(a1)

		movem.l	(sp)+,d2/d3
		rts

	;
	; Simple version of the C "sprintf" function.  Assumes C-style
	; stack-based function conventions.
	;
	;   long eyecount;
	;   eyecount=2;
	;   sprintf(string,"%s have %ld eyes.","Fish",eyecount);
	;
	; would produce "Fish have 2 eyes." in the string buffer.
	;
		XDEF _Sprintf
		XREF _LVORawDoFmt

_Sprintf:	; ( a3:ostring, a0:format, a1:{values} )
		movem.l a2/a3/a6,-(sp)

		lea.l	stuffChar(pc),a2
		move.l	4.w,a6
		jsr	_LVORawDoFmt(a6)

		movem.l (sp)+,a2/a3/a6
		rts

	;------ PutChProc function used by RawDoFmt -----------
stuffChar:
		move.b	d0,(a3)+        ;Put data to output string
		rts

		END
