We study a non-unital and non-commutative ring \(S_{m}(R)\) , called ring of ordered sum over a ring R. We obtain linear codes over \(S_{m}(\mathbb {F}_{2})\) , also known as \(S_{m}\) -codes, where \(\mathbb {F}_{2}\) is the binary field. The algebraic structure of \(S_{m}\) -codes, particularly, their residue and torsion codes, will be explored. Moreover, a generalized notion of quasi self-dual codes will be introduced. Finally, we give results on the weight enumerators of these codes and construct \(S_{3}\) -codes in short lengths using the residue and torsion codes.