  This paper considers coding for so-called partially stuck (defect) memory
cells. Such memory cells can only store partial information as some of their
levels cannot be used fully due to, e.g., wearout. First, we present new
constructions that are able to mask $u$ partially stuck cells while correcting
at the same time $t$ random errors. The process of "masking" determines a word
whose entries coincide with writable levels at the (partially) stuck cells. For
$u>1$ and alphabet size $q>2$, our new constructions improve upon the required
redundancy of known constructions for $t=0$, and require less redundancy for
masking partially stuck cells than former works required for masking fully
stuck cells (which cannot store any information). Second, we show that treating
some of the partially stuck cells as erroneous cells can decrease the required
redundancy for some parameters. Lastly, we derive Singleton-like,
sphere-packing-like, and Gilbert--Varshamov-like bounds. Numerical comparisons
state that our constructions match the Gilbert--Varshamov-like bounds for
several code parameters, e.g., BCH codes that contain all-one word by our first
construction.
