I NTR_2
Purpose
This program demonstrates how to use interrupts to service SRQs.
Comments
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.
This subroutine conducts a SPOLL.
Then the value and the bits which are set in the Status Byte are
printed.
10
! Name of this program : INTR_2
20
! -----------------------------------------------------------
30
This program demonstrates hov to use interrupts to service
40
! a SRQ from the HP8 1 12A .
50
60
CLEAR SCREEN
70
80
CLEAR 712
90
A=SPOLL (7 12) ! clear status byte
100
1 10
ON INTR 7 , 2 CALL Service_srq ! Setup service routine for SRQ
120
ENABLE INTR 7 ; 2
!
Enable only service requests for interrupt .
130
140
A=SPOLL (712)
150
PRINT "SPOLL before the syntax error : " ; A
160
170
PRINT "Syntax error ca.used"
180
OUTPUT 712 ; "XXX"
190
WAIT 2
! Wait 2 seconds , to enable the HP8 1 12A to request service
200
210
PRINT " End of the ma.in program . "
220
PRINT "End of the program INTR_2 . "
230
LOCAL 712
240
END
250
260
! =================================================================
270
280
! Subrout ine for servicing the interrupts .
7
-12 Programming 'Examples
Содержание 8112A
Страница 6: ......
Страница 24: ......
Страница 36: ......
Страница 44: ......
Страница 70: ......
Страница 92: ......
Страница 144: ...8 32 Testing Performance ...
Страница 176: ......
Страница 188: ...B END 1O 1 8 Instrument Overview and Troubleshooting Guide N E 3 5 N _ O E 3 1 r No E 5 r N E s 2 ...
Страница 190: ......
Страница 194: ...10 2 4 Servicing the Power Supply ...
Страница 196: ......
Страница 197: ......
Страница 216: ......
Страница 240: ...10 4 16 Servicing the Shaper and Output Amplifier ...
Страница 242: ...A R l BD RY MR I N 1 2 7 I I IJt 51 CR1 B e i 1 _ _ _ _ 20 ...
Страница 244: ......
Страница 251: ......
Страница 262: ...A B A2 ED RY CONTROL ...
Страница 270: ......
Страница 290: ...R B c R3 BD RY M I CROPROCESSOR 1 2 3 FIGURE 1 0 7 8 ...
Страница 294: ... 8 X2l 2 X2 Figure A 1 Mechanical Parts 1 A 2 Replaceable Parts ...
Страница 295: ...MP MP3 MP MP2 MP4 MPS MP 1 2 MPS MP MP I B ElElElEl Replaceable Parts A 3 ...
Страница 334: ......
Страница 378: ...Figure B 14 Mechanical Parts 1 B 44 Backdating ...
Страница 379: ...A3 tlP3 HP40 4x P41 4x J4 i J2 I O a J I 1 I I a 4 I I I V3 tlP1 I Figure B 15 Mechanical Parts 2 Backdating B 45 ...
Страница 380: ......
Страница 382: ......
Страница 402: ......