We prove that if the Hardy-Littlewood maximal operator is bounded on a separable Banach function space X(Rn) and on its associate space X′(Rn) and a maximally modulated Calderón-Zygmund singular integral operator TΦ is of weak type (r,r) for all r∈(1,∞), then TΦ extends to a bounded operator on X(Rn). This theorem implies the boundedness of the maximally modulated Hilbert transform on variable Lebesgue spaces Lp(⋅)(R) under natural assumptions on the variable exponent p:R→(1,∞). Applications of the above result to the boundedness and compactness of pseudodifferential operators with L∞(R,V(R))-symbols on variable Lebesgue spaces Lp(⋅)(R) are considered. Here the Banach algebra L∞(R,V(R)) consists of all bounded measurable V(R)-valued functions on R where V(R) is the Banach algebra of all functions of bounded total variation.