-
Notifications
You must be signed in to change notification settings - Fork 0
/
irgmac.mac
86 lines (86 loc) · 1.91 KB
/
irgmac.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
; SUBROUTINE RUN22 TO RUN SYSTEM 1022 FROM A FORTRAN PROGRAM
;
; CALLING SEQUENCE:
; CALL RUN22(IER,FILENAME)
;
; WHERE:
; IER IS NOT PRESENTLY USED AND RESERVED FOR FUTURE ERROR HANDLING
;
; FILENAME IS THE NAME OF A FILE (2 WORDS, 10 CHARS LONG WITH
; PERIOD IF NECESSARY FOR EXTENSION) WHICH CONTAINS A SET OF 1022
; COMMANDS TO BE EXECUTED. IF NO COMMANDS ARE TO BE EXECUTED, 0
; SHOULD BE USED FOR THE FILENAME.
;
; UPON CALLING RUN22, CONTROL IS TRANSFERRED TO SYSTEM 1022. NO HEADER
; MESSAGE IS PRINTED. THE FILE OF COMMANDS, IF SPECIFIED, IS EXECUTED.
;
; EXAMPLES:
; CALL RUN22(IER,'TEST.DMC')
; RUNS SYSTEM 1022 EXECUTING COMMANDS ON FILE TEST.DMC.
;
; CALL RUN22(IER,0)
; RUNS SYSTEM 1022. THE SYSTEM RESPONDS WITH AN ASTERISK AND NO
; HEADER MESSAGE.
;
TITLE RUN22
ENTRY RUN22
RUN22: JFCL
MOVEI 1,@1(16)
MOVE 0,(1) ;GET FILENAME
JUMPE 0,RUN
MOVEM 0,CMD+1 ;FORM 'USE' CMD
MOVE 0,1(1) ; GET EXT
MOVEM 0,CMD+2 ;PLACE INTO CMD
INIT 17,0
SIXBIT /DSK/
XWD OB,0
JRST RUN ;DSK NOT AVAIL
CALLI 0,30
IDIVI 0,^D10 ;CONVERT JOB
ADDI 1,20 ; #
DPB 1,[POINT 6,LK+2,17] ; TO
IDIVI 0,^D10 ; SIXBIT
ADDI 1,20 ; AND
DPB 1,[POINT 6,LK+2,11] ; STORE
ADDI 0,20 ; IN
DPB 0,[POINT 6,LK+2,5] ; IN BLOCK
HRRI 0,(SIXBIT /LNK/)
HRRM 0,LK+2
MOVSI 0,(SIXBIT /TMP/)
MOVEM 0,LK+3
ENTER 17,LK ;ENTER LNK TEMP FILE
JRST RUN ;FAILED
OUTPUT 17, ;INITIAL OUTPUT
;
;PLACE 'USE <FLNM>' CMD INTO LNK TMP
;
MOVE 1,[POINT 7,CMD]
MOVEI 2,^D20 ;MAX CHAR COUNT
ILP: ILDB 0,1
JUMPE 0,TC ;IGNORE NULLS
IDPB 0,OB+1
SOS OB+2
TC: SOJG 2,ILP
CLOSE 17,
RELEAS 17,
;
RUN: MOVE 0,[XWD 1,RB] ;START INC OF 1
CALLI 0,35 ;RUN 1022
HALT ;FAILED, LET MONITOR GIVE MSG
;
RB: SIXBIT /SYS/
SIXBIT /1022/
0
0
0
0
CMD: ASCII/USE /
0
0
ASCII/.
/
OB: BLOCK 3 ;OUTPUT BUFR HDR
LK: OCT 4
BLOCK 4
END