use writeAsciiToMemory in library.js in more places