CompuServe Thread

#void UnLock(lock)? Bah!

3 messages in this thread
#114From: Don Curtis/SYSOPSep 7, 1990 10:22 PM
Tom, I know others have told you why, I'll just add that the fact that d0-d1/a0-a1 may be trashed after a system call is documented. Don
#119From: Thomas HoladaySep 7, 1990 11:24 PM
The AmigaDOS manual doesn't say anything about trashing registers. The good ol' HP-41C PPC Standard required functions that put garbage into a register to say "x,y,z : garbage." The RKM says d0-d1/a0-a1 are scratch, but it also says to see the AmigaDOS manual for anything to do with dos.library and in general treats the MetaComCo contribution as ew-gross-icky, and all because of BCPL. THol() { cout << "Sir, I exist." ;}
#124From: Don Curtis/SYSOPSep 8, 1990 2:52 AM
Tom, The quote is: "Except as noted, system library functions use registers d0,d1,a0 and a1 as scratch registers and you MUST consider their former contents to be LOST after a system library call. The contents of other registers will be preserved. System functions which provide a result return the result in d0." (empahsis by me) I'd say that's pretty definate. The AmigaDOS manual (the 2 older versions I have) make no mention of what's going on in d0 during an unlock() call. The simply say that the lock has to be passed in d1. Since there is no return from unlock()…then the contents of d0 must (based on the above quote) be considered lost. Or that's the way I read it. Don