The 65c816 has no CLM instruction to directly clear the m flag. Instead, use REP:
REP #$20
The 65c816 has no SEM instruction to directly set the m flag. Instead, use SEP:
SEP #$20