[Info-vax] 64-bit (was Re: New CEO of VMS Software)

Dave Froble davef at tsoft-inc.com
Fri Jan 12 18:46:33 EST 2024


On 1/12/2024 3:22 PM, Arne Vajhøj wrote:
> On 1/12/2024 2:57 PM, Dave Froble wrote:
>> On 1/12/2024 7:23 AM, Arne Vajhøj wrote:
>>> On 1/12/2024 12:08 AM, Dave Froble wrote:
>>>> On 1/11/2024 3:48 PM, Arne Vajhøj wrote:
>>>>> On 1/11/2024 1:17 PM, Simon Clubley wrote:
>>>>>> On 2024-01-11, Dave Froble <davef at tsoft-inc.com> wrote:
>>>>>>> If RMS doesn't fit your requirements, then don't use it.
>>>>>>
>>>>>> Everyone uses RMS, even if it hidden from you by the language. The RMS
>>>>>> references are still in the executable you create however.
>>>>>
>>>>> In practice yes.
>>>>>
>>>>> In theory one can use SYS$QIO(W) for all IO and bypass RMS. But
>>>>> it is very cumbersome (especially if one cannot use RMS for stuff
>>>>> like finding IFI).
>>>>
>>>> And if one is using a database product that has nothing to do with RMS ???
>>>
>>> I would still expect that database product to use RMS to open
>>> the database file even if the actual IO is done by
>>> SYS$QIO(W) / SYS$IO_PERFORM(W) or via memory mapped file.
>>
>> Your expectation would be wrong.
>
> It happens frequently.
>
>> File opens without RMS use QIO to open a file.
>
> How does it get the FID?

I'll post pieces of code to keep this short, well, relatively ..

;       Parse the file specification, using the RMS $PARSE service
;
         MOVAB   WRK_FAB,R8              ; Load FAB address
         MOVAB   WRK_NAM,FAB$L_NAM(R8)   ; Set name block address
         MOVL    DSC$A_POINTER(R3),FAB$L_FNA(R8)
         CVTWB   DSC$W_LENGTH(R3),FAB$B_FNS(R8)
         $PARSE  FAB = R8                ; Invoke RMS parsing service
         BLBS    R0,200$                 ; Continue if all is okay
         BRW     ERRORS                  ; Else return with error code
;
;       Set up the filename descriptor for the ACP access
;
200$:   MOVL    FAB$L_NAM(R8),R8        ; Point to NAM block
         MOVZBL  NAM$B_ESL(R8),R0        ; Length of expanded string
         MOVL    NAM$L_ESA(R8),R1        ; Address of expanded string
         LOCC    #^A"]",R0,(R1)          ; Find end of directory
         SUBW3   #1,R0,WRK_Q_FILDSC+DSC$W_LENGTH
         ADDL3   #1,R1,WRK_Q_FILDSC+DSC$A_POINTER

---

;       Assign the VMS I/O channel number
;
         MOVAB   WRK_Q_DEVDSC,R0         ; Set descriptor address
         CVTBW   NAM$T_DVI(R8),DSC$W_LENGTH(R0)
         MOVAB   NAM$T_DVI+1(R8),DSC$A_POINTER(R0)
         $ASSIGN_S DEVNAM=(R0),CHAN=WRK_W_VMSCHN,ACMODE=#PSL$C_USER
         BLBS    R0,300$                 ; Continue if all is okay
210$:   BRW     ERRORS                  ; Else exit

---

;       Fill the $QIO block
;
300$:   MOVAB   WRK_QIO,R9              ; Set $QIO parameter block address
         MOVAQ   WRK_Q_IOSB,QIO$_IOSB(R9) ; I/O status block
         MOVZWL  WRK_W_VMSCHN,QIO$_CHAN(R9); Set VMS channel number
         MOVZWL  #<IO$_ACCESS!IO$M_ACCESS>,QIO$_FUNC(R9)
         MOVAQ   WRK_Q_FIBDSC,QIO$_P1(R9)        ; FIB descriptor address
         MOVAQ   WRK_Q_FILDSC,QIO$_P2(R9)        ; Filename specification descrip
tor address
         CLRQ    QIO$_P3(R9)             ; Clear (p3,p4)
         MOVAB   WRK_ATRLST,QIO$_P5(R9)  ; Attributes requested
;
;       Set-up the FIB
;
         MOVAB   WRK_FIB,R6              ; Base of FIB
         CLRQ    (R6)+                   ; Clear (1,2)
         CLRQ    (R6)+                   ; (3,4)
         CLRQ    (R6)+                   ; (5,6)
         CLRQ    (R6)+                   ; (7,8)
         CLRQ    (R6)+                   ; (9,10)
         CLRQ    (R6)                    ; (11,12)
         MOVAB   WRK_FIB,R6              ; Base of FIB
         MOVL    R6,WRK_Q_FIBDSC+DSC$A_POINTER
         MOVW    #<12*4>,WRK_Q_FIBDSC+DSC$W_LENGTH
         MOVZWL  TBL_ACCTL[R4],FIB$L_ACCTL(R6)
         MOVL    NAM$W_DID(R8),FIB$W_DID(R6)
         MOVW    NAM$W_DID+4(R8),FIB$W_DID+4(R6)

---

;
700$:   $QIOW_G (R9)                    ; Issue the $QIO
         BLBC    R0,710$                 ; Exit on error
         MOVZWL  WRK_Q_IOSB,R0           ; Get status
         BLBS    R0,720$                 ; Continue unless error
710$:   BRW     1100$                   ; Exit on ACP access error

Ok, that's just snips.  You'd need the entire sources to actually follow the 
details.  But, the thing is, no part of RMS was used to open the file.

> I usually do the SYS$OPEN, grab the FID from the NAM block,
> SYS$CLOSE and then do SYS$QIOW with IO$_ACCESS | IO$M_ACCESS.
>
> Arne
>


-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list