Debian Codegraph @

libsrc/st/fsyalpha.mar

raw
1 .TITLE FSY_CREBDF
2 ; @(#)fsyalpha.mar 19.1 (ESO-IPG) 02/25/03 13:57:16
3 ;++
4 ; CREBDF - Create Bulk Data File
5 ;
6 ; This routine is used to create a bulk data file. The calling
7 ; program specifies the filename and the initial allocation
8 ; quantity measured in virtual blocks. Because of block
9 ; 'clustering' on FILES-11 discs, the actual number of blocks
10 ; allocated to the file may not be the same as that specified
11 ; by the calling program; allocation is always to the next
12 ; cluster boundary. However, the end-of-file marker will point
13 ; to the last block of the initial allocation quantity, rather
14 ; than to the boundary. Therefore, a BLOCK I/O write operation
15 ; is performed on the last physical block within the file. The
16 ; end-of-file marker will now point to this block.
17 ;
18 ;
19 ; +++
20 ; This is the version of MID_CREBDF for C modules,
21 ; so character strings are handled more directly.
22 ; +++
23 ; use as FSY_CREBDF(NAME,LEN,INALQ,NVB,STATUS)
24 ;
25 ; Input arguments:
26 ; ---------------
27 ; NAME: char expr Name of Bulk Data file.
28 ; LEN: I*4 Length of name
29 ; INALQ: I*4 Initial Allocation Quantity,
30 ; (measured in virtual blocks)
31 ;
32 ; Output arguments:
33 ; ----------------
34 ; NVB: I*4 Number of Virtual Blocks
35 ; actually allocated for file.
36 ; STATUS: I*4 Status return
37 ;
38 ;
39 ; K. Banse version 1.00 860127
40 ; K. Banse version 1.10 930115, for Alpha Open VMS
41 ;--
42
43 .PSECT FSYVMSA_1,WRT,NOEXE
44
45 BDFFAB: $FAB FOP=<CBT>, -
46 FAC=<PUT,GET,BIO>, -
47 RFM=FIX, -
48 MRS=512, -
49 SHR=<UPI,PUT,GET>
50
51 BDFRAB: $RAB FAB=BDFFAB, -
52 RBF=BUFFER, -
53 RSZ=512, -
54 ROP=BIO
55
56 BUFFER: .BLKB 512
57
58 .PSECT FSYVMSA_2,EXE
59
60 FSY_CREBDF:: .CALL_ENTRY
61
62 ; .WORD ^M<>
63 MOVL 04(AP),BDFFAB+FAB$L_FNA ;addr of NAME string
64 MOVB 08(AP),BDFFAB+FAB$B_FNS ;size of NAME string
65 MOVL 12(AP),BDFFAB+FAB$L_ALQ ;store INALQ
66
67 $CREATE FAB=BDFFAB
68 BLBC R0,20$
69
70 MOVL BDFFAB+FAB$L_ALQ,@16(AP) ;return NVB
71 MOVL @16(AP),BDFRAB+RAB$L_BKT ;store NVB also in RAB
72
73 $CONNECT RAB=BDFRAB
74 $WRITE RAB=BDFRAB
75
76 20$: MOVL R0,@20(AP) ;return STATUS
77 $CLOSE FAB=BDFFAB
78
79 RET
80 .END