def displ2ea(scale, disp, base):
    """ displacement to effective address """
    dest = base + 4 + scale * disp
    if dest < 0:
        dest = -dest
        dest = dest ^ 18446744073709551615
        dest = dest + 1
    return dest
