A83: Re: File manuplitation


[Prev][Next][Index][Thread]

A83: Re: File manuplitation




I don't know the techinique on the 83 that the basic editor uses.  But I
would guess it uses the same method that I came up with.  The OS is always
moving variables around in memory to prevent fragmentation so that the free
memory is always in a consecutive block (known as garbage-collection in high
level languages such as lisp).  Since you can't just resize a variable, the
easiest way is to create a program as big as free memory.  When you are
doing editing it or whatever, you shorten the size to the length of the
actual data.  If you want to edit an existing program, then you would
probably have to move it to the beginning of free memory, so all the free
ram would be right at the end of it.

(on the 86 you have a 16k ram page of scratch space for programs, which the
basic editor uses to store the program being edited)

-----Original Message-----
From: ceebje <B.J.Ellis@hw.ac.uk>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Monday, November 02, 1998 4:30 AM
Subject: A83: File manuplitation


>
>Hey!
>
>I know to create program files from within an
>assembly program. You specify the size, and then
>make an appropite call to somewhere.
>
>But how would you create a 'dynamic' size. Ie.
>in the basic editor there is an 'insert' operation.
>
>You insert code, and the file gets bigger.
>
>Such a usefull concept.
>
>Of course you could just edit the table entry to
>contain a larger size, but the memory you take
>has not been released. (bad).
>
>This could allow lots of cool things (word processors
>on board assemlbers (not even slighlty easy) and so on)
>
>Im not saying im going to *do* this....its just i'd
>like some info to see if it is *possible*.
>
>thanks for any help,
>
>Bill J Ellis
>
>----------------
>Bill James Ellis
>Heriot-Watt University
>
>B.J.Ellis@hw.ac.uk
>http://www.cee.hw.ac.uk/~ceebje/