Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Features » PCA/Flexlib/ReadMe

PCA/Flexlib/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 1996-12 B.adf » Features
Filename: PCA/Flexlib/ReadMe
Read OK:
File size: 0604 bytes
Load address: 0000
Exec address: 0000
File contents
ReadMe.
=======

This version of flex is designed to work with Acorn's Toolbox.


It provides support for dynamic areas on the Risc Pc and allows a callback
function to be registered, which will be called when a flex block moves.
These changes were made by Andy Armstrong.

There is also support for the Virtualise module from Clares Micro Supplies.
This module provides virtual memory for applications which use dynamic areas
on the Risc PC. This support was added by David Jackson from Clares.

The main new call is.


flex_initx(char * filename,int *msg,BOOL da,int maxsize,BOOL virtual)

This initialises flex and replaces flex_init.

the call flex_initx("fred",&msg,FALSE,-1,FALSE) is equivalent to the old flex_init("fred",&msg)

the extra parameter 'da' controls whether a dynamic area is to be used if
available. If da is TRUE and you are not on a machine with dynamic areas,
flex operates exactly as the original version.

The  extra parameter maxsize determines the maximum size to which the
dynamic area can grow. It is important that you don't make this too big. You
should let the user configure this. The Risc Pc has a limited address space
(2Gb), and if several applications create areas which have a 256Mb maximum
size, you soon run out of address space.

The final  extra parameter determines whether virtual memory is active on
the area. If you create the area with VM off, you can activate virtual
memory with 

flex_virtualstart()




For details of the other calls, see flex.h and the Virtualise module
documentation.

00000000  52 65 61 64 4d 65 2e 0a  3d 3d 3d 3d 3d 3d 3d 0a  |ReadMe..=======.|
00000010  0a 54 68 69 73 20 76 65  72 73 69 6f 6e 20 6f 66  |.This version of|
00000020  20 66 6c 65 78 20 69 73  20 64 65 73 69 67 6e 65  | flex is designe|
00000030  64 20 74 6f 20 77 6f 72  6b 20 77 69 74 68 20 41  |d to work with A|
00000040  63 6f 72 6e 27 73 20 54  6f 6f 6c 62 6f 78 2e 0a  |corn's Toolbox..|
00000050  0a 0a 49 74 20 70 72 6f  76 69 64 65 73 20 73 75  |..It provides su|
00000060  70 70 6f 72 74 20 66 6f  72 20 64 79 6e 61 6d 69  |pport for dynami|
00000070  63 20 61 72 65 61 73 20  6f 6e 20 74 68 65 20 52  |c areas on the R|
00000080  69 73 63 20 50 63 20 61  6e 64 20 61 6c 6c 6f 77  |isc Pc and allow|
00000090  73 20 61 20 63 61 6c 6c  62 61 63 6b 0a 66 75 6e  |s a callback.fun|
000000a0  63 74 69 6f 6e 20 74 6f  20 62 65 20 72 65 67 69  |ction to be regi|
000000b0  73 74 65 72 65 64 2c 20  77 68 69 63 68 20 77 69  |stered, which wi|
000000c0  6c 6c 20 62 65 20 63 61  6c 6c 65 64 20 77 68 65  |ll be called whe|
000000d0  6e 20 61 20 66 6c 65 78  20 62 6c 6f 63 6b 20 6d  |n a flex block m|
000000e0  6f 76 65 73 2e 0a 54 68  65 73 65 20 63 68 61 6e  |oves..These chan|
000000f0  67 65 73 20 77 65 72 65  20 6d 61 64 65 20 62 79  |ges were made by|
00000100  20 41 6e 64 79 20 41 72  6d 73 74 72 6f 6e 67 2e  | Andy Armstrong.|
00000110  0a 0a 54 68 65 72 65 20  69 73 20 61 6c 73 6f 20  |..There is also |
00000120  73 75 70 70 6f 72 74 20  66 6f 72 20 74 68 65 20  |support for the |
00000130  56 69 72 74 75 61 6c 69  73 65 20 6d 6f 64 75 6c  |Virtualise modul|
00000140  65 20 66 72 6f 6d 20 43  6c 61 72 65 73 20 4d 69  |e from Clares Mi|
00000150  63 72 6f 20 53 75 70 70  6c 69 65 73 2e 0a 54 68  |cro Supplies..Th|
00000160  69 73 20 6d 6f 64 75 6c  65 20 70 72 6f 76 69 64  |is module provid|
00000170  65 73 20 76 69 72 74 75  61 6c 20 6d 65 6d 6f 72  |es virtual memor|
00000180  79 20 66 6f 72 20 61 70  70 6c 69 63 61 74 69 6f  |y for applicatio|
00000190  6e 73 20 77 68 69 63 68  20 75 73 65 20 64 79 6e  |ns which use dyn|
000001a0  61 6d 69 63 20 61 72 65  61 73 0a 6f 6e 20 74 68  |amic areas.on th|
000001b0  65 20 52 69 73 63 20 50  43 2e 20 54 68 69 73 20  |e Risc PC. This |
000001c0  73 75 70 70 6f 72 74 20  77 61 73 20 61 64 64 65  |support was adde|
000001d0  64 20 62 79 20 44 61 76  69 64 20 4a 61 63 6b 73  |d by David Jacks|
000001e0  6f 6e 20 66 72 6f 6d 20  43 6c 61 72 65 73 2e 0a  |on from Clares..|
000001f0  0a 54 68 65 20 6d 61 69  6e 20 6e 65 77 20 63 61  |.The main new ca|
00000200  6c 6c 20 69 73 2e 0a 0a  0a 66 6c 65 78 5f 69 6e  |ll is....flex_in|
00000210  69 74 78 28 63 68 61 72  20 2a 20 66 69 6c 65 6e  |itx(char * filen|
00000220  61 6d 65 2c 69 6e 74 20  2a 6d 73 67 2c 42 4f 4f  |ame,int *msg,BOO|
00000230  4c 20 64 61 2c 69 6e 74  20 6d 61 78 73 69 7a 65  |L da,int maxsize|
00000240  2c 42 4f 4f 4c 20 76 69  72 74 75 61 6c 29 0a 0a  |,BOOL virtual)..|
00000250  54 68 69 73 20 69 6e 69  74 69 61 6c 69 73 65 73  |This initialises|
00000260  20 66 6c 65 78 20 61 6e  64 20 72 65 70 6c 61 63  | flex and replac|
00000270  65 73 20 66 6c 65 78 5f  69 6e 69 74 2e 0a 0a 74  |es flex_init...t|
00000280  68 65 20 63 61 6c 6c 20  66 6c 65 78 5f 69 6e 69  |he call flex_ini|
00000290  74 78 28 22 66 72 65 64  22 2c 26 6d 73 67 2c 46  |tx("fred",&msg,F|
000002a0  41 4c 53 45 2c 2d 31 2c  46 41 4c 53 45 29 20 69  |ALSE,-1,FALSE) i|
000002b0  73 20 65 71 75 69 76 61  6c 65 6e 74 20 74 6f 20  |s equivalent to |
000002c0  74 68 65 20 6f 6c 64 20  66 6c 65 78 5f 69 6e 69  |the old flex_ini|
000002d0  74 28 22 66 72 65 64 22  2c 26 6d 73 67 29 0a 0a  |t("fred",&msg)..|
000002e0  74 68 65 20 65 78 74 72  61 20 70 61 72 61 6d 65  |the extra parame|
000002f0  74 65 72 20 27 64 61 27  20 63 6f 6e 74 72 6f 6c  |ter 'da' control|
00000300  73 20 77 68 65 74 68 65  72 20 61 20 64 79 6e 61  |s whether a dyna|
00000310  6d 69 63 20 61 72 65 61  20 69 73 20 74 6f 20 62  |mic area is to b|
00000320  65 20 75 73 65 64 20 69  66 0a 61 76 61 69 6c 61  |e used if.availa|
00000330  62 6c 65 2e 20 49 66 20  64 61 20 69 73 20 54 52  |ble. If da is TR|
00000340  55 45 20 61 6e 64 20 79  6f 75 20 61 72 65 20 6e  |UE and you are n|
00000350  6f 74 20 6f 6e 20 61 20  6d 61 63 68 69 6e 65 20  |ot on a machine |
00000360  77 69 74 68 20 64 79 6e  61 6d 69 63 20 61 72 65  |with dynamic are|
00000370  61 73 2c 0a 66 6c 65 78  20 6f 70 65 72 61 74 65  |as,.flex operate|
00000380  73 20 65 78 61 63 74 6c  79 20 61 73 20 74 68 65  |s exactly as the|
00000390  20 6f 72 69 67 69 6e 61  6c 20 76 65 72 73 69 6f  | original versio|
000003a0  6e 2e 0a 0a 54 68 65 20  20 65 78 74 72 61 20 70  |n...The  extra p|
000003b0  61 72 61 6d 65 74 65 72  20 6d 61 78 73 69 7a 65  |arameter maxsize|
000003c0  20 64 65 74 65 72 6d 69  6e 65 73 20 74 68 65 20  | determines the |
000003d0  6d 61 78 69 6d 75 6d 20  73 69 7a 65 20 74 6f 20  |maximum size to |
000003e0  77 68 69 63 68 20 74 68  65 0a 64 79 6e 61 6d 69  |which the.dynami|
000003f0  63 20 61 72 65 61 20 63  61 6e 20 67 72 6f 77 2e  |c area can grow.|
00000400  20 49 74 20 69 73 20 69  6d 70 6f 72 74 61 6e 74  | It is important|
00000410  20 74 68 61 74 20 79 6f  75 20 64 6f 6e 27 74 20  | that you don't |
00000420  6d 61 6b 65 20 74 68 69  73 20 74 6f 6f 20 62 69  |make this too bi|
00000430  67 2e 20 59 6f 75 0a 73  68 6f 75 6c 64 20 6c 65  |g. You.should le|
00000440  74 20 74 68 65 20 75 73  65 72 20 63 6f 6e 66 69  |t the user confi|
00000450  67 75 72 65 20 74 68 69  73 2e 20 54 68 65 20 52  |gure this. The R|
00000460  69 73 63 20 50 63 20 68  61 73 20 61 20 6c 69 6d  |isc Pc has a lim|
00000470  69 74 65 64 20 61 64 64  72 65 73 73 20 73 70 61  |ited address spa|
00000480  63 65 0a 28 32 47 62 29  2c 20 61 6e 64 20 69 66  |ce.(2Gb), and if|
00000490  20 73 65 76 65 72 61 6c  20 61 70 70 6c 69 63 61  | several applica|
000004a0  74 69 6f 6e 73 20 63 72  65 61 74 65 20 61 72 65  |tions create are|
000004b0  61 73 20 77 68 69 63 68  20 68 61 76 65 20 61 20  |as which have a |
000004c0  32 35 36 4d 62 20 6d 61  78 69 6d 75 6d 0a 73 69  |256Mb maximum.si|
000004d0  7a 65 2c 20 79 6f 75 20  73 6f 6f 6e 20 72 75 6e  |ze, you soon run|
000004e0  20 6f 75 74 20 6f 66 20  61 64 64 72 65 73 73 20  | out of address |
000004f0  73 70 61 63 65 2e 0a 0a  54 68 65 20 66 69 6e 61  |space...The fina|
00000500  6c 20 20 65 78 74 72 61  20 70 61 72 61 6d 65 74  |l  extra paramet|
00000510  65 72 20 64 65 74 65 72  6d 69 6e 65 73 20 77 68  |er determines wh|
00000520  65 74 68 65 72 20 76 69  72 74 75 61 6c 20 6d 65  |ether virtual me|
00000530  6d 6f 72 79 20 69 73 20  61 63 74 69 76 65 20 6f  |mory is active o|
00000540  6e 0a 74 68 65 20 61 72  65 61 2e 20 49 66 20 79  |n.the area. If y|
00000550  6f 75 20 63 72 65 61 74  65 20 74 68 65 20 61 72  |ou create the ar|
00000560  65 61 20 77 69 74 68 20  56 4d 20 6f 66 66 2c 20  |ea with VM off, |
00000570  79 6f 75 20 63 61 6e 20  61 63 74 69 76 61 74 65  |you can activate|
00000580  20 76 69 72 74 75 61 6c  0a 6d 65 6d 6f 72 79 20  | virtual.memory |
00000590  77 69 74 68 20 0a 0a 66  6c 65 78 5f 76 69 72 74  |with ..flex_virt|
000005a0  75 61 6c 73 74 61 72 74  28 29 0a 0a 0a 0a 0a 46  |ualstart().....F|
000005b0  6f 72 20 64 65 74 61 69  6c 73 20 6f 66 20 74 68  |or details of th|
000005c0  65 20 6f 74 68 65 72 20  63 61 6c 6c 73 2c 20 73  |e other calls, s|
000005d0  65 65 20 66 6c 65 78 2e  68 20 61 6e 64 20 74 68  |ee flex.h and th|
000005e0  65 20 56 69 72 74 75 61  6c 69 73 65 20 6d 6f 64  |e Virtualise mod|
000005f0  75 6c 65 0a 64 6f 63 75  6d 65 6e 74 61 74 69 6f  |ule.documentatio|
00000600  6e 2e 0a 0a                                       |n...|
00000604