Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!purdue!mailrus!ulowell!cbmvax!adam From: adam@cbmvax.UUCP (Adam Levin - CATS) Newsgroups: comp.sys.amiga.tech Subject: Re: Timer device blues Summary: Need a reply port. Message-ID: <7238@cbmvax.UUCP> Date: 7 Jul 89 16:25:13 GMT References: <738@orbit.UUCP> Reply-To: adam@cbmvax.UUCP (Adam Levin - CATS) Organization: Commodore Technology, West Chester, PA Lines: 27 In article <738@orbit.UUCP> glamdrng@pnet51.cts.com (Rocky Lhotka) writes: >I am having some problems getting the timer device to work... Specifically, I >can do a GETSYSTIME with no problem, but an ADDREQUEST always locks up the >computer... I have tried several examples from several books and none of them >work either (are they all THAT bad???). Here is my latest attempt, where the >GETSYSTIME works, but it locks up on the second DoIO when I try to perform an >ADDREQUEST. Any help would be VERY VERY appreciated!! > (code deleted) Your example program neglected to create a reply port. Read the large listing in the RKM just following the one you based your code on. Your program will get control back after the TR_ADDREQUEST is satisfied once there is a reply port available. In the very simplest case, change the line that reads: msgblock.mn_ReplyPort = NULL; to: msgblock.mn_ReplyPort = (struct ReplyPort *)CreatePort(0,0); It is good programming practice to check that the port was actually created. -- Adam Keith Levin -- CATS Commodore-Amiga Technical Support 1200 Wilson Drive / West Chester, PA 19380 (215) 431-9180 BIX: aklevin UUCP: ...{amiga|rutgers|uunet}!cbmvax!adam