Search the web
Sign In
New User? Sign Up
arexx · This list is devoted to the powerful Amiga scripting language, ARexx. Here ARexx coders can share ideas, routines and generall
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
how to start arexx script with DOpus5   Message List  
Reply | Forward Message #3687 of 3728 |
Re: ALLOCMEM()

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 ) - ------------ -./____/ - ------------'



Wed Apr 30, 2008 10:57 pm

stellanpistoor
Offline Offline
Send Email Send Email

Forward
Message #3687 of 3728 |
Expand Messages Author Sort by Date

Hi, here it never worked. I get always with all scripts: +++ Error 47 in line 1: Arithmetic conversion error I tried "RX {f}", "SYS:Rexxc/RX {f}" (AmigaDOS). ...
Stellan
stellanpistoor
Offline Send Email
Jan 4, 2007
9:32 am

Hello Stellan, ... I don't use DOpus 5 but DOpus 4 and suffer on the same problem some years ago. Seems to be a feature of the rx command which don't like...
Frank Weber
opionline
Offline Send Email
Jan 4, 2007
10:32 am

... Yep, it is the same wiht DOpus5. Thanks for the hint! It works. :-) Examples: With {o} and CD source (works): cd "DH1:Dev/ARexx/" stack 65536 rx...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
Jan 4, 2007
2:16 pm

Hello StellanInDerMailingliste@..., ... OK. [...] ... Yes of course. as i already wrote it's a feature of the rx command. :-) With quotes you can execute...
Frank Weber
opionline
Offline Send Email
Jan 4, 2007
7:12 pm

... Ok, forgot that feature but what about this?: assign ARexxScripte: Tools:Dev/ARexx/ 13. Tools:Dev/ARexx> rx "ARexxScripte:ASCII_Table.rexx" (works) Why...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
Jan 4, 2007
10:52 pm

Hello StellanInDerMailingliste@..., ... No i don't want to forget that feature because it's sometimes very handy. (BTW: take also look into your Arexx...
Frank Weber
opionline
Offline Send Email
Jan 4, 2007
11:43 pm

... I use that feature too but at that time my mind was blocked for that info. :D ... I meant compared to the second command line but no more interesting. ... ...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
Jan 5, 2007
11:11 am

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(): ...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
Apr 30, 2008
7:34 pm

Hello StellanInDerMailingliste@..., ... All are correct if you really wish a cleared memory. :-) ... See in System includes include/exec/memory.h Here is...
Frank Weber
opionline
Offline Send Email
Apr 30, 2008
8:30 pm

... 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...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
Apr 30, 2008
10:57 pm

Hello StellanInDerMailingliste@..., ... Hmm, then maybe you should learn something about the binary number system. 00 01 00 02 (hex) are 32 bits. in binary...
Frank Weber
opionline
Offline Send Email
May 1, 2008
7:32 am

... I know a bit about binary numbers system but never need to use them and I didn`t know what (1L<<1) does mean. As you said set bits is really easy. I`ll...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
May 1, 2008
11:36 am

Hoi, ... Sort of. The "<<" is the shift left operator. What 1L<<1 means is shift the bits of the value 1L (= 1 long) to the left by 1: 1L => 00000000...
Bernd Gollesch
bgollesch
Offline Send Email
May 1, 2008
12:29 pm

... I liked my explanation much more. ;D Thank you for the right one. ... Ok, 0L means 00000000 00000000 00000000 00000000 and shift makes no sense. ... Thanks...
StellanInDerMailingli...
stellanpistoor
Offline Send Email
May 1, 2008
4:32 pm

Hello StellanInDerMailingliste@..., ... I think you know it alreay but for correctness: Your explanation is only correct for the 1L initial Value. ... ...
Frank Weber
opionline
Offline Send Email
May 1, 2008
7:08 pm

Hello StellanInDerMailingliste@..., ... [...] ... The first 1 is the initial Value and the second 1 is the value how many times the initial Value should be...
Frank Weber
opionline
Offline Send Email
May 1, 2008
7:01 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help