Article View: comp.sys.amiga.tech
Article #11798Re: ARRGGGHHHHHHHHHHHH!!!! BCPL!!!!!!
From: Dave Haynie
Date: Tue, 14 Mar 1989 17:33
Date: Tue, 14 Mar 1989 17:33
42 lines
2118 bytes
2118 bytes
in article <13291@gryphon.COM>, ddave@pnet02.cts.com (David Donley) says:
> HELP! I am trying to write a mountlist writing program. Could somebody
> please tell me
> 1. How can you tell if a BSTR or BPTR is NULL?
Well, start with the BPTR. Based on the definition:
BPTR = CPTR >> 2;
One would expect a BPTR NULL to be 0>>2, which magically turns out to be
the same as the CPTR NULL. Imagine that.
A BCPL string (once de-referenced, of course) is empty is the first byte
is 0. You may also note that again, in this one case, that's the same
way you tell if a C string is empty. Of course, before de-referencing a
BCPL string pointer, you'll have to check that it's non-NULL, and probably
shift it's pointer into a CPTR, as most BCPL strings are pointed to by
BPTRs.
> 2. What has changed in the FileSysStartupMsg, DeviceNode, and fssm_Environ
> since 1.2?
The only thing I know of is that the environment is longer. The first longword
of the environment tells you it's length. Under 1.2, DE_MEMBUFTYPE is the
last word of the environment. Under 1.3, you can also have the following
environment vector members (in order):
ULONG DE_MAXTRANSFER The maximum number of bytes to transfer
at a time.
ULONG DE_MASK Address mask used to block out certain
areas of memory.
LONG DE_BOOTPRI Autoboot priority.
ULONG DE_DOSTYPE Indicates the file system, SFS = 'DOS\0',
FFS = 'DOS\1'
> ddave@pnet02.CTS.COM ddave@pnet.gryphon.COM killer!gryphon!pnet02!ddave
--
Dave Haynie "The 32 Bit Guy" Commodore-Amiga "The Crew That Never Rests"
{uunet|pyramid|rutgers}!cbmvax!daveh PLINK: D-DAVE H BIX: hazy
Amiga -- It's not just a job, it's an obsession
Technical Details
Message-ID:
<6251@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!cbmvax!davehReferences:
<13291@gryphon.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga.tech Subject: Re: ARRGGGHHHHHHHHHHHH!!!! BCPL!!!!!! Message-ID: <6251@cbmvax.UUCP> Date: 14 Mar 89 17:33:44 GMT References: <13291@gryphon.COM> Organization: Commodore Technology, West Chester, PA Lines: 42