A terminal emulator written in ATS