Forum unknown
· Programming
ARP Lib
15 messages in this thread
Thank you for all your help with the bindings I have them working now. But
I have a question. I am working on my own library and I intend to use the
Arp library to do resource tracking in it. if one of the function of the
library allocates some memory will it be deallocated when the program
calling the library exits(assuming that it is useing arp) of when the
library is expureged. Also in you don't mynd me asking how do you tell what
task is requesting what resource in the arp lib? I am interested because I
want to do file and record locking in my library.
The resources are freed on a CloseLibrary() call, or ArpExit(), which closes
the library for you (but careful with this last one from HLL's).
I am not sure I understand your second question – do you mean how to free the
resources, or just how to identify the task?
Either way, I guess, it's similar, your library code runs in the context of
whatever task is calling it, so FindTask(0L) will return the task that is
requesting the resource.
Ditto with resource freeing, except then you have to munge through the
resource list, although this is a no-no I think for arplib users, you should
go through the function interface.
Glad you got the bindings working. sdb
That answers my question very well. I got the bindings to work for c and Modula but not for ASM the header ARPBase.i would not
assemble on ether of my assemblers. I use both Assempro and Gibbs shareware assembler. the both Choke on the Structure statement.
do you know a Macro that will work?
I thought the latest version of the Gibbs assembler handled stuff like
that. You might want to check out asm68k, I know that handles STRUCT just
fine, aside from that, the only thing I can tell you to do is add up the
offsets, and change them to equates.
MANX handles the arpbase.i file just fine also, I tend to use their
assembler a lot for assembly stuff, best overall one I have seen. If you
use the -l option, you can get a listing of equates for the header file.
STRUCT is a macro, not something an assembler normally handles. I got rid
of the horrible thing ages ago, compiling the includes to make an equate
file that I can actually read and understand. <smiiile>
All my assemblers handle macros, actually, larry?
I have to say, I think the STRUCT macro is a really nice touch on the part of
the amiga boys and girls, I wouldn't want to do without it, myself.
What I meant was that an assembler should not be expected to handle
STRUCT as a directive/op code. Of course it should handle it as a macro.
Personally, I like my Assembler without the C flavour. If I want the
flavour of C, there's plenty of it around for the tasting.
Oh I see. I have to say I think you are letting your dislike for C remove
a very useful addition to assembler programming on the amiga. I find it
much easier to edit something declared with a STRUCTURE macro, where all
the adjustments are made automagically, than to change a list of 20 or so
equates because I just inserted/ deleted or rearranged a bunch of offsets.
Less error prone too (for me, anyway).
Oh I see. I have to say I think you are letting your dislike for C remove
a very useful addition to assembler programming on the amiga. I find it
much easier to edit something declared with a STRUCTURE macro, where all
the adjustments are made automagically, than to change a list of 20 or so
equates because I just inserted/ deleted or rearranged a bunch of offsets.
Less error prone too (for me, anyway).
What I meant was that an assembler should not be expected to handle
STRUCT as a directive/op code. Of course it should handle it as a macro.
Personally, I like my Assembler without the C flavour. If I want the
flavour of C, there's plenty of it around for the tasting.
All my assemblers handle macros, actually, larry?
I have to say, I think the STRUCT macro is a really nice touch on the part of
the amiga boys and girls, I wouldn't want to do without it, myself.
STRUCT is a macro, not something an assembler normally handles. I got rid
of the horrible thing ages ago, compiling the includes to make an equate
file that I can actually read and understand. <smiiile>
I thought the latest version of the Gibbs assembler handled stuff like
that. You might want to check out asm68k, I know that handles STRUCT just
fine, aside from that, the only thing I can tell you to do is add up the
offsets, and change them to equates.
MANX handles the arpbase.i file just fine also, I tend to use their
assembler a lot for assembly stuff, best overall one I have seen. If you
use the -l option, you can get a listing of equates for the header file.
That answers my question very well. I got the bindings to work for c and Modula but not for ASM the header ARPBase.i would not
assemble on ether of my assemblers. I use both Assempro and Gibbs shareware assembler. the both Choke on the Structure statement.
do you know a Macro that will work?
The resources are freed on a CloseLibrary() call, or ArpExit(), which closes
the library for you (but careful with this last one from HLL's).
I am not sure I understand your second question – do you mean how to free the
resources, or just how to identify the task?
Either way, I guess, it's similar, your library code runs in the context of
whatever task is calling it, so FindTask(0L) will return the task that is
requesting the resource.
Ditto with resource freeing, except then you have to munge through the
resource list, although this is a no-no I think for arplib users, you should
go through the function interface.
Glad you got the bindings working. sdb