Article 143632 of comp.os.vms:
Newsgroups: comp.os.vms
Path: nntpd.lkg.dec.com!pa.dec.com!decwrl!newsspool.doit.wisc.edu!uwm.edu!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!iol!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!sunsite.doc.ic.ac.uk!hgmp.mrc.ac.uk!ebi.ac.uk!omond
From: omond@ebi.ac.uk (Roy Omond)
Subject: Re: ZDEC
Sender: news@ebi.ac.uk (Mr news)
Message-ID: <1996Mar29.095917@ebi.ac.uk>
Date: Fri, 29 Mar 1996 08:59:17 GMT
Lines: 70
Reply-To: Roy.Omond@ebi.ac.uk
References: <31565A39.167E@reboot.demon.co.uk> <1996Mar28.085001.1@eisner.decus.org>
Organization: European BioInformatics Institute

In article <1996Mar28.085001.1@eisner.decus.org>,
schenkenberg@eisner.decus.org (Brian Schenkenberger, VAXman-) writes:

> In article <31565A39.167E@reboot.demon.co.uk>,
> andy leslie <andy@reboot.demon.co.uk> writes:
>> Ok, having pooh-poohed the need to zero device error counts, I now
>> have seen the light. Can anyone point me at ZDEC or a similar utility?

Finally Andy !  Took you long enough :-)

> Hmm.  I use a DEC supplied utility.   It's called DELTA!

While I'm sure Brian can dream in his sleep in DELTA-language, most of us
lesser mortals can't.  Here's a little utility I threw together in ca. 1983
for setting arbitrary words in memory to whatever value you want:
(which I still use to this day)

	Program			Zap
	Implicit Integer	(a-z)	! tut, tut !

	External		ZapR,ZapW

	Integer			ParmList(3)

	Write (6,'(''$Address : '')')
	Read (5,'(z)') Address

	ParmList(1)=2
	ParmList(2)=%Loc(Val)
	ParmList(3)=Address

	Status=Sys$CmEXEC(ZapR,ParmList)
	If (.not.Status) Call Lib$Stop(%Val(Status))

	Write (6,'('' Value was '',z8.8)') Val

	Write (6,'(''$Value   : '')')
	Read (5,'(z)') Val

	ParmList(1)=2
	ParmList(2)=%Loc(Val)
	ParmList(3)=Address

	Status=Sys$CmKRNL(ZapW,ParmList)
	If (.not.Status) Call Lib$Stop(%Val(Status))
	End

	Integer Function ZapR(X,Y)

C******	Caveat: This routine runs in exec mode

	Integer	X,Y

	X=Y		! zap in
	ZapR=1		! Indicate success

	Return
	End

	Integer Function ZapW(X,Y)

C******	Caveat: This routine runs in kernel mode

	Integer	X,Y

	Y=X		! zap in
	ZapW=1		! Indicate success

	Return
	End


