CompuServe Thread

#What is with Lock()?

5 messages in this thread
#88342From: David OldisFeb 3, 1990 4:26 AM
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
#88375From: Ed CruseFeb 3, 1990 1:05 PM
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
#88407From: David OldisFeb 3, 1990 3:30 PM
Ed… Thanks alot….now I only have 10,050 questions left <g>. David
#88377From: Bill HawesFeb 3, 1990 1:15 PM
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
#88402From: David OldisFeb 3, 1990 3:27 PM
ALRIGHT!!!!….thanks Bill. David