~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to libsrc/st/fsyalphd.mar

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
        .TITLE  FSY_OPNBDF
 
2
; @(#)fsyalphd.mar      19.1 (ESO-IPG) 02/25/03 13:57:16
 
3
;++
 
4
;       OPNBDF - Open Bulk Data File
 
5
;
 
6
;       This routine is used to open an EXISTING Bulk Data File for
 
7
;       subsequent processing. The filename, logical or physical, is
 
8
;       supplied by the calling program and the file is opened by RMS
 
9
;       using the User File Open option. This restricts the access to
 
10
;       the file (on the assigned channel) to the QIO and file-mapping
 
11
;       system services; no RMS routines can be used. However, the 
 
12
;       file can still be accessed on another channel for RMS process-
 
13
;       -ing, (see FSY_EXTBDF), as it is opened for file sharing.
 
14
;
 
15
;       The file will be opened for read/only access if the protection
 
16
;       does not allow read/write operations to be performed. 
 
17
;
 
18
;       If the bulk data file is opened successfully, the I/O channel
 
19
;       number, FILES-11 file identification and device name string are
 
20
;       returned to the calling program. These can be used subsequently
 
21
;       to re-open the file, using the RMS NAM block, for any ancillary
 
22
;       processing that may be required.
 
23
;
 
24
; +++
 
25
;       This is the version of MID_OPNBDF for C modules,
 
26
;       so character strings are handled more directly.
 
27
; +++
 
28
;       use as FSY_OPNBDF(NAME,LEN,IOCHAN,FILEIDA,FILEIDB,DEVICE,STATUS)
 
29
;
 
30
;       Input argument:
 
31
;       ---------------
 
32
;       NAME:    CHARACTER expression:   Name of Bulk Data File.
 
33
;       LEN:     I*4                     Length of NAME
 
34
;
 
35
;       Output arguments:
 
36
;       -----------------
 
37
;       IOCHAN:  INTEGER variable:       I/O channel assigned to file.
 
38
;       FILEIDA: INTEGER variable:       FILES-11 File Identification (part A)
 
39
;       FILEIDB: INTEGER variable:       FILES-11 File Identification (part B)
 
40
;       DEVICE:  CHARACTER variable:     Device Identification (20 chars)
 
41
;       STATUS:  INTEGER variable:       Status return.
 
42
;
 
43
;
 
44
;       K. Banse        version 1.00     851120
 
45
;       K. Banse        version 1.10     910917
 
46
;       K. Banse        version 1.20     930115, for Alpha Open VMS
 
47
;       K. Banse        version 1.30     980616, W_FID is 6 bytes!
 
48
;--
 
49
 
 
50
        .PSECT FSYVMSD_1,WRT,NOEXE
 
51
 
 
52
        $RMSDEF
 
53
 
 
54
BDFFAB: $FAB    FOP=<UFO>, -
 
55
                SHR=<UPI,GET,PUT>, -
 
56
                FAC=<GET,PUT>, -
 
57
                NAM=BDFNAM
 
58
 
 
59
BDFFABR: $FAB   FOP=<UFO>, -
 
60
                SHR=<UPI,GET>, -
 
61
                FAC=<GET>, -
 
62
                NAM=BDFNAM
 
63
 
 
64
BDFNAM: $NAM
 
65
        
 
66
        .PSECT FSYVMSD_2,EXE
 
67
 
 
68
FSY_OPNBDF::    .CALL_ENTRY
 
69
 
 
70
;       .WORD   ^M<>
 
71
        MOVL    04(AP),BDFFAB+FAB$L_FNA         ;addr of NAME string
 
72
        MOVB    08(AP),BDFFAB+FAB$B_FNS         ;size of NAME string
 
73
 
 
74
        $OPEN   FAB=BDFFAB                      ;attempt to open file
 
75
        BLBC    R0,50$                          ;try to open with read only...
 
76
 
 
77
 
 
78
        MOVL    BDFFAB+FAB$L_STV,@12(AP)        ;return IOCHAN
 
79
        MOVL    BDFNAM+NAM$W_FID,@16(AP)        ;return FILEIDA
 
80
        MOVW    BDFNAM+NAM$W_FID+4,@20(AP)      ;return FILEIDB
 
81
        MOVAL   BDFNAM+NAM$T_DVI,R0             ;move to DEVICE string
 
82
        MOVL    24(AP),R1
 
83
        MOVL    (R0),(R1)
 
84
        ADDL2   I^#4,R0
 
85
        ADDL2   I^#4,R1
 
86
        MOVL    (R0),(R1)
 
87
        ADDL2   I^#4,R0
 
88
        ADDL2   I^#4,R1
 
89
        MOVL    (R0),(R1)
 
90
        ADDL2   I^#4,R0
 
91
        ADDL2   I^#4,R1
 
92
        MOVL    (R0),(R1)
 
93
 
 
94
20$:    MOVL    BDFFAB+FAB$L_STS,@28(AP)        ;return STATUS
 
95
 
 
96
        RET
 
97
 
 
98
 
 
99
50$:    MOVL    04(AP),BDFFABR+FAB$L_FNA        ;addr of NAME string
 
100
        MOVB    08(AP),BDFFABR+FAB$B_FNS        ;size of NAME string
 
101
 
 
102
        $OPEN   FAB=BDFFABR                     ;attempt to open file
 
103
        BLBC    R0,60$                          ;abort if open failed
 
104
 
 
105
        MOVL    BDFFABR+FAB$L_STV,@12(AP)       ;return IOCHAN
 
106
        MOVL    BDFNAM+NAM$W_FID,@16(AP)        ;return FILEIDA
 
107
        MOVW    BDFNAM+NAM$W_FID+4,@20(AP)      ;return FILEIDB
 
108
        MOVAL   BDFNAM+NAM$T_DVI,R0             ;move to DEVICE string
 
109
        MOVL    24(AP),R1
 
110
        MOVL    (R0),(R1)
 
111
        ADDL2   I^#4,R0
 
112
        ADDL2   I^#4,R1
 
113
        MOVL    (R0),(R1)
 
114
        ADDL2   I^#4,R0
 
115
        ADDL2   I^#4,R1
 
116
        MOVL    (R0),(R1)
 
117
        ADDL2   I^#4,R0
 
118
        ADDL2   I^#4,R1
 
119
        MOVL    (R0),(R1)
 
120
 
 
121
60$:    MOVL    BDFFABR+FAB$L_STS,@28(AP)       ;return STATUS
 
122
 
 
123
        RET
 
124
 
 
125
        .END
 
126
 
 
127
        .TITLE  FSY_OPNFIL