Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0078/libsim/forsim.mac
There are 2 other files named forsim.mac in the archive. Click here to see a list.
00100 COMMENT ! SIMULA SPECIFICATION;
00200 OPTIONS(/E:FORTRAN,FORSIM);
00300 PROCEDURE forsim(n); INTEGER n;
00400 COMMENT n <= 0: No error interrupt desired.
00500 If n=0, type error message first time, but allow to continue.
00600 n > 0: Allow to continue n-1 times, then give RTS error;
00700
00800 !;! MACRO-10 code !;!
00900
01000 TITLE FORSIM
01100
01200 SUBTTL SIMULA utility, Lars Enderin 1975
01300
01400 ;!*** Copyright 1975 by the Swedish Defence Research Institute. ***
01500 ;!*** Copying is allowed. ***
01600
01700 ENTRY FORSIM,IN.,OUT.,IOLST.,FIN. ;! [307]
01800
01900 OPDEF RTSERR [001B8]
02000 udfe==214 ;! User defined error
02100 X1==1
02200
02300 FORSIM: HLRZ -1(16) ;! Parameter may be missing if called from FORTRAN
02400 JUMPE .+3 ;! Leave as is if so
02500 MOVE @(16) ;! n
02600 MOVEM N
02700 POPJ 17,
02800
02900 IOLST.: MOVEI IOLMSG
02910 JRST out
03000
03100 IN.: MOVEI INMSG
03200 JRST out
03300
03400 OUT.: MOVEI OUTMSG
03500 JRST out
03510
03520 FIN.: MOVEI FINMSG ;! [307]
03530 JRST out
03600
03700 out: SKIPN N
03800 JRST out1
03900 SOSE X1,N
04000 JRST out2
04100 OUTSTR @
04200 RTSERR udfe
04300 out1: OUTSTR @
04400 SETOM N ;! Inhibit further messages
04500 out2: POPJ 17,
04600
04700
04800 N: Z
04900 INMSG: ASCIZ "
05000 % I/O attempted by FORTRAN subroutine
05100 "
05200 OUTMSG=INMSG
05210 FINMSG=INMSG
05220 IOLMSG=INMSG
05300
05400 END;