include clib.inc

	.8086

	public	QWLAX
	public	QWLDX
	public	QWHAX
	public	QWHDX
	public	ADD32
	public	ADD64
	public	CLR64

_TEXT	SEGMENT

CLR64	PROC	DIST
	XOR	AX,AX
	MOV	QWHAX,AX
	MOV	QWHDX,AX
	MOV	QWLAX,AX
	MOV	QWLDX,AX
	RET
CLR64	ENDP

ADD64	PROC 	DIST	; CX:BX:DX:AX
	ADD	QWHAX,BX
	ADC	QWHDX,CX
ADD64	ENDP

ADD32	PROC    DIST	; DX:AX
	ADD	QWLAX,AX
	ADC	QWLDX,DX
	ADC	QWHAX,0
	ADC	QWHDX,0
	RET
ADD32	ENDP

_TEXT	ENDS

_DATA	SEGMENT
QWLAX	DW	?
QWLDX	DW	?
QWHAX	DW	?
QWHDX	DW	?
_DATA	ENDS

	END
