Intr_2 - HP 8112A Operating, Programming And Servicing Manual

50 mhz programmable pulse generator
Table of Contents

Advertisement

I NTR_2
Purpose
Comments
! Name of this program : INTR_2
10
! - - - - - --------- ---------------------------------------------
20
30
This program demonstrates hov to use interrupts to service
! a SRQ from the HP8 1 12A .
40
50
60
CLEAR SCREEN
70
80
CLEAR 712
A = SPOLL (7 12) ! clear status byte
90
100
1 10
ON INTR 7 , 2 CALL Service_srq
120
ENABLE INTR 7 ; 2
130
A = SPOLL ( 7 1 2)
140
150
PRINT "SPOLL before the syntax error : " ; A
1 60
1 70
PRINT "Syntax error ca.us ed"
OUTPUT 712 ; " XXX"
180
190
WAIT 2
200
210
PRINT " End of the ma.in program . "
220
PRINT " End of the program INTR_2 . "
230
LOCAL 7 1 2
240
END
250
! =================================================================
260
270
! Subrout ine for servicing the interrupts .
280
7
- 1 2
Programming 'Examples
This program demonstrates how to use interrupts to service SRQs.
Setup section (llnes 1 10 - 1 20):
The interrupt service subroutine Service_srq is set up. SRQs from
interface 7 are enabled to cause an interrupt.
Main section
A SPOLL is conducted to show the value of the STB before the
syntax error. The computer is forced to wait 2 seconds (line 190) for
the SRQ before exiting the program.
Subroutine section
The Service_srq subroutine.
Then the value and the bits which are set in the Status Byte are
printed.
! Enable only service requests for interrupt .
! Wait 2 seconds , to enable the HP8 1 12A to request service
This subroutine conducts a SPOLL.
! Setup s ervice routine for SRQ

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents