Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!MAC.ROMOS@applelink.apple.com From: MAC.ROMOS@applelink.apple.com (Eric Ulevik) Newsgroups: comp.sys.mac.programmer Subject: Re: Extended Keyboard lights Message-ID: <1071@internal.Apple.COM> Date: 28 Mar 89 00:19:52 GMT References: <4Y=dhMy00WB_0A11Bk@andrew.cmu.edu> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 30 In article <4Y=dhMy00WB_0A11Bk@andrew.cmu.edu> nf0i+@andrew.cmu.edu (Norman William Franke, III) writes: > I am trying to write a program to turn on the "num lock" & "scroll lock" > lights on the ADB Extended keyboard. The bits to turn the lights on and off are the low 3 bits of register 2. You should 'talk r2' to get the value of register 2, change the low 3 bits to what you desire, and finally 'listen r2' to set the value of register 2. > procedure nothing; > begin > end; > > begin > [...] > err := ADBOp(@datastr, @nothing, @buffer, command); > writeln(ord(buffer[1]), ord(buffer[2])); > end. ADB will call 'nothing' when the command completes. This may happen after ADBOp() returns. In your case, it may happen after the program has completed - when the procedure is no longer there. You should pass 'nil' as a completion routine pointer if you want nothing to happen. This information is in Macintosh Technical Note #206. Eric Ulevik email: MAC.ROMOS@applelink.apple.com -- These writings are mine, not Apple's. That's the way I like it. --