start to write the MercuryScript Terminal Emulator Lib