Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on June 29, 2005, 06:22:38 PM
-
I stumbled acrross that function when reading some examples on AmigaMail2. There's no reference to it in the DevCD2.1 function reference list. Can someone clarify what it does, it seems to copy a file handle or something ?
-
Isn't it a macro to convert a BCPL pointer to a C pointer (or vice versa, I don't recall) ?
BCPL pointers *shudder* They're just totally wrong.
Alternatively it might be a function to create a HaroldShipman object....
/hides
-
Look into dos/dos.h, it has BADDR and MKBADDR macros.
BADDR is used to convert BPTR to APTR (* 4).
MKBADDR is used to convert APTR to BTPR (/ 4).
-
Piru wrote:
BADDR is used to convert BPTR to APTR (* 4).
MKBADDR is used to convert APTR to BTPR (/ 4).
Like I said, wrong. Evil, infact, :lol:
-
Karlos wrote:
Like I said, wrong. Evil, infact, :lol:
Well, with a BPTR you could theoretically address up to 16 GB of memory as opposed to the 4GB of a usual C pointer. Of course the processor architecture has to support it.
Bye,
Thomas
-
@All
Yes!! :-D
-
Thomas wrote:
Karlos wrote:
Like I said, wrong. Evil, infact, :lol:
Well, with a BPTR you could theoretically address up to 16 GB of memory as opposed to the 4GB of a usual C pointer. Of course the processor architecture has to support it.
Bye,
Thomas
Well, first off there's nothing in C that says a pointer is 32 bits. This is a machine implementation. Secondly, the 68K has this particular 32-bit pointer implementation anyway, so the BPTR offers nothing. Lastly, I don't know of any common architectures that do perform this kind of n*sizeof(element) type addressing so in most cases, it's simply a total waste of cycles to store it in this fashion when at best you are going to have to shift it every time you want to dereference it ;-)
As I said. BCPL pointers are wrong, evil and they smell too :lol: