	TITLE	'ADDADR - ADD ADDRESS WITH DISPLACEMENT'
	NAME	'ADDADR'
;FILE		ADDADR.ASM
;		* * * *  PL/1 ADDRESS ADDITION  * * * * 
;PURPOSE	THIS ROUTINE PROVIDES THE ABILITY TO ADD
;		AN ADDRESS WITH A DISPLACEMENT USING ALL
;		16 BITS.
;PROGRAMMER	ROBERT M. WHITE
;DATE CODED	01 DEC 1980
;INPUT
;		PARM1 =  ADDRESS OR DISPLACEMENT
;		PARM2 =  ADDRESS OR DISPLACEMENT
;OUTPUT
;		SUM IS RETURNED AS FUNCTION.
;REMARKS
;EQUATES
;		* * *  MISCELLANEOUS  * * *
BC	EQU	B		;MULTIPLE REGISTERS
DE	EQU	D
HL	EQU	H

;		DO INITIALIZATION.
ADDADR:	CSEG
	PUBLIC	ADDADR

;		GET FIRST PARM.
	MOV	E,M		;GET PTR IN DE.
	INX	H
	MOV	D,M
	INX	H
	PUSH	H
	XCHG
	MOV	C,M		;PUT IT IN BC.
	INX	H
	MOV	B,M

;		GET THE SECOND PARM.
	POP	H		;RESTORE INPUT PTR.
	MOV	E,M		;GET PTR IN DE.
	INX	H
	MOV	D,M
	INX	H
	XCHG
	MOV	E,M		;PUT IT IN DE.
	INX	H
	MOV	D,M

;		ADD THE TWO AND RETURN.
	XCHG
	DAD	B
	RET

;END		ADDADR.ASM
	END
