Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!pvh From: pvh@Apple.COM (Pete Helme) Newsgroups: comp.sys.mac.programmer Subject: Re: "TN.248.DAs in Need of Time" in need of proofreader. Keywords: Sloppy, careless, wrong. Message-ID: <34579@apple.Apple.COM> Date: 8 Sep 89 04:03:23 GMT References: <15462@dartvax.Dartmouth.EDU> Organization: Apple Computer Inc., Cupertino, CA Lines: 64 Ahem. "Oops." The BitSet, BitClr stuff is definitely wrong. I originally had 7 - dNeedTime in there. Someone else thought it should be changed in the tech note review (yes, there is a 'proofreading'. In this case it did everything but help, which is rare). Stick with your your first draft on occasion I guess. Unfortunately for me, I used THINK C (not MPW C) to test the statement: dce->dCtlFlags ^= dNeedTime; dce->dCtlFlags |= dNeedTime; which THINK C compiles to: BCHG #5,4(A0) BSET #5,4(A0) BSET #5,4(A0) is OK for what we want since it's the high byte we're changing, but it's not correctly compiled as far as the operators are concerned. THINK C actually included stuff like dce->dCtlFlags |= dNeedTime in their old samples I believe. That's why I probably left it that way. BCHG 5,4(A0) is just plain wrong. A pox on me and my 4 slice toaster. FYI, THINK C compiled the following lines: dce->dCtlFlags &= ~(1 << (dNeedTime + 8)); dce->dCtlFlags |= (1 << (dNeedTime + 8)); to: BCLR #0,4(A0) BSET #0,4(A0) Huh? where as MPW C compiles to: ANDI #$DFFF,4(A0) ORI #$2000,4(A0) Which is correct. Anyone from Symantec care to comment? As for dNeedTime not being included in the MPW interfaces, it's true, but it is defined in the THINK interfaces. Why it isn't in MPW I don't know, but I'll see if I can get it (and the rest of device constants) put in for the next MPW release. I guess I just assumed that people could type in constants themselves. Guess I jumped to conclusions.... ;-) The tech note will be fixed for the October batch. All my C testing will be in MPW from now on that's for sure. Thanks for your comments. Always appreciated. Pete Helme "Whose every opinion was previously owned" MacDTS Apple Computer, Inc.