On 30.04.08 Frank Weber wrote:
> Hello StellanInDerMailingliste@...,
> on 30.04.2008 you wrote:
>> Hi!
>>
>> More then a year is gone since last action here. So I`ll break the
>> silence with a question related to rexxsupport.library function
>> ALLOCMEM():
>>
>> ALLOCMEM(<length>, [<attribute>])
>>
>> <attribute> may be any of the standard flags used with the Exec AllocMem
>> function, but must be supplied as a four-byte string. The default is
>> public (MEMF_PUBLIC).
>>
>> I read in the Amiga ARexx book that the standart attribute for public mem
>> is 1. For other attributes and mem types they refer to the Amiga RKRM. I
>> found different mem types but no attributes in 4-byte character string
>> form.
>>
>> '00 01 00 01'x = Public-RAM (the one and only example from Amiga ARexx
>> book) '00 01 00 02'x = Chip-RAM (I think so after try & error method)
>> '00 01 00 04'x = Fast-RAM ???
> All are correct if you really wish a cleared memory. :-)
>> What about the other mem types. Which attributes?
> See in System includes include/exec/memory.h
> Here is the interesting part of this file:
> /*----- Memory Requirement Types ---------------------------*/
> /*----- See the AllocMem() documentation for details--------*/
> #define MEMF_ANY (0L) /* Any type of memory will do */
> #define MEMF_PUBLIC (1L<<0)
> #define MEMF_CHIP (1L<<1)
> #define MEMF_FAST (1L<<2)
> #define MEMF_LOCAL (1L<<8) /* Memory that does not go away at RESET */
> #define MEMF_24BITDMA (1L<<9) /* DMAable memory within 24 bits of address
> */ #define MEMF_KICK (1L<<10) /* Memory that can be used for KickTags
> */
> #define MEMF_CLEAR (1L<<16) /* AllocMem: NULL out area before return */
> #define MEMF_LARGEST (1L<<17) /* AvailMem: return the largest chunk size
> */ #define MEMF_REVERSE (1L<<18) /* AllocMem: allocate from the top down
> */ #define MEMF_TOTAL (1L<<19) /* AvailMem: return total size of memory
> */
> #define MEMF_NO_EXPUNGE (1L<<31) /*AllocMem: Do not cause expunge on
> failure */
> e.g. 1L<<1 means the 1 Bit is set
> same goes for the oher values.
I don`t understand that. How can I translate the attributes? E.g.:
#define MEMF_PUBLIC (1L<<0) = '00 01 00 01'x
#define MEMF_CHIP (1L<<1) = '00 01 00 02'x
???
[...]
Regards
--
_____ _____ ______ ___ _____ _____ ______ ________
_\ _/___\ /__ __\_ / /___\ /___\ /____\_ /_\__ /
.-/ \ / / /_ / /_ / /_ / /_ \ / / (/___/-.
|/________________\_______\__\____\__\____\___/ ___________\.vK |
`- ( www.moodsplateau.net ) - ------------ -./____/ - ------------'