	TITLE IMASK
; MASK 2 I*2 WORDS TOGETHER, RETURNING "AND" OF THEM.
; I=IMASK(J,K)
DATA	SEGMENT PUBLIC 'DATA'
DATA	ENDS
DGROUP	GROUP DATA
CODE	SEGMENT 'CODE'
	ASSUME CS:CODE,DS:DGROUP,SS:DGROUP
PUBLIC IMASK
IMASK PROC FAR
L8:
    PUSH      BP
    MOV       BP,SP
    LES       BX,DWORD PTR [BP].0AH
    MOV       AX,ES:[BX]
L9:
    LES       BX,DWORD PTR [BP].06H
    MOV       CX,ES:[BX]
    AND       AX,CX
L11:
; RETURN WITH RESULT OF MASK IN AX REGISTER... JUST ANDS 2 WORDS
; TOGETHER FOR SPEED...
    MOV       SP,BP
    POP       BP
    RET      0008H
IMASK ENDP
CODE ENDS
	END

