don't write pi if we're not using writeDirect
inline assembly ftw.