#What is with Lock()?
5 messages in this thread
Ello again…
Well I'm back with a *brand* new question (yeah!)…
I think one of the reasons of why Info() is giving me garbage for the
Volume of the Disk, or better yet, why it looks like garbage to me is cuz'
it doesn't point to a direct memory location of where the volume is stored
but perhaps as a displacement of where is it located from some type of
fixed base. What Info() is saying the Volume of the Disk is is $00310035,
and THAT cannot be the absolute address of the VolNode, so it must be added
to something, which I don't know. It seems that it might be just like a
Lock(), which when it returns, gives Register 'd0' garbage. So heres the
BIG question <drum roll>…..
What gets added to the value from the Lock() function so that it points to
a real memory location, cuz' $003100bd IS NOT a valid memory loc, but m
more of a displacement.
Thanks (and begin <smile>…)
David
Lock() returns a long word pointer, you have to multiply it by 4 to get a
real address. Most of Dos works this way. Ed
Ed…
Thanks alot….now I only have 10,050 questions left <g>.
David
David,
Locks, Volume Nodes, and indeed most AmiaDOS structures are specified by
BPTRs, which are ordinary addresses divided by 4. To convert a BPTR to a
real address you need to multiply it by 4 (shifting left by 2 is the usual
method). After this you'll have the address of a real data structure.
-Bill
ALRIGHT!!!!….thanks Bill.
David