Debian Codegraph @

libsrc/st/fsyvmsa.mar

raw
1 .TITLE FSY_CREBDF
2 ; @(#)fsyvmsa.mar 19.1 (ESO-IPG) 02/25/03 13:57:17
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 ;--
41
42 BDFFAB: $FAB FOP=<CBT>, -
43 FAC=<PUT,GET,BIO>, -
44 RFM=FIX, -
45 MRS=512, -
46 SHR=<UPI,PUT,GET>
47
48 BDFRAB: $RAB FAB=BDFFAB, -
49 RBF=BUFFER, -
50 RSZ=512, -
51 ROP=BIO
52
53 BUFFER: .BLKB 512
54
55 FSY_CREBDF::
56
57 .WORD ^M<>
58 MOVL 04(AP),BDFFAB+FAB$L_FNA ;addr of NAME string
59 MOVB 08(AP),BDFFAB+FAB$B_FNS ;size of NAME string
60 MOVL 12(AP),BDFFAB+FAB$L_ALQ ;store INALQ
61
62 $CREATE FAB=BDFFAB
63 BLBC R0,20$
64
65 MOVL BDFFAB+FAB$L_ALQ,@16(AP) ;return NVB
66 MOVL @16(AP),BDFRAB+RAB$L_BKT ;store NVB also in RAB
67
68 $CONNECT RAB=BDFRAB
69 $WRITE RAB=BDFRAB
70
71 20$: MOVL R0,@20(AP) ;return STATUS
72 $CLOSE FAB=BDFFAB
73
74 RET
75 .END