Purpose; Comments; Setup Section (Lines 110 - 120); Main Section - HP 8112A Operating, Programming And Servicing Manual

50 mhz programmable pulse generator
Table of Contents

Advertisement

Purpose

Comments

10
! Name of this program: INTR,2
2 0
! This program demonstrates how to use interrupts to service
3 0
4 0
! a SRQ from the HP8112A.
5 0
!
6 0
CLEAR SCREEN
7 0
!
8 0
CLEAR 712
9 0
!
100
110
ON INTR 7,2 CALL Service,srq
120
ENABLE INTR 7;2
130
140
150
PRINT "SPOLL before the syntax error:
160
!
170
PRINT "Syntax error caused"
180
OUTPUT 712;"XXX"
190
WAIT 2
200
!
210
PRINT "End of the main program."
220
PRINT "End of the program INTR,2."
230
LOCAL 712
240
END
250
!
260
I
270
! Subroutine for servicing the interrupts.
280
7-12 Programming Examples
This program demonstrates how to use interrupts to service
Setup section (thes 110 - 120):
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. This subroutine conducts a SPOLL.
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 HP8112A to request service
! Setup service routine for SRQ

Advertisement

Table of Contents
loading

Table of Contents