Can't subtract dissimilar relative quantities

An expression subtracts two addresses that can't be subtracted from each
other, such as when they are each in a different segment:

SEGMENT SEG1
A:
ENDS SEG1
SEGMENT SEG2
B:
mov ax,B-A ;illegal, A and B in different segments
ENDS SEG2