Basics of marker writing (part of #782).