Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!msuinfo!news From: dailey@cpsin2.cps.msu.edu (Chris Dailey) Newsgroups: comp.sys.amiga.tech Subject: Re: Files larger than available memory. Message-ID: <1990Sep27.124036.9866@msuinfo.cl.msu.edu> Date: 27 Sep 90 12:40:36 GMT References: <924@ucsvc.ucs.unimelb.edu.au> <1990Sep23.174736.16118@lavaca.uh.edu> <83986@tut.cis.ohio-state.edu> Sender: news@msuinfo.cl.msu.edu Reply-To: dailey@cpsin2.cps.msu.edu (Chris Dailey) Organization: Dept. of Computer Science, Michigan State University Lines: 57 In article <83986@tut.cis.ohio-state.edu> Jeff Martens writes: >In article <1990Sep23.174736.16118@lavaca.uh.edu> jet@karazm.math.uh.edu (J. Eric Townsend) writes: > >>In article <924@ucsvc.ucs.unimelb.edu.au> U3364521@ucsvc.ucs.unimelb.edu.au (Lou Cavallo) writes: >>>related issue. Some criticism of Amiga software (such as word processors) is >>>related to the inability to deal with files/data larger than available memory. >CP/M software, e.g., Wordstar, has been handling files bigger than >memory (typically 64k) for years. Basically, you have to handle >paging yourself, which is inconvenient but not all that difficult. I've thought of a way of doing it, however. Wordstar renames the original file to a backup name, and then copies the file to another work file (not exactly, but almost). I do not know how it really works, but one writing a word processor could have the file stored in REVERSE. Then available memory would be a window for what is in the file. You start out at the end of the file, which is the beginning of the document. If the user moves down in the document past what is in memory, what is in memory is written to a work file IN REGULAR ORDER and then more is read from the first work file, with the length of the file shortened (what is now in the sedcond work file does not need to be in the first work file). So, to visualise the document: |------------------|-----------|-----------------| | Second Workfile | Memory | First Workfile | |------------------|-----------|-----------------| As you move your cursor (which points to somewhere in memory), you will cause the 'Memory' window to move, meaning part of what is in memory will be moved from memory to the Second Workfile and then part of the First Workfile will be moved to memory. So, as you move through the document, you are in effect moving information from the First Workfile to the second. One nice thing about this approach is that, although you need free disk space equal to the document you wish to edit, you do not use up more disk space than the size of the document because (unless you are inserting text) you are just moving information from one workfile to another. Also, you can do it by just having to append/remove stuff from the ends of each file. Is this the way things are actually done in real Word Processors? (WordPerfect 5.(0|1)? Many others..) Is it easy enough to append/remove stuff from the ends of files like would be needed in this approach? I ask because I am doing some pre-thought on writing a word processor (I won't have time until after I graduate) and am trying to figure out some of the details now. Sorry if this wasn't all coherent. >-- Jeff (martens@cis.ohio-state.edu) -- /~\ Chris Dailey (CPS Undergrad, SOC Lab Coord, AMIG user group Secretary) C oo dailey@(cpsin1.cps|frith.egr).msu.edu (make WP5.1 for the Amiga) _( ^) "I am thankful for one leg. To limp is no disgrace -- / ~\ I may not be number one, but I can still run the race." -from B.C.