From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,13eba15960dc40bc X-Google-Attributes: gid1164f8,public From: ivie@cc.usu.edu (Roger Ivie) Subject: Re: Microsecond clock on VAX Date: 1995/11/08 Message-ID: <1995Nov8.102138.66293@cc.usu.edu>#1/1 X-Deja-AN: 119000516 references: <30A056AA.2492@worldnet.sct.fr> organization: Utah State University newsgroups: comp.sys.dec In article <30A056AA.2492@worldnet.sct.fr>, Ricardo Constantino writes: > I have heard that it is possible to obtain the internal state of > a microsecond clock on VAX machines. > The standard (and documented) GETJPI and GETTIM services use the > synchronized 10ms VAX clock. I need an unsynchronized clock > to perform some precise CPU performance measurements. > > Does anybody out there known the secret (!) address to this > wonder clock. There is a microsecond timer in full VAX processors that can be accessed by privileged code. Unless you're running in the kernel, it is not available to you. It is also not available on most MicroVAX processors. For example, the VAXstation 4000/90 (using NVAX) has it, while the VAXstation 4000/60 (using Rigel?) doesn't. The timer is really nice when it's there. For reasons I don't want to get into, I recently needed to implement a software UART on a high-end VAX processor and used the 4000/90 to prototype my code; I used the timer to perform the bit timing. It worked nicely. However, I mistakenly copied my definitions for the 4000/60's UART (I was using the DTR and CTS bits as the data bits in my prototype) for use on the 4000/90. Unfortunately, the 4000/90's Flash ROMs are at the address used by the 4000/60's UART. Also unfortunately, the 4000/90's Flash ROMs are wired with +12V on the Vpp pin; that is, they are ready to go. To complete the picture, the Flash ROM location in the 4000/90 taken by the modem control register I was using just happens to be in the middle of the text of a message and contains spaces. My code manipulated DTR by reading the location, setting or clearing the bit, and writing it back. It turns out that Intel conveniently chose (guess what!) 0x20 as the command to erase the Flash ROMs. For security (you wouldn't want to accidentally erase the Flash ROMs), Intel requires that you write the 0x20 twice. In other words, I managed to accidentally erase three of the four Flash ROMs in two 4000/90s before I figured out the problem... -- -------------------------+--------------------------------------------- Roger Ivie | "Once again we see that clowning and anarchy ivie@cc.usu.edu | don't mix." -- The Tick http://cc.usu.edu/~ivie/ |