Added `write-char` implementation