1C 2C Copyright (c) 1980 The Regents of the University of California. 3C All rights reserved. 4C 5C %sccs.include.proprietary.f% 6C 7C @(#)sigtst.f 5.2 (Berkeley) 04/12/91 8C 9 10 external fpe 11 integer signal 12 isave = signal(8, 0, 1) 13 write(*,*) "1", signal(8, 0, 0) 14 write(*,*) "0", signal(8, fpe, -1) 15 write(*,*) "addr fpe", signal(8, 0, isave) 16 write(*,*) isave, signal(8, fpe, -1) 17 x = 1/x 18 write(*,*) "Back again" 19 z = 1/z 20 write(*,*) "Saved again" 21 end 22 23 subroutine fpe(flag) 24 call signal(8, fpe, -1) 25c call sigset() 26 write(*,*) "Hi there sports fans!" 27 call flush(6) 28 return 29 end 30 31 subroutine sigset() 32 external fpe 33 call signal(8, fpe, -1) 34 return 35 end 36