From: system@SendSpamHere.ORG Sent: Thursday, March 08, 2001 3:44 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: %SYSTEM-F-NOT64DEVFUNC, 64-bit address not supported by device forthis function In article <01030814111311@beast.dtsw.army.mil>, jamese@beast.dtsw.army.mil writes: >Hello, > >AlphaServer 4000 5/400 4MB VMS V7.1-1H1 DEC C V5.6-003 > >I want to read a file by file id from an ISO 9660 CD-ROM. I found a >MACRO segment that gets the file name and specification using the file >id. > >When I try it in DECC, I get a "%SYSTEM-F-NOT64DEVFUNC, 64-bit address not >supported by device for this function." > >Does anyone have a C example of using QIO and only 32 bit addresses? >What is there in my C code that makes it 64 bit? > >Thank you for any help you can provide, > >Ed James ed.james@telecomsys.com >TeleCommunications Systems, Inc. voice 410-295-1919 >2024 West Street, Suite 300 800-810-0827 x1919 >Annapolis, MD 21401-3556 fax 410-280-1094 > >$ copy create fileid.mar > .Title GetFileNameUsingFileIDAcpQio > $fibdef ; File Information Block defs > $atrdef ; Attribute block defs > .macro check_status,?dest > blbs r0,dest ; If successful then return > jmp error ; Handle the error >dest: .endm check_status > .psect data,noexe > .title filename >fib_block: ; Reserve space for FIB > .blkb fib$k_length ; Length defined by symbol >fib_descr: ; Descriptor to describe > ; location of FIB > .long fib$k_length > .long fib_block ; FIB pointer >attr_ctrl_blk: ; Attribute Cntrl Block > .word atr$s_ascname ; Size > .word atr$c_ascname ; Type > .address filenam ; Address > .word atr$s_file_spec ; Size > .word atr$c_file_spec ; Type > .address sfilenam ; Address > .long 0 ; End the Attribute Control > ; Block >filenam_desc: ; Descriptor for Filename > .word atr$s_ascname ; Length > .word 0 ; Type > .address filenam ; Address of buffer >filenam: > .blkb atr$s_ascname+1 ; Buffer to hold Filename > >sfilenam_desc: ; Descriptor for Filespec > .word atr$s_file_spec ; Length > .word 0 ; Type > .address sfilenam ; Address of buffer >sfilenam: > .blkb atr$s_file_spec+1 ; Buffer to hold Filespec > >iosb: ; I/O Status Block > ; for ACP QIO > .blkw 1 ; Status > .blkw 1 ; Count > .blkl 1 ; Device Specific Information >device_channel: > .blkw 1 ; Buffer for Device Channel # >device_desc: ; Descriptor for Device Name > .word 7 ; Length > .word 0 ; Type > .address dev_nam ; Address of buffer >dev_nam: > .ascii /dka500:/ ; Buffer holding Device name >file_num: > .word 4 ; file number - 65536 >file_seq_num: > .word 23 ; File Sequence Number >rel_vol_num: > .byte 0 ; Relative Volume Number > ; Relative Volume Number is > ; is a BYTE value >file_nmx: ; File number extension > .byte 0 ; integer of filenumber/65536 > > .psect code > > .entry prog,^m<> > $assign_s devnam = device_desc,- ; Get Channel # for ACP QIO > chan = device_channel > check_status ; Check Status in r0 > movw file_num,- ; Store File # in FIB > fib_block+fib$w_fid_num > movw file_seq_num,- ; Store File Seq # in FIB > fib_block+fib$w_fid_seq > movw rel_vol_num,- ; Store Relative Vol number and > fib_block+fib$w_fid_rvn ; file number extension in FIB >; Issue ACP QIO to access file and obtain information requested in >; attribute control block for file described in FIB descriptor. > $qiow_s chan = device_channel,- > func = #io$_access!io$m_access,,- > iosb = iosb,- > p1 = fib_descr,- > p5 = #attr_ctrl_blk > check_status ; Check Status in r0 > pushal filenam_desc > calls #1,g^lib$put_output ; Print the File Name > pushal sfilenam_desc > calls #1,g^lib$put_output ; Print the File spec >error: $exit_s r0 > .end prog >$ create fileid.c >#pragma required_pointer_size 32 > >#undef __NEW_STARLET > >#include descrip >#include iodef >#include iodef >#include fibdef >#include atrdef /* SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C]ATRDEF.H */ >#include rms >#include string >#include stdlib >#include stdio >#include lib$routines >#include starlet > >typedef struct { > unsigned short int status; > union { > struct { > unsigned char transmit, receive, crfill, lffill, parity, zero; > } trclpz; > struct { > unsigned short int speeds, fills, parityw; > } sfp; > struct { > unsigned short int termoff, termchar, termsize; > } ocs; > struct { > unsigned short int mbxbytes; > unsigned long int senderpid; > } mbx; > } tsom; >} IOSTATBLOCK; > >#define ERROR_MSG fprintf( stderr, > >#define BLOCK_SIZE 512 /* size of one disk block */ >#define DEVNAM_SIZE 255 /* size of max filespec */ > >unsigned int main( int argc, char *argv[]) >{ > > static struct fibdef fib; > static struct atrdef atr[3]; > > IOSTATBLOCK dev_iosb; > short int channel, fnum, fseq, frvn; > unsigned long int status; > > struct dsc$descriptor_s fib_descr; > struct dsc$descriptor_s devnam_desc; > char devnam_buffer[DEVNAM_SIZE+1]; > char filename[ATR$S_ASCNAME+1]; > char filespec[ATR$S_FILE_SPEC+1]; > > if( argc != 5) { > ERROR_MSG "Usage: file_id \n"); > exit( EXIT_FAILURE); > } > > devnam_desc.dsc$b_dtype = DSC$K_DTYPE_T; > devnam_desc.dsc$b_class = DSC$K_CLASS_S; > devnam_desc.dsc$a_pointer = devnam_buffer; > > devnam_buffer[DEVNAM_SIZE+1] = '\0'; > strncpy( devnam_buffer, argv[1], DEVNAM_SIZE); > devnam_desc.dsc$w_length = (short int) strlen( devnam_buffer); > > /* Assign a channel to disk */ > status = sys$assign( > &devnam_desc, /* disk device name descriptor */ > &channel, /* disk device channel number */ > 0, /* default access mode */ > 0); /* no mailbox */ > if( (status & 1) == 0) { > ERROR_MSG "Error in assign status\n"); > lib$stop( status); > } > > fnum = atoi( argv[2]); > fseq = atoi( argv[3]); > frvn = atoi( argv[4]); > > fib.fib$w_fid_num = fnum; > fib.fib$w_fid_seq = fseq; > fib.fib$w_fid_rvn = frvn; > > fib_descr.dsc$w_length = FIB$K_LENGTH; > fib_descr.dsc$b_dtype = DSC$K_DTYPE_T; > fib_descr.dsc$b_class = DSC$K_CLASS_S; > fib_descr.dsc$a_pointer = (char *) &fib; > > atr[0].atr$w_size = ATR$S_ASCNAME; > atr[0].atr$w_type = ATR$C_ASCNAME; > atr[0].atr$l_addr = &filename; > atr[1].atr$w_size = ATR$S_FILE_SPEC; > atr[1].atr$w_type = ATR$C_FILE_SPEC; > atr[1].atr$l_addr = &filespec; > atr[2].atr$w_size = 0; > atr[2].atr$w_type = 0; > > status = sys$qiow( > 0, /* Default event flag #, OK for synch I/O */ > channel, /* Disk channel */ > IO$_ACCESS|IO$M_ACCESS, /* Access file and get info */ > &dev_iosb, /* I/O Status Block */ > 0, /* No AST completion routine */ > 0, /* or parameters */ > fib_descr, /* P1 = fib descriptor address */ How sure are you that you are passing the address of 'fib_descr'? ;) > 0, 0, 0, /* No P2-P4 */ > &atr, /* P5 = attribute control block */ > 0); /* No P6 */ > if( (status & 1) == 0) { > ERROR_MSG "Error in io$access, status: %8.8X\n", status); > lib$stop( status); > } > if( (dev_iosb.status & 1) == 0) { > ERROR_MSG "Error in io$access, iosb.status: %8.8X\n", > dev_iosb.status); > lib$stop( dev_iosb.status); > } > > printf( "Filename(%d)>%s<\nFilespec(%d)>%s<\n", > strlen( filename), filename, > strlen( filespec), filespec); > > /* Deassign channel to disk */ > status = sys$dassgn( channel); > if( (status & 1) == 0) { > ERROR_MSG "Error in deassign status\n"); > lib$stop( status); > } >} >$ fid = "$" + f$parse( "FILEID",,f$environment( "DEFAULT")+".EXE") >$ macro/migr fileid.mar >$ link fileid >$ fid >ID.CTL;1 >_BEAST$DKA500:[000000]ID.CTL;1 >$ cc fileid.c >$ link fileid >$ fid dka500 4 23 0 >Error in io$access, status: 000026C4 >%SYSTEM-F-NOT64DEVFUNC, 64-bit address not supported by device for this function >%TRACE-F-TRACEBACK, symbolic stack dump follows > image module routine line rel PC abs PC > FILEID FILEID main 26810 0000000000000310 0000000000020310 > FILEID FILEID __main 0 000000000000006C 000000000002006C > 0 FFFFFFFF88C850F8 FFFFFFFF88C850F8 > -- VAXman- OpenVMS APE certification number: AAA-0001 VAXman(at)TMESIS(dot)COM city, n., 1. a place where trees are cut down and streets are named after them.