OpenVMS Source Code Demos

BASIC-HIBER-DEMO-100.BAS

1000	%TITLE "basic-hiber-demo.bas"
	%IDENT "Version_100"
	!+
	!=========================================================================================================================
	!0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
	!1         2         3         4         5         6         7         8         9         0         1         2         3
	!=========================================================================================================================
	! Title  : basic-hiber-demo_xxx.bas
	! Author : Neil S. Rieck	(Kitchener/Waterloo/Cambridge, Ontario, Canada)
	!	 :			(http://www3.sympatico.ca/n.rieck/) (mailto:n.rieck@sympatico.ca)
	!=========================================================================================================================
	! History:
	!
	! Ver  Who When   What
	! ---- --- ------ --------------------------------------------------------------------------------------------------------
	! 1.00 NSR 010817 1. Original program
	!========================================================================================================================
	!-
	OPTION type = explicit									! cuz tricks are for kids
	!
	%include "starlet"	%from %library "sys$library:basic$starlet"	! system services
	!
	declare	basic$QuadWord	DeltaQuad	,&
		long	rc%
	!
	!	/// wakeup in 500 mS ///
	!
	!	1. calc delta time
	!	2. clear the timer event flag (just incase)
	!	3. arm the timer
	!
	rc% = sys$bintim("0 00:00:00.50", DeltaQuad )				! init delta time
	print "-e- $bintim rc="+str$(rc%)	if (rc% and 1%) <> 1%
	!
	rc% =  sys$schdwk(,,DeltaQuad by ref,)					!
	print "-e- $schdwk rc="+str$(rc%)	if (rc% and 1%) <> 1%
	!
	print "going to sleep for 500mS"
	rc% = sys$hiber								! go to sleep
	print "-e- $hiber rc="+str$(rc%)	if (rc% and 1%) <> 1%
	!
	call sys$canwak(,)							! cancel just incase
	print "-e- $canwak rc="+str$(rc%)	if (rc% and 1%) <> 1%
	end

Back to OpenVMS
Back to OpenVMS Demo Index
Back to Home
Neil Rieck
Kitchener - Waterloo - Cambridge, Ontario, Canada.