Difference methods for mixed boundary-value problems