\ From:	HENRY::IN%"carl%cithex.caltech.edu%sri-kl.ARPA%relay.cs.net@rca.com" 12-FEB-1987 17:33/ To:	vtcf@ncsc.arpa, info-vax@cithex.caltech.edu  Subj:	Re: RAM disks on VAX  3 In order to connect the pseudo-disk to your system: P -------------------------------------------------------------------------------- $ run sys$system:sysgen - CONNECT device-name/NOADAPTER/DRIVER=PDDRIVER P --------------------------------------------------------------------------------2 wheer you use something like PDA0 for device-name.7 The following source (in PASCAL) formats a pseudo-disk. P --------------------------------------------------------------------------------! [inherit ('SYS$LIBRARY:STARLET')] " program Format_pd (input, output);   type"   unsigned_word = [word] 0..65535;"   status_block = [volatile] record# 		   status, count : unsigned_word;  		   dev : unsigned; 		 end;    var    chan : unsigned_word;    iosb : status_block;    device : varying [80] of char;   block_size : integer;    stat : integer;   7   procedure LIB$SIGNAL (%IMMED stat : integer); extern;    begin    write ('Device name: ');   readln (device);   write ('Disk blocks: ');   readln (block_size);3   stat := $ASSIGN (DEVNAM := device, CHAN := chan); +   if not odd (stat) then LIB$SIGNAL (stat);      stat := $QIOW (CHAN := chan, 		 FUNC := IO$_FORMAT, 		 IOSB := iosb, 		 P1 := %IMMED (block_size));+   if not odd (stat) then LIB$SIGNAL (stat); 9   if not odd (iosb.status) then LIB$SIGNAL (iosb.status);  end.P --------------------------------------------------------------------------------  As does the following C program:P -------------------------------------------------------------------------------- #include <descrip.h> #include <iodef.h>   main(nargs, args) 
 int nargs; char **args; {	static char buffer[64];  	$DESCRIPTOR(dev, buffer);%  	long chan, maxblock, iosb[2], stat;  	  	if (nargs < 2) {  		printf("Device to format: ");  		gets(buffer);  	} else  		strcpy(buffer, *++args);# 	dev.dsc$w_length = strlen(buffer); 7 	if (((stat = SYS$ASSIGN(&dev, &chan, 0, 0)) & 7) != 1) 
 		exit(stat);  	if (nargs < 3) {  		printf("Number of blocks: ");  		scanf("%x", &maxblock);  	} else  		maxblock = atol(*++args); A 	if (((stat = SYS$QIOW(0, chan, IO$_FORMAT, iosb, 0, 0, maxblock,  		0, 0, 0, 0, 0)) & 7) == 1) 		stat = *iosb;  	exit(stat); } P --------------------------------------------------------------------------------