uaem_write_flags