There are two efuns for reading files. On msdos version they both have problems. Maximum string lengths limit you to about 8KB blocks. (about 8000 characters). read_file(file,start, block), This will tend to fail when the start line gets above a 1000 lines. It causes an exception 14 error and crashes the driver. I don't bother using it. When using it you have to consider string length restriction, are you reading 500 lines with an av. of 16 chars per line, or 100 lines with 80 chars per line. It also does not read escape characters. It is hard judge where the end-of-file. What is really needed is a nice fn that will give you the number of '\n' in a file. read_bytes(file, start_byte, finish_byte), When using it on MSDOS you must remember that the start byte file pointer counts the <cr-lf> eol as 2 bytes, but the finish byte doesn't. Confusing! It took me ages to figure it out. Reason, Olavs hack to remove <LF> character. File on disk is: txt1\r\n\rtxt2\r\ntxt3\r\ntxt4\r\n ^ fp fp counts \r when positioning. When read_bytes() grabs the txt from the fp position, it ignores the carriage returns. txt2\ntxt3\n\r\r <- it counts this as rubbish and ignores it. ^ ^ fp finish byte So if you want to get the fp for txt4. You have to count the rubbish characters for MSDOS, it is equa to 1 byte per line of txt. So my hack is something like this, fp = finish_byte; /* ok for unix */ #ifdef MSDOS fp += explode(txt +"\n","\n") - 1; #endif file_size(), The same reason as the read_bytes hack, file_size ignores the carriage return. So file size can vary.