Home » Archimedes archive » Acorn User » AU 1994-Xmas.adf » Programs » StarInfo/Bower/!ReadMe

StarInfo/Bower/!ReadMe

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1994-Xmas.adf » Programs
Filename: StarInfo/Bower/!ReadMe
Read OK:
File size: 1231 bytes
Load address: 0000
Exec address: 0000
File contents
Memory manager: �MemUtil�   By Andrew Bower (Aged 15)        19 August 1994
=========================   =========================        ==============

MemUtil provides a method to control the machine's memory allocation out of
the desktop, which is more flexible the *ChangeDynamicArea.

To use the utility double-click on �CSD_here� and type *MemUtil.

The utility does the following:

-help         Displays a help message in the style of *Help.
-display      Displays the current size and free space of the dynamic areas.
-interactive  A means of using the program without learning the syntax.

[-system] [+|-|=]<size in kilobytes>
[-RMA]    [+|-|=]<size in kilobytes>
[-screen] [+|-|=]<size in kilobytes>
[-sprite] [+|-|=]<size in kilobytes>
[-font]   [+|-|=]<size in kilobytes>
[-RAMFS]  [+|-|=]<size in kilobytes>

These options allow the respective dynamic areas to be altered in one of four
ways:

  +n  increases area by nK
  -n  decreases area by nK
  =n  sets area TO nK
  n   ensures nK FREE in area    (perhaps the most useful)

e.g.:   -rma +32         increases the RMA size by 32K
        -f "-48"         reduces the font area by 48K
        -screen =320     sets the screen memory to 320K
                            (useful for non-desktop graphics demonstrations)
        -sprite 23       ensures at least 23K FREE in sprite area.
        
If this utility is included within the library of a hard disc, then its use
is more powerful. For example, it could be used within a boot sequence as a
convenient way of setting the size of several dynamic areas. E.g.:

*MemUtil 0 32 =160 0 =96 =48

    .. will shrink the system area as far as possible,
       ensure 32K free in RMA (useful when programming outside desktop)
       force 160K screen memory (e.g. for screen bank swapping)
       shrink sprite area if possible.
       set the font cache size to 96K
       create a 48K RAM disc.

A game or graphical demo like those masterpieces in *Info, may be less
annoying to the user if he does not have to change the memory allocations
manually with the Task Manager on receiving the error �Bad mode�. The
following command in an Obey file would do the trick.
       
*MemUtil -screen =160 -sprite 50

    .. will set the screen memory to 160K  (2 � MODE 13 banks),
       ensure 50K free in the sprite area (for naughty programs!).
       
In interactive mode, this program will prompt the user for the area to change
and the new size for it.

Depending on whether RISC OS 3.50 uses a compatible method for handling
dynamic areas or not, this program may be able to handle them in interactive
mode and may also be able to accept modifications to the program.

I think this program is compatible with RISC OS 2, but I cannot test that
point. The only difference would be that the free space in RAMFS would not be
displayed. ****** It must first be reassembled however. ********

If *MemUtil is used with no parameters, it will use the default environment
string (�-d-h-i�) which is null-terminated and can be found at the end of the
object code thus can be altered using any text editor.

Technical information
=====================

The source code can be found in the BASIC program �MemSource�.

It should be necessary to convert the utility into a module, as mentioned
within the source code, but certain alterations would be necessary.

If you need to reassemble the code, remember to change the path names in
lines 170 and 180.

.change is the subroutine used to change the sizes. It parses the string
supplied for each area and takes slightly different actions according to the
preceeding character (-,+ or =).

The names of the dynamic areas are held in the form of an �OS_PrettyPrint�
dictionary, using �FNname�.

In order to display the memory sizes intelligently, the program uses
�OS_ConvertFixedFileSize� and doctors the output slightly.

To display the free space in a particular area it is necessary to use calls
indepent to each area, thus the table at .table contains the offsets of
routines to call which return the free space in R0 and preserve all other
registers. If the offset is zero, no free space is displayed.

RMA free space:     �OS_Module�, describe RMA
screen free space:  �OS_ClaimScreenMemory�.
sprite area space:  �OS_SpriteOp�, read control area
font cache space:   �Font_CacheAddr�
RAMFS free space:   �OS_FSControl� 49

The free application memory is read with �OS_GetEnv� but does not include the
Wimp free pool.

The total memory is found by multiplying the page size with the number of
pages (�OS_ReadMemMapInfo�)


         Andrew Bower      19 August 1994
         ================================
00000000  4d 65 6d 6f 72 79 20 6d  61 6e 61 67 65 72 3a 20  |Memory manager: |
00000010  90 4d 65 6d 55 74 69 6c  91 20 20 20 42 79 20 41  |.MemUtil.   By A|
00000020  6e 64 72 65 77 20 42 6f  77 65 72 20 28 41 67 65  |ndrew Bower (Age|
00000030  64 20 31 35 29 20 20 20  20 20 20 20 20 31 39 20  |d 15)        19 |
00000040  41 75 67 75 73 74 20 31  39 39 34 0a 3d 3d 3d 3d  |August 1994.====|
00000050  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000060  3d 3d 3d 3d 3d 20 20 20  3d 3d 3d 3d 3d 3d 3d 3d  |=====   ========|
00000070  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000080  3d 20 20 20 20 20 20 20  20 3d 3d 3d 3d 3d 3d 3d  |=        =======|
00000090  3d 3d 3d 3d 3d 3d 3d 0a  0a 4d 65 6d 55 74 69 6c  |=======..MemUtil|
000000a0  20 70 72 6f 76 69 64 65  73 20 61 20 6d 65 74 68  | provides a meth|
000000b0  6f 64 20 74 6f 20 63 6f  6e 74 72 6f 6c 20 74 68  |od to control th|
000000c0  65 20 6d 61 63 68 69 6e  65 27 73 20 6d 65 6d 6f  |e machine's memo|
000000d0  72 79 20 61 6c 6c 6f 63  61 74 69 6f 6e 20 6f 75  |ry allocation ou|
000000e0  74 20 6f 66 0a 74 68 65  20 64 65 73 6b 74 6f 70  |t of.the desktop|
000000f0  2c 20 77 68 69 63 68 20  69 73 20 6d 6f 72 65 20  |, which is more |
00000100  66 6c 65 78 69 62 6c 65  20 74 68 65 20 2a 43 68  |flexible the *Ch|
00000110  61 6e 67 65 44 79 6e 61  6d 69 63 41 72 65 61 2e  |angeDynamicArea.|
00000120  0a 0a 54 6f 20 75 73 65  20 74 68 65 20 75 74 69  |..To use the uti|
00000130  6c 69 74 79 20 64 6f 75  62 6c 65 2d 63 6c 69 63  |lity double-clic|
00000140  6b 20 6f 6e 20 90 43 53  44 5f 68 65 72 65 91 20  |k on .CSD_here. |
00000150  61 6e 64 20 74 79 70 65  20 2a 4d 65 6d 55 74 69  |and type *MemUti|
00000160  6c 2e 0a 0a 54 68 65 20  75 74 69 6c 69 74 79 20  |l...The utility |
00000170  64 6f 65 73 20 74 68 65  20 66 6f 6c 6c 6f 77 69  |does the followi|
00000180  6e 67 3a 0a 0a 2d 68 65  6c 70 20 20 20 20 20 20  |ng:..-help      |
00000190  20 20 20 44 69 73 70 6c  61 79 73 20 61 20 68 65  |   Displays a he|
000001a0  6c 70 20 6d 65 73 73 61  67 65 20 69 6e 20 74 68  |lp message in th|
000001b0  65 20 73 74 79 6c 65 20  6f 66 20 2a 48 65 6c 70  |e style of *Help|
000001c0  2e 0a 2d 64 69 73 70 6c  61 79 20 20 20 20 20 20  |..-display      |
000001d0  44 69 73 70 6c 61 79 73  20 74 68 65 20 63 75 72  |Displays the cur|
000001e0  72 65 6e 74 20 73 69 7a  65 20 61 6e 64 20 66 72  |rent size and fr|
000001f0  65 65 20 73 70 61 63 65  20 6f 66 20 74 68 65 20  |ee space of the |
00000200  64 79 6e 61 6d 69 63 20  61 72 65 61 73 2e 0a 2d  |dynamic areas..-|
00000210  69 6e 74 65 72 61 63 74  69 76 65 20 20 41 20 6d  |interactive  A m|
00000220  65 61 6e 73 20 6f 66 20  75 73 69 6e 67 20 74 68  |eans of using th|
00000230  65 20 70 72 6f 67 72 61  6d 20 77 69 74 68 6f 75  |e program withou|
00000240  74 20 6c 65 61 72 6e 69  6e 67 20 74 68 65 20 73  |t learning the s|
00000250  79 6e 74 61 78 2e 0a 0a  5b 2d 73 79 73 74 65 6d  |yntax...[-system|
00000260  5d 20 5b 2b 7c 2d 7c 3d  5d 3c 73 69 7a 65 20 69  |] [+|-|=]<size i|
00000270  6e 20 6b 69 6c 6f 62 79  74 65 73 3e 0a 5b 2d 52  |n kilobytes>.[-R|
00000280  4d 41 5d 20 20 20 20 5b  2b 7c 2d 7c 3d 5d 3c 73  |MA]    [+|-|=]<s|
00000290  69 7a 65 20 69 6e 20 6b  69 6c 6f 62 79 74 65 73  |ize in kilobytes|
000002a0  3e 0a 5b 2d 73 63 72 65  65 6e 5d 20 5b 2b 7c 2d  |>.[-screen] [+|-|
000002b0  7c 3d 5d 3c 73 69 7a 65  20 69 6e 20 6b 69 6c 6f  ||=]<size in kilo|
000002c0  62 79 74 65 73 3e 0a 5b  2d 73 70 72 69 74 65 5d  |bytes>.[-sprite]|
000002d0  20 5b 2b 7c 2d 7c 3d 5d  3c 73 69 7a 65 20 69 6e  | [+|-|=]<size in|
000002e0  20 6b 69 6c 6f 62 79 74  65 73 3e 0a 5b 2d 66 6f  | kilobytes>.[-fo|
000002f0  6e 74 5d 20 20 20 5b 2b  7c 2d 7c 3d 5d 3c 73 69  |nt]   [+|-|=]<si|
00000300  7a 65 20 69 6e 20 6b 69  6c 6f 62 79 74 65 73 3e  |ze in kilobytes>|
00000310  0a 5b 2d 52 41 4d 46 53  5d 20 20 5b 2b 7c 2d 7c  |.[-RAMFS]  [+|-||
00000320  3d 5d 3c 73 69 7a 65 20  69 6e 20 6b 69 6c 6f 62  |=]<size in kilob|
00000330  79 74 65 73 3e 0a 0a 54  68 65 73 65 20 6f 70 74  |ytes>..These opt|
00000340  69 6f 6e 73 20 61 6c 6c  6f 77 20 74 68 65 20 72  |ions allow the r|
00000350  65 73 70 65 63 74 69 76  65 20 64 79 6e 61 6d 69  |espective dynami|
00000360  63 20 61 72 65 61 73 20  74 6f 20 62 65 20 61 6c  |c areas to be al|
00000370  74 65 72 65 64 20 69 6e  20 6f 6e 65 20 6f 66 20  |tered in one of |
00000380  66 6f 75 72 0a 77 61 79  73 3a 0a 0a 20 20 2b 6e  |four.ways:..  +n|
00000390  20 20 69 6e 63 72 65 61  73 65 73 20 61 72 65 61  |  increases area|
000003a0  20 62 79 20 6e 4b 0a 20  20 2d 6e 20 20 64 65 63  | by nK.  -n  dec|
000003b0  72 65 61 73 65 73 20 61  72 65 61 20 62 79 20 6e  |reases area by n|
000003c0  4b 0a 20 20 3d 6e 20 20  73 65 74 73 20 61 72 65  |K.  =n  sets are|
000003d0  61 20 54 4f 20 6e 4b 0a  20 20 6e 20 20 20 65 6e  |a TO nK.  n   en|
000003e0  73 75 72 65 73 20 6e 4b  20 46 52 45 45 20 69 6e  |sures nK FREE in|
000003f0  20 61 72 65 61 20 20 20  20 28 70 65 72 68 61 70  | area    (perhap|
00000400  73 20 74 68 65 20 6d 6f  73 74 20 75 73 65 66 75  |s the most usefu|
00000410  6c 29 0a 0a 65 2e 67 2e  3a 20 20 20 2d 72 6d 61  |l)..e.g.:   -rma|
00000420  20 2b 33 32 20 20 20 20  20 20 20 20 20 69 6e 63  | +32         inc|
00000430  72 65 61 73 65 73 20 74  68 65 20 52 4d 41 20 73  |reases the RMA s|
00000440  69 7a 65 20 62 79 20 33  32 4b 0a 20 20 20 20 20  |ize by 32K.     |
00000450  20 20 20 2d 66 20 22 2d  34 38 22 20 20 20 20 20  |   -f "-48"     |
00000460  20 20 20 20 72 65 64 75  63 65 73 20 74 68 65 20  |    reduces the |
00000470  66 6f 6e 74 20 61 72 65  61 20 62 79 20 34 38 4b  |font area by 48K|
00000480  0a 20 20 20 20 20 20 20  20 2d 73 63 72 65 65 6e  |.        -screen|
00000490  20 3d 33 32 30 20 20 20  20 20 73 65 74 73 20 74  | =320     sets t|
000004a0  68 65 20 73 63 72 65 65  6e 20 6d 65 6d 6f 72 79  |he screen memory|
000004b0  20 74 6f 20 33 32 30 4b  0a 20 20 20 20 20 20 20  | to 320K.       |
000004c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000004d0  20 20 20 20 20 28 75 73  65 66 75 6c 20 66 6f 72  |     (useful for|
000004e0  20 6e 6f 6e 2d 64 65 73  6b 74 6f 70 20 67 72 61  | non-desktop gra|
000004f0  70 68 69 63 73 20 64 65  6d 6f 6e 73 74 72 61 74  |phics demonstrat|
00000500  69 6f 6e 73 29 0a 20 20  20 20 20 20 20 20 2d 73  |ions).        -s|
00000510  70 72 69 74 65 20 32 33  20 20 20 20 20 20 20 65  |prite 23       e|
00000520  6e 73 75 72 65 73 20 61  74 20 6c 65 61 73 74 20  |nsures at least |
00000530  32 33 4b 20 46 52 45 45  20 69 6e 20 73 70 72 69  |23K FREE in spri|
00000540  74 65 20 61 72 65 61 2e  0a 20 20 20 20 20 20 20  |te area..       |
00000550  20 0a 49 66 20 74 68 69  73 20 75 74 69 6c 69 74  | .If this utilit|
00000560  79 20 69 73 20 69 6e 63  6c 75 64 65 64 20 77 69  |y is included wi|
00000570  74 68 69 6e 20 74 68 65  20 6c 69 62 72 61 72 79  |thin the library|
00000580  20 6f 66 20 61 20 68 61  72 64 20 64 69 73 63 2c  | of a hard disc,|
00000590  20 74 68 65 6e 20 69 74  73 20 75 73 65 0a 69 73  | then its use.is|
000005a0  20 6d 6f 72 65 20 70 6f  77 65 72 66 75 6c 2e 20  | more powerful. |
000005b0  46 6f 72 20 65 78 61 6d  70 6c 65 2c 20 69 74 20  |For example, it |
000005c0  63 6f 75 6c 64 20 62 65  20 75 73 65 64 20 77 69  |could be used wi|
000005d0  74 68 69 6e 20 61 20 62  6f 6f 74 20 73 65 71 75  |thin a boot sequ|
000005e0  65 6e 63 65 20 61 73 20  61 0a 63 6f 6e 76 65 6e  |ence as a.conven|
000005f0  69 65 6e 74 20 77 61 79  20 6f 66 20 73 65 74 74  |ient way of sett|
00000600  69 6e 67 20 74 68 65 20  73 69 7a 65 20 6f 66 20  |ing the size of |
00000610  73 65 76 65 72 61 6c 20  64 79 6e 61 6d 69 63 20  |several dynamic |
00000620  61 72 65 61 73 2e 20 45  2e 67 2e 3a 0a 0a 2a 4d  |areas. E.g.:..*M|
00000630  65 6d 55 74 69 6c 20 30  20 33 32 20 3d 31 36 30  |emUtil 0 32 =160|
00000640  20 30 20 3d 39 36 20 3d  34 38 0a 0a 20 20 20 20  | 0 =96 =48..    |
00000650  2e 2e 20 77 69 6c 6c 20  73 68 72 69 6e 6b 20 74  |.. will shrink t|
00000660  68 65 20 73 79 73 74 65  6d 20 61 72 65 61 20 61  |he system area a|
00000670  73 20 66 61 72 20 61 73  20 70 6f 73 73 69 62 6c  |s far as possibl|
00000680  65 2c 0a 20 20 20 20 20  20 20 65 6e 73 75 72 65  |e,.       ensure|
00000690  20 33 32 4b 20 66 72 65  65 20 69 6e 20 52 4d 41  | 32K free in RMA|
000006a0  20 28 75 73 65 66 75 6c  20 77 68 65 6e 20 70 72  | (useful when pr|
000006b0  6f 67 72 61 6d 6d 69 6e  67 20 6f 75 74 73 69 64  |ogramming outsid|
000006c0  65 20 64 65 73 6b 74 6f  70 29 0a 20 20 20 20 20  |e desktop).     |
000006d0  20 20 66 6f 72 63 65 20  31 36 30 4b 20 73 63 72  |  force 160K scr|
000006e0  65 65 6e 20 6d 65 6d 6f  72 79 20 28 65 2e 67 2e  |een memory (e.g.|
000006f0  20 66 6f 72 20 73 63 72  65 65 6e 20 62 61 6e 6b  | for screen bank|
00000700  20 73 77 61 70 70 69 6e  67 29 0a 20 20 20 20 20  | swapping).     |
00000710  20 20 73 68 72 69 6e 6b  20 73 70 72 69 74 65 20  |  shrink sprite |
00000720  61 72 65 61 20 69 66 20  70 6f 73 73 69 62 6c 65  |area if possible|
00000730  2e 0a 20 20 20 20 20 20  20 73 65 74 20 74 68 65  |..       set the|
00000740  20 66 6f 6e 74 20 63 61  63 68 65 20 73 69 7a 65  | font cache size|
00000750  20 74 6f 20 39 36 4b 0a  20 20 20 20 20 20 20 63  | to 96K.       c|
00000760  72 65 61 74 65 20 61 20  34 38 4b 20 52 41 4d 20  |reate a 48K RAM |
00000770  64 69 73 63 2e 0a 0a 41  20 67 61 6d 65 20 6f 72  |disc...A game or|
00000780  20 67 72 61 70 68 69 63  61 6c 20 64 65 6d 6f 20  | graphical demo |
00000790  6c 69 6b 65 20 74 68 6f  73 65 20 6d 61 73 74 65  |like those maste|
000007a0  72 70 69 65 63 65 73 20  69 6e 20 2a 49 6e 66 6f  |rpieces in *Info|
000007b0  2c 20 6d 61 79 20 62 65  20 6c 65 73 73 0a 61 6e  |, may be less.an|
000007c0  6e 6f 79 69 6e 67 20 74  6f 20 74 68 65 20 75 73  |noying to the us|
000007d0  65 72 20 69 66 20 68 65  20 64 6f 65 73 20 6e 6f  |er if he does no|
000007e0  74 20 68 61 76 65 20 74  6f 20 63 68 61 6e 67 65  |t have to change|
000007f0  20 74 68 65 20 6d 65 6d  6f 72 79 20 61 6c 6c 6f  | the memory allo|
00000800  63 61 74 69 6f 6e 73 0a  6d 61 6e 75 61 6c 6c 79  |cations.manually|
00000810  20 77 69 74 68 20 74 68  65 20 54 61 73 6b 20 4d  | with the Task M|
00000820  61 6e 61 67 65 72 20 6f  6e 20 72 65 63 65 69 76  |anager on receiv|
00000830  69 6e 67 20 74 68 65 20  65 72 72 6f 72 20 90 42  |ing the error .B|
00000840  61 64 20 6d 6f 64 65 91  2e 20 54 68 65 0a 66 6f  |ad mode.. The.fo|
00000850  6c 6c 6f 77 69 6e 67 20  63 6f 6d 6d 61 6e 64 20  |llowing command |
00000860  69 6e 20 61 6e 20 4f 62  65 79 20 66 69 6c 65 20  |in an Obey file |
00000870  77 6f 75 6c 64 20 64 6f  20 74 68 65 20 74 72 69  |would do the tri|
00000880  63 6b 2e 0a 20 20 20 20  20 20 20 0a 2a 4d 65 6d  |ck..       .*Mem|
00000890  55 74 69 6c 20 2d 73 63  72 65 65 6e 20 3d 31 36  |Util -screen =16|
000008a0  30 20 2d 73 70 72 69 74  65 20 35 30 0a 0a 20 20  |0 -sprite 50..  |
000008b0  20 20 2e 2e 20 77 69 6c  6c 20 73 65 74 20 74 68  |  .. will set th|
000008c0  65 20 73 63 72 65 65 6e  20 6d 65 6d 6f 72 79 20  |e screen memory |
000008d0  74 6f 20 31 36 30 4b 20  20 28 32 20 d7 20 4d 4f  |to 160K  (2 . MO|
000008e0  44 45 20 31 33 20 62 61  6e 6b 73 29 2c 0a 20 20  |DE 13 banks),.  |
000008f0  20 20 20 20 20 65 6e 73  75 72 65 20 35 30 4b 20  |     ensure 50K |
00000900  66 72 65 65 20 69 6e 20  74 68 65 20 73 70 72 69  |free in the spri|
00000910  74 65 20 61 72 65 61 20  28 66 6f 72 20 6e 61 75  |te area (for nau|
00000920  67 68 74 79 20 70 72 6f  67 72 61 6d 73 21 29 2e  |ghty programs!).|
00000930  0a 20 20 20 20 20 20 20  0a 49 6e 20 69 6e 74 65  |.       .In inte|
00000940  72 61 63 74 69 76 65 20  6d 6f 64 65 2c 20 74 68  |ractive mode, th|
00000950  69 73 20 70 72 6f 67 72  61 6d 20 77 69 6c 6c 20  |is program will |
00000960  70 72 6f 6d 70 74 20 74  68 65 20 75 73 65 72 20  |prompt the user |
00000970  66 6f 72 20 74 68 65 20  61 72 65 61 20 74 6f 20  |for the area to |
00000980  63 68 61 6e 67 65 0a 61  6e 64 20 74 68 65 20 6e  |change.and the n|
00000990  65 77 20 73 69 7a 65 20  66 6f 72 20 69 74 2e 0a  |ew size for it..|
000009a0  0a 44 65 70 65 6e 64 69  6e 67 20 6f 6e 20 77 68  |.Depending on wh|
000009b0  65 74 68 65 72 20 52 49  53 43 20 4f 53 20 33 2e  |ether RISC OS 3.|
000009c0  35 30 20 75 73 65 73 20  61 20 63 6f 6d 70 61 74  |50 uses a compat|
000009d0  69 62 6c 65 20 6d 65 74  68 6f 64 20 66 6f 72 20  |ible method for |
000009e0  68 61 6e 64 6c 69 6e 67  0a 64 79 6e 61 6d 69 63  |handling.dynamic|
000009f0  20 61 72 65 61 73 20 6f  72 20 6e 6f 74 2c 20 74  | areas or not, t|
00000a00  68 69 73 20 70 72 6f 67  72 61 6d 20 6d 61 79 20  |his program may |
00000a10  62 65 20 61 62 6c 65 20  74 6f 20 68 61 6e 64 6c  |be able to handl|
00000a20  65 20 74 68 65 6d 20 69  6e 20 69 6e 74 65 72 61  |e them in intera|
00000a30  63 74 69 76 65 0a 6d 6f  64 65 20 61 6e 64 20 6d  |ctive.mode and m|
00000a40  61 79 20 61 6c 73 6f 20  62 65 20 61 62 6c 65 20  |ay also be able |
00000a50  74 6f 20 61 63 63 65 70  74 20 6d 6f 64 69 66 69  |to accept modifi|
00000a60  63 61 74 69 6f 6e 73 20  74 6f 20 74 68 65 20 70  |cations to the p|
00000a70  72 6f 67 72 61 6d 2e 0a  0a 49 20 74 68 69 6e 6b  |rogram...I think|
00000a80  20 74 68 69 73 20 70 72  6f 67 72 61 6d 20 69 73  | this program is|
00000a90  20 63 6f 6d 70 61 74 69  62 6c 65 20 77 69 74 68  | compatible with|
00000aa0  20 52 49 53 43 20 4f 53  20 32 2c 20 62 75 74 20  | RISC OS 2, but |
00000ab0  49 20 63 61 6e 6e 6f 74  20 74 65 73 74 20 74 68  |I cannot test th|
00000ac0  61 74 0a 70 6f 69 6e 74  2e 20 54 68 65 20 6f 6e  |at.point. The on|
00000ad0  6c 79 20 64 69 66 66 65  72 65 6e 63 65 20 77 6f  |ly difference wo|
00000ae0  75 6c 64 20 62 65 20 74  68 61 74 20 74 68 65 20  |uld be that the |
00000af0  66 72 65 65 20 73 70 61  63 65 20 69 6e 20 52 41  |free space in RA|
00000b00  4d 46 53 20 77 6f 75 6c  64 20 6e 6f 74 20 62 65  |MFS would not be|
00000b10  0a 64 69 73 70 6c 61 79  65 64 2e 20 2a 2a 2a 2a  |.displayed. ****|
00000b20  2a 2a 20 49 74 20 6d 75  73 74 20 66 69 72 73 74  |** It must first|
00000b30  20 62 65 20 72 65 61 73  73 65 6d 62 6c 65 64 20  | be reassembled |
00000b40  68 6f 77 65 76 65 72 2e  20 2a 2a 2a 2a 2a 2a 2a  |however. *******|
00000b50  2a 0a 0a 49 66 20 2a 4d  65 6d 55 74 69 6c 20 69  |*..If *MemUtil i|
00000b60  73 20 75 73 65 64 20 77  69 74 68 20 6e 6f 20 70  |s used with no p|
00000b70  61 72 61 6d 65 74 65 72  73 2c 20 69 74 20 77 69  |arameters, it wi|
00000b80  6c 6c 20 75 73 65 20 74  68 65 20 64 65 66 61 75  |ll use the defau|
00000b90  6c 74 20 65 6e 76 69 72  6f 6e 6d 65 6e 74 0a 73  |lt environment.s|
00000ba0  74 72 69 6e 67 20 28 90  2d 64 2d 68 2d 69 91 29  |tring (.-d-h-i.)|
00000bb0  20 77 68 69 63 68 20 69  73 20 6e 75 6c 6c 2d 74  | which is null-t|
00000bc0  65 72 6d 69 6e 61 74 65  64 20 61 6e 64 20 63 61  |erminated and ca|
00000bd0  6e 20 62 65 20 66 6f 75  6e 64 20 61 74 20 74 68  |n be found at th|
00000be0  65 20 65 6e 64 20 6f 66  20 74 68 65 0a 6f 62 6a  |e end of the.obj|
00000bf0  65 63 74 20 63 6f 64 65  20 74 68 75 73 20 63 61  |ect code thus ca|
00000c00  6e 20 62 65 20 61 6c 74  65 72 65 64 20 75 73 69  |n be altered usi|
00000c10  6e 67 20 61 6e 79 20 74  65 78 74 20 65 64 69 74  |ng any text edit|
00000c20  6f 72 2e 0a 0a 54 65 63  68 6e 69 63 61 6c 20 69  |or...Technical i|
00000c30  6e 66 6f 72 6d 61 74 69  6f 6e 0a 3d 3d 3d 3d 3d  |nformation.=====|
00000c40  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000c50  0a 0a 54 68 65 20 73 6f  75 72 63 65 20 63 6f 64  |..The source cod|
00000c60  65 20 63 61 6e 20 62 65  20 66 6f 75 6e 64 20 69  |e can be found i|
00000c70  6e 20 74 68 65 20 42 41  53 49 43 20 70 72 6f 67  |n the BASIC prog|
00000c80  72 61 6d 20 90 4d 65 6d  53 6f 75 72 63 65 91 2e  |ram .MemSource..|
00000c90  0a 0a 49 74 20 73 68 6f  75 6c 64 20 62 65 20 6e  |..It should be n|
00000ca0  65 63 65 73 73 61 72 79  20 74 6f 20 63 6f 6e 76  |ecessary to conv|
00000cb0  65 72 74 20 74 68 65 20  75 74 69 6c 69 74 79 20  |ert the utility |
00000cc0  69 6e 74 6f 20 61 20 6d  6f 64 75 6c 65 2c 20 61  |into a module, a|
00000cd0  73 20 6d 65 6e 74 69 6f  6e 65 64 0a 77 69 74 68  |s mentioned.with|
00000ce0  69 6e 20 74 68 65 20 73  6f 75 72 63 65 20 63 6f  |in the source co|
00000cf0  64 65 2c 20 62 75 74 20  63 65 72 74 61 69 6e 20  |de, but certain |
00000d00  61 6c 74 65 72 61 74 69  6f 6e 73 20 77 6f 75 6c  |alterations woul|
00000d10  64 20 62 65 20 6e 65 63  65 73 73 61 72 79 2e 0a  |d be necessary..|
00000d20  0a 49 66 20 79 6f 75 20  6e 65 65 64 20 74 6f 20  |.If you need to |
00000d30  72 65 61 73 73 65 6d 62  6c 65 20 74 68 65 20 63  |reassemble the c|
00000d40  6f 64 65 2c 20 72 65 6d  65 6d 62 65 72 20 74 6f  |ode, remember to|
00000d50  20 63 68 61 6e 67 65 20  74 68 65 20 70 61 74 68  | change the path|
00000d60  20 6e 61 6d 65 73 20 69  6e 0a 6c 69 6e 65 73 20  | names in.lines |
00000d70  31 37 30 20 61 6e 64 20  31 38 30 2e 0a 0a 2e 63  |170 and 180....c|
00000d80  68 61 6e 67 65 20 69 73  20 74 68 65 20 73 75 62  |hange is the sub|
00000d90  72 6f 75 74 69 6e 65 20  75 73 65 64 20 74 6f 20  |routine used to |
00000da0  63 68 61 6e 67 65 20 74  68 65 20 73 69 7a 65 73  |change the sizes|
00000db0  2e 20 49 74 20 70 61 72  73 65 73 20 74 68 65 20  |. It parses the |
00000dc0  73 74 72 69 6e 67 0a 73  75 70 70 6c 69 65 64 20  |string.supplied |
00000dd0  66 6f 72 20 65 61 63 68  20 61 72 65 61 20 61 6e  |for each area an|
00000de0  64 20 74 61 6b 65 73 20  73 6c 69 67 68 74 6c 79  |d takes slightly|
00000df0  20 64 69 66 66 65 72 65  6e 74 20 61 63 74 69 6f  | different actio|
00000e00  6e 73 20 61 63 63 6f 72  64 69 6e 67 20 74 6f 20  |ns according to |
00000e10  74 68 65 0a 70 72 65 63  65 65 64 69 6e 67 20 63  |the.preceeding c|
00000e20  68 61 72 61 63 74 65 72  20 28 2d 2c 2b 20 6f 72  |haracter (-,+ or|
00000e30  20 3d 29 2e 0a 0a 54 68  65 20 6e 61 6d 65 73 20  | =)...The names |
00000e40  6f 66 20 74 68 65 20 64  79 6e 61 6d 69 63 20 61  |of the dynamic a|
00000e50  72 65 61 73 20 61 72 65  20 68 65 6c 64 20 69 6e  |reas are held in|
00000e60  20 74 68 65 20 66 6f 72  6d 20 6f 66 20 61 6e 20  | the form of an |
00000e70  90 4f 53 5f 50 72 65 74  74 79 50 72 69 6e 74 91  |.OS_PrettyPrint.|
00000e80  0a 64 69 63 74 69 6f 6e  61 72 79 2c 20 75 73 69  |.dictionary, usi|
00000e90  6e 67 20 90 46 4e 6e 61  6d 65 91 2e 0a 0a 49 6e  |ng .FNname....In|
00000ea0  20 6f 72 64 65 72 20 74  6f 20 64 69 73 70 6c 61  | order to displa|
00000eb0  79 20 74 68 65 20 6d 65  6d 6f 72 79 20 73 69 7a  |y the memory siz|
00000ec0  65 73 20 69 6e 74 65 6c  6c 69 67 65 6e 74 6c 79  |es intelligently|
00000ed0  2c 20 74 68 65 20 70 72  6f 67 72 61 6d 20 75 73  |, the program us|
00000ee0  65 73 0a 90 4f 53 5f 43  6f 6e 76 65 72 74 46 69  |es..OS_ConvertFi|
00000ef0  78 65 64 46 69 6c 65 53  69 7a 65 91 20 61 6e 64  |xedFileSize. and|
00000f00  20 64 6f 63 74 6f 72 73  20 74 68 65 20 6f 75 74  | doctors the out|
00000f10  70 75 74 20 73 6c 69 67  68 74 6c 79 2e 0a 0a 54  |put slightly...T|
00000f20  6f 20 64 69 73 70 6c 61  79 20 74 68 65 20 66 72  |o display the fr|
00000f30  65 65 20 73 70 61 63 65  20 69 6e 20 61 20 70 61  |ee space in a pa|
00000f40  72 74 69 63 75 6c 61 72  20 61 72 65 61 20 69 74  |rticular area it|
00000f50  20 69 73 20 6e 65 63 65  73 73 61 72 79 20 74 6f  | is necessary to|
00000f60  20 75 73 65 20 63 61 6c  6c 73 0a 69 6e 64 65 70  | use calls.indep|
00000f70  65 6e 74 20 74 6f 20 65  61 63 68 20 61 72 65 61  |ent to each area|
00000f80  2c 20 74 68 75 73 20 74  68 65 20 74 61 62 6c 65  |, thus the table|
00000f90  20 61 74 20 2e 74 61 62  6c 65 20 63 6f 6e 74 61  | at .table conta|
00000fa0  69 6e 73 20 74 68 65 20  6f 66 66 73 65 74 73 20  |ins the offsets |
00000fb0  6f 66 0a 72 6f 75 74 69  6e 65 73 20 74 6f 20 63  |of.routines to c|
00000fc0  61 6c 6c 20 77 68 69 63  68 20 72 65 74 75 72 6e  |all which return|
00000fd0  20 74 68 65 20 66 72 65  65 20 73 70 61 63 65 20  | the free space |
00000fe0  69 6e 20 52 30 20 61 6e  64 20 70 72 65 73 65 72  |in R0 and preser|
00000ff0  76 65 20 61 6c 6c 20 6f  74 68 65 72 0a 72 65 67  |ve all other.reg|
00001000  69 73 74 65 72 73 2e 20  49 66 20 74 68 65 20 6f  |isters. If the o|
00001010  66 66 73 65 74 20 69 73  20 7a 65 72 6f 2c 20 6e  |ffset is zero, n|
00001020  6f 20 66 72 65 65 20 73  70 61 63 65 20 69 73 20  |o free space is |
00001030  64 69 73 70 6c 61 79 65  64 2e 0a 0a 52 4d 41 20  |displayed...RMA |
00001040  66 72 65 65 20 73 70 61  63 65 3a 20 20 20 20 20  |free space:     |
00001050  90 4f 53 5f 4d 6f 64 75  6c 65 91 2c 20 64 65 73  |.OS_Module., des|
00001060  63 72 69 62 65 20 52 4d  41 0a 73 63 72 65 65 6e  |cribe RMA.screen|
00001070  20 66 72 65 65 20 73 70  61 63 65 3a 20 20 90 4f  | free space:  .O|
00001080  53 5f 43 6c 61 69 6d 53  63 72 65 65 6e 4d 65 6d  |S_ClaimScreenMem|
00001090  6f 72 79 91 2e 0a 73 70  72 69 74 65 20 61 72 65  |ory...sprite are|
000010a0  61 20 73 70 61 63 65 3a  20 20 90 4f 53 5f 53 70  |a space:  .OS_Sp|
000010b0  72 69 74 65 4f 70 91 2c  20 72 65 61 64 20 63 6f  |riteOp., read co|
000010c0  6e 74 72 6f 6c 20 61 72  65 61 0a 66 6f 6e 74 20  |ntrol area.font |
000010d0  63 61 63 68 65 20 73 70  61 63 65 3a 20 20 20 90  |cache space:   .|
000010e0  46 6f 6e 74 5f 43 61 63  68 65 41 64 64 72 91 0a  |Font_CacheAddr..|
000010f0  52 41 4d 46 53 20 66 72  65 65 20 73 70 61 63 65  |RAMFS free space|
00001100  3a 20 20 20 90 4f 53 5f  46 53 43 6f 6e 74 72 6f  |:   .OS_FSContro|
00001110  6c 91 20 34 39 0a 0a 54  68 65 20 66 72 65 65 20  |l. 49..The free |
00001120  61 70 70 6c 69 63 61 74  69 6f 6e 20 6d 65 6d 6f  |application memo|
00001130  72 79 20 69 73 20 72 65  61 64 20 77 69 74 68 20  |ry is read with |
00001140  90 4f 53 5f 47 65 74 45  6e 76 91 20 62 75 74 20  |.OS_GetEnv. but |
00001150  64 6f 65 73 20 6e 6f 74  20 69 6e 63 6c 75 64 65  |does not include|
00001160  20 74 68 65 0a 57 69 6d  70 20 66 72 65 65 20 70  | the.Wimp free p|
00001170  6f 6f 6c 2e 0a 0a 54 68  65 20 74 6f 74 61 6c 20  |ool...The total |
00001180  6d 65 6d 6f 72 79 20 69  73 20 66 6f 75 6e 64 20  |memory is found |
00001190  62 79 20 6d 75 6c 74 69  70 6c 79 69 6e 67 20 74  |by multiplying t|
000011a0  68 65 20 70 61 67 65 20  73 69 7a 65 20 77 69 74  |he page size wit|
000011b0  68 20 74 68 65 20 6e 75  6d 62 65 72 20 6f 66 0a  |h the number of.|
000011c0  70 61 67 65 73 20 28 90  4f 53 5f 52 65 61 64 4d  |pages (.OS_ReadM|
000011d0  65 6d 4d 61 70 49 6e 66  6f 91 29 0a 0a 0a 20 20  |emMapInfo.)...  |
000011e0  20 20 20 20 20 20 20 41  6e 64 72 65 77 20 42 6f  |       Andrew Bo|
000011f0  77 65 72 20 20 20 20 20  20 31 39 20 41 75 67 75  |wer      19 Augu|
00001200  73 74 20 31 39 39 34 0a  20 20 20 20 20 20 20 20  |st 1994.        |
00001210  20 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  | ===============|
00001220  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00001230  3d                                                |=|
00001231