created an iobuffer and macros for sys.read/write/exit