mode M_END and related stuff