Home » Archimedes archive » Acorn Computing » 1994 08 subscription disc.adf » 9408s » Shareware/Event/Documents/!EShellDoc/TextHelp/Memory
Shareware/Event/Documents/!EShellDoc/TextHelp/Memory
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 Computing » 1994 08 subscription disc.adf » 9408s |
Filename: | Shareware/Event/Documents/!EShellDoc/TextHelp/Memory |
Read OK: | ✔ |
File size: | 0849 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn Computing » 1994 08 subscription disc.adf » 9408s » Shareware/Event/Documents/!EShellDoc/TextHelp/Memory
- Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 » !AWJan95/Goodies/Event/Docs/Memory
File contents
PROCshell_HeapBlockReturn() Params => int address of heap block Releases the given heap block, returning memory to the free pool. -------------------------------------------------------- PROCshell_HeapBlockInit() Params => None -------------------------------------------------------- FNshell_HeapBlockExtend() Params => int address of heap block int amount to increase or decrease block size by (-ve to decrease) <= int address of heap block Increases or decreases the size of the given heap block which must have been allocated with FNshell_HeapBlockFetch. Note that the heap block may be moved to make it fit so you should always use the returned value for the heap block address after this call. -------------------------------------------------------- FNshell_HeapBlockFetch() Params => int size of block to fetch from heap <= int address of heapblock allocated Returns address of heapblock or causes an "Out of memory" error if the block cannot be allocated. -------------------------------------------------------- FNshell_HeapBlockInfo() Params => int address of heap block <= int size of heap block (Note that this is 4 bytes larger than the size requested with FNshell_HeapBlockFetch) -------------------------------------------------------- PROCshell_HeapManagerInit Params => str path to directory containing the 'heapcode' file int address of heap manager workspace This routine must be called before PROCshell_Init. -------------------------------------------------------- FNshell_HeapBlockExists() Params => int address to check <= bool TRUE or FALSE This routine returns TRUE if a heapblock is present at the specified address, FALSE otherwise. -------------------------------------------------------- PROCshell_MemFill() Params => int start address int number of bytes int byte value to fill with --------------------------------------------------------
00000000 50 52 4f 43 73 68 65 6c 6c 5f 48 65 61 70 42 6c |PROCshell_HeapBl| 00000010 6f 63 6b 52 65 74 75 72 6e 28 29 0a 50 61 72 61 |ockReturn().Para| 00000020 6d 73 20 3d 3e 20 20 0a 20 20 20 20 20 20 20 20 |ms => . | 00000030 20 69 6e 74 20 61 64 64 72 65 73 73 20 6f 66 20 | int address of | 00000040 68 65 61 70 20 62 6c 6f 63 6b 0a 0a 52 65 6c 65 |heap block..Rele| 00000050 61 73 65 73 20 74 68 65 20 67 69 76 65 6e 20 68 |ases the given h| 00000060 65 61 70 20 62 6c 6f 63 6b 2c 20 72 65 74 75 72 |eap block, retur| 00000070 6e 69 6e 67 20 6d 65 6d 6f 72 79 20 74 6f 0a 74 |ning memory to.t| 00000080 68 65 20 66 72 65 65 20 70 6f 6f 6c 2e 0a 0a 2d |he free pool...-| 00000090 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000000c0 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 |-------..PROCshe| 000000d0 6c 6c 5f 48 65 61 70 42 6c 6f 63 6b 49 6e 69 74 |ll_HeapBlockInit| 000000e0 28 29 0a 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 |().Params =>. | 000000f0 20 20 20 20 20 20 4e 6f 6e 65 0a 0a 2d 2d 2d 2d | None..----| 00000100 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000130 2d 2d 2d 2d 0a 0a 46 4e 73 68 65 6c 6c 5f 48 65 |----..FNshell_He| 00000140 61 70 42 6c 6f 63 6b 45 78 74 65 6e 64 28 29 0a |apBlockExtend().| 00000150 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 |Params =>. | 00000160 20 20 20 69 6e 74 20 61 64 64 72 65 73 73 20 6f | int address o| 00000170 66 20 68 65 61 70 20 62 6c 6f 63 6b 0a 20 20 20 |f heap block. | 00000180 20 20 20 20 20 20 69 6e 74 20 61 6d 6f 75 6e 74 | int amount| 00000190 20 74 6f 20 69 6e 63 72 65 61 73 65 20 6f 72 20 | to increase or | 000001a0 64 65 63 72 65 61 73 65 20 62 6c 6f 63 6b 20 73 |decrease block s| 000001b0 69 7a 65 20 62 79 0a 20 20 20 20 20 20 20 20 20 |ize by. | 000001c0 20 20 20 20 28 2d 76 65 20 74 6f 20 64 65 63 72 | (-ve to decr| 000001d0 65 61 73 65 29 0a 0a 20 20 20 20 20 20 20 3c 3d |ease).. <=| 000001e0 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 61 64 |. int ad| 000001f0 64 72 65 73 73 20 6f 66 20 68 65 61 70 20 62 6c |dress of heap bl| 00000200 6f 63 6b 0a 0a 49 6e 63 72 65 61 73 65 73 20 6f |ock..Increases o| 00000210 72 20 64 65 63 72 65 61 73 65 73 20 74 68 65 20 |r decreases the | 00000220 73 69 7a 65 20 6f 66 20 74 68 65 20 67 69 76 65 |size of the give| 00000230 6e 20 68 65 61 70 20 62 6c 6f 63 6b 0a 77 68 69 |n heap block.whi| 00000240 63 68 20 6d 75 73 74 20 68 61 76 65 20 62 65 65 |ch must have bee| 00000250 6e 20 61 6c 6c 6f 63 61 74 65 64 20 77 69 74 68 |n allocated with| 00000260 20 46 4e 73 68 65 6c 6c 5f 48 65 61 70 42 6c 6f | FNshell_HeapBlo| 00000270 63 6b 46 65 74 63 68 2e 0a 4e 6f 74 65 20 74 68 |ckFetch..Note th| 00000280 61 74 20 74 68 65 20 68 65 61 70 20 62 6c 6f 63 |at the heap bloc| 00000290 6b 20 6d 61 79 20 62 65 20 6d 6f 76 65 64 20 74 |k may be moved t| 000002a0 6f 20 6d 61 6b 65 20 69 74 20 66 69 74 20 73 6f |o make it fit so| 000002b0 20 79 6f 75 0a 73 68 6f 75 6c 64 20 61 6c 77 61 | you.should alwa| 000002c0 79 73 20 75 73 65 20 74 68 65 20 72 65 74 75 72 |ys use the retur| 000002d0 6e 65 64 20 76 61 6c 75 65 20 66 6f 72 20 74 68 |ned value for th| 000002e0 65 20 68 65 61 70 20 62 6c 6f 63 6b 0a 61 64 64 |e heap block.add| 000002f0 72 65 73 73 20 61 66 74 65 72 20 74 68 69 73 20 |ress after this | 00000300 63 61 6c 6c 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d |call...---------| 00000310 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000330 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |---------------.| 00000340 0a 46 4e 73 68 65 6c 6c 5f 48 65 61 70 42 6c 6f |.FNshell_HeapBlo| 00000350 63 6b 46 65 74 63 68 28 29 0a 50 61 72 61 6d 73 |ckFetch().Params| 00000360 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | =>. int| 00000370 20 73 69 7a 65 20 6f 66 20 62 6c 6f 63 6b 20 74 | size of block t| 00000380 6f 20 66 65 74 63 68 20 66 72 6f 6d 20 68 65 61 |o fetch from hea| 00000390 70 0a 0a 20 20 20 20 20 20 20 3c 3d 0a 20 20 20 |p.. <=. | 000003a0 20 20 20 20 20 20 69 6e 74 20 61 64 64 72 65 73 | int addres| 000003b0 73 20 6f 66 20 68 65 61 70 62 6c 6f 63 6b 20 61 |s of heapblock a| 000003c0 6c 6c 6f 63 61 74 65 64 0a 0a 52 65 74 75 72 6e |llocated..Return| 000003d0 73 20 61 64 64 72 65 73 73 20 6f 66 20 68 65 61 |s address of hea| 000003e0 70 62 6c 6f 63 6b 20 6f 72 20 63 61 75 73 65 73 |pblock or causes| 000003f0 20 61 6e 20 22 4f 75 74 0a 6f 66 20 6d 65 6d 6f | an "Out.of memo| 00000400 72 79 22 20 65 72 72 6f 72 20 69 66 20 74 68 65 |ry" error if the| 00000410 20 62 6c 6f 63 6b 20 63 61 6e 6e 6f 74 20 62 65 | block cannot be| 00000420 0a 61 6c 6c 6f 63 61 74 65 64 2e 0a 0a 2d 2d 2d |.allocated...---| 00000430 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000460 2d 2d 2d 2d 2d 0a 0a 46 4e 73 68 65 6c 6c 5f 48 |-----..FNshell_H| 00000470 65 61 70 42 6c 6f 63 6b 49 6e 66 6f 28 29 0a 50 |eapBlockInfo().P| 00000480 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 |arams =>. | 00000490 20 20 69 6e 74 20 61 64 64 72 65 73 73 20 6f 66 | int address of| 000004a0 20 68 65 61 70 20 62 6c 6f 63 6b 0a 0a 20 20 20 | heap block.. | 000004b0 20 20 20 20 3c 3d 0a 20 20 20 20 20 20 20 20 20 | <=. | 000004c0 69 6e 74 20 73 69 7a 65 20 6f 66 20 68 65 61 70 |int size of heap| 000004d0 20 62 6c 6f 63 6b 20 28 4e 6f 74 65 20 74 68 61 | block (Note tha| 000004e0 74 20 74 68 69 73 0a 20 20 20 20 20 20 20 20 20 |t this. | 000004f0 20 20 20 20 69 73 20 34 20 62 79 74 65 73 20 6c | is 4 bytes l| 00000500 61 72 67 65 72 20 74 68 61 6e 20 74 68 65 20 73 |arger than the s| 00000510 69 7a 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 |ize. | 00000520 20 72 65 71 75 65 73 74 65 64 20 77 69 74 68 20 | requested with | 00000530 46 4e 73 68 65 6c 6c 5f 48 65 61 70 42 6c 6f 63 |FNshell_HeapBloc| 00000540 6b 46 65 74 63 68 29 0a 0a 2d 2d 2d 2d 2d 2d 2d |kFetch)..-------| 00000550 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000580 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 48 65 61 |-..PROCshell_Hea| 00000590 70 4d 61 6e 61 67 65 72 49 6e 69 74 0a 50 61 72 |pManagerInit.Par| 000005a0 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 |ams =>. | 000005b0 73 74 72 20 70 61 74 68 20 74 6f 20 64 69 72 65 |str path to dire| 000005c0 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 |ctory containing| 000005d0 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 | the. | 000005e0 20 20 27 68 65 61 70 63 6f 64 65 27 20 66 69 6c | 'heapcode' fil| 000005f0 65 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 61 |e. int a| 00000600 64 64 72 65 73 73 20 6f 66 20 68 65 61 70 20 6d |ddress of heap m| 00000610 61 6e 61 67 65 72 20 77 6f 72 6b 73 70 61 63 65 |anager workspace| 00000620 0a 0a 54 68 69 73 20 72 6f 75 74 69 6e 65 20 6d |..This routine m| 00000630 75 73 74 20 62 65 20 63 61 6c 6c 65 64 20 62 65 |ust be called be| 00000640 66 6f 72 65 20 50 52 4f 43 73 68 65 6c 6c 5f 49 |fore PROCshell_I| 00000650 6e 69 74 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |nit...----------| 00000660 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000680 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a |--------------..| 00000690 46 4e 73 68 65 6c 6c 5f 48 65 61 70 42 6c 6f 63 |FNshell_HeapBloc| 000006a0 6b 45 78 69 73 74 73 28 29 0a 50 61 72 61 6d 73 |kExists().Params| 000006b0 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | =>. int| 000006c0 20 20 61 64 64 72 65 73 73 20 74 6f 20 63 68 65 | address to che| 000006d0 63 6b 0a 0a 20 20 20 20 20 20 20 3c 3d 0a 20 20 |ck.. <=. | 000006e0 20 20 20 20 20 20 20 62 6f 6f 6c 20 54 52 55 45 | bool TRUE| 000006f0 20 6f 72 20 46 41 4c 53 45 0a 0a 54 68 69 73 20 | or FALSE..This | 00000700 72 6f 75 74 69 6e 65 20 72 65 74 75 72 6e 73 20 |routine returns | 00000710 54 52 55 45 20 69 66 20 61 20 68 65 61 70 62 6c |TRUE if a heapbl| 00000720 6f 63 6b 20 69 73 20 70 72 65 73 65 6e 74 0a 61 |ock is present.a| 00000730 74 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 |t the specified | 00000740 61 64 64 72 65 73 73 2c 20 46 41 4c 53 45 20 6f |address, FALSE o| 00000750 74 68 65 72 77 69 73 65 2e 0a 0a 2d 2d 2d 2d 2d |therwise...-----| 00000760 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000790 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 4d |---..PROCshell_M| 000007a0 65 6d 46 69 6c 6c 28 29 0a 50 61 72 61 6d 73 20 |emFill().Params | 000007b0 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 |=>. int | 000007c0 73 74 61 72 74 20 61 64 64 72 65 73 73 0a 20 20 |start address. | 000007d0 20 20 20 20 20 20 20 69 6e 74 20 6e 75 6d 62 65 | int numbe| 000007e0 72 20 6f 66 20 62 79 74 65 73 0a 20 20 20 20 20 |r of bytes. | 000007f0 20 20 20 20 69 6e 74 20 62 79 74 65 20 76 61 6c | int byte val| 00000800 75 65 20 74 6f 20 66 69 6c 6c 20 77 69 74 68 0a |ue to fill with.| 00000810 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.---------------| 00000820 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000840 2d 2d 2d 2d 2d 2d 2d 2d 2d |---------| 00000849