Moved I/O to Devices library

To be used by editor and assembler
Also reversed endianess of sample block