A new flash code is proposed in this paper. This flash code has two modes of encoding: one extending the binary-indexed flash code which has been proposed by the authors, and the other using a simple mapping. It is shown that the proposed flash code has O(kq\log k + n) worst-case write deficiency, but competes very well with existing flash codes in the average write deficiency which is evaluated through computer simulations.