Factored out GEMDOS console I/O functions