=;The OpenVMS Frequently Asked Questions (FAQ)D

The OpenVMS Frequently Asked Questions (FAQ)



 r \ ^  
PreviousContentsIndex

^

10.26 Access to Itanium Assembler?



FIf you are interested in accessing the native Intel Itanium assembler =within the OpenVMS I64 GNV environment---and since the iasi64G assembler is a Unix program and GNV is a Unix environment for OpenVMS G I64---you can simply copy iasi64.ext into your gnu:[bin] directory in 5 place of "as.", and of "AS.EXE".

GAlternately and probably also better, you can write an "as." Cscript to invoke the iasi64.exe image from its particular prefered location on the local system.

1A typical "as." script looks like this:

 

"
path/iasi64.exe $1 $2 $3 $4 $5 


b

10.27 Kernel-mode coding restrictions?



FFloating point is prohibited in OpenVMS Alpha inner-mode (privileged) Fcode, and within any process or other execution context that does not *have floating point enabled and available.

?Programmers developing and working with OpenVMS Alpha high-IPL Fkernel-mode code, such as device drivers, will further want to become Dfamiliar with the floating-point processing and the instruction set Hemulation available in the particular target environment (if any). When Dworking with C, inner-mode programmers will want to become familiar Bwith the C compiler qualifier /INSTRUCTION_SET=[NO]FLOATING_POINT.

EDevice drivers and other similar kernel-mode C code must be compiled Ewith /INSTRUCTION_SET=FLOATING_POINT and /EXTERN_MODEL=STRICT_REFDEF.

HAdditionally, inner-mode code cannot call out to the user-mode language Hrun-time libraries nor to any of the OpenVMS system run-time libraries. GIn particular, this prohibition prevents pages of inner-mode-protected Gmemory from being allocated and interspersed within the user-mode heap (or other such user-mode data structures.

EThe prohibtion on user libraries also generally means that such code Amust be linked with LINK /NOSYSLIB, and quite probably also with D/SYSEXE. The former causes the linker to avoid searching the system Fshareable image libraries (via IMAGELIB.OLB), while the latter brings Din symbols typically only known to or otherwise accessable from the OpenVMS executuve.

DTo include kernel-mode C programming definitions, macros and system *constants within a C compilation, include DSYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY on the C compilation. (Constructs /defined within the system macro library LIB.MLB(or within its C equivalent SYS$LIB_C.TLBGtend to be version-dependent, or undocumented, or both.) As an example ?of the compilation, the following is a typical C device driver compilation command:

 

"
M$   CC /STANDARD=RELAXED_ANSI89/INSTRUCTION=NOFLOATING_POINT/EXTERN=STRICT - G        'DEBUG_CC_DQ_OPT' 'ARCH_CC_OPT' 'CHECK_CC_OPT' 'SHOW_CC_OPT' - <        /LIS=LIS$:xxDRIVER/MACHINE_CODE/OBJ=OBJ$:xxDRIVER - :        SRC$:xxDRIVER.C+SYS$LIBRARY:SYS$LIB_C.TLB/LIBRARY 




DAdditionally, code running in executive mode in an AST or in kernel Hmode cannot call RMS services, or routines which directly or indirectly call RMS.

HFor related kernel-mode programming materials and driver documentation, Gplease see the Writing OpenVMS Alpha Device Driversin C book, ISBN 1-55558-133-1.n

10.28 Decoding an Access Violation (ACCVIO) Error?



FTo decode the virtual addresses returned by an access violation or by Ganother similar OpenVMS display, you need to have created and retained >a listings file---preferably one with machine code generation enabled---and a full link map.

FStarting with the virtual address reported by the error, use the link Cmap to find the module that contributed the code that contains the Hvirtual address range. Calculate the offset from the base of the range, Gby subtracting the base of the range from teh failing virtual address. AThen use the compiler listings for the particular component that Econtributed the code to locate the offset of the failing instruction.

@If the map and listings information was not maintained, working Abackwards is far more difficult---you are left to use the binary Dinstruction data around the failure to locate the associated source Ccode, and this process is far more involved. This usually involves Gmatching up blocks of decoded instructions around the failing code, or Hthe direct analog involving matching up ranges of decoded instructions. 7Keep the maps and listing files around, in other words.

GRather easier than an approach based on virtual address arithmetic and Hfar easier than working backwards from the instruction stream is to use ?integrated debugging---this inclusion is arguably an essential Bcomponent of any non-trivial application---and to use the OpenVMS Debugger.

EThe OpenVMS Debugger in particular can be used to examine the source ?code, to examine the stack, and can even be programmed to wait @patiently for the incidence of a particular value or failure or Bcondition, and this is far easier than working backwards from the Finstruction stream is to use integrated debugging---this inclusion is Harguably an essential component of any non-trivial application---and to Buse the OpenVMS Debugger. The debugger can also be activated from Ewithin a signal handler, and commands to generate a traceback can be Hgenerated directly, or through the invocation of a procedure containing a series of debugger commands.

EDetails on the debugger are in the OpenVMS Debugger Manual, and also =see the discussion of dyanmically activating the Debugger in 3Section 10.19.c

10.29 Generating an AUTODIN-II CRC32?



8The following code can be used to generate an AUTODIN-IIB32-bit Cyclic Redundency Check (CRC32) value from an input string >descriptor, similar to that used by the HP C compiler for its H/NAMES=SHORTENED mechanism, and by various other applications requiring a CRC32.

GThe routine uses the OpenVMS library routine lib$crc_table to generate Ga sixteen longword array of data from the specified encoded polynomial Ecoefficient (AUTODIN-II, in this case), and then lib$crc to generate 2the CRC32 value from the array and the input data.

 

"
?static int CreateCRC32( struct dsc$descriptor *InputDataDesc )   {   uint32 AUTODIN2;   uint32 Seed = ~0UL; &  uint32 Coefficient = 0x0EDB88320UL;   uint32 CRCArray[16];  #  lib$establish( lib$sig_to_ret );  A  lib$crc_table( (void *) &Coefficient, (void *) CRCArray ); N  AUTODIN2 = lib$crc( (void *) CRCArray, (void *) &Seed, InputDataDesc );   AUTODIN2 ^= Seed;    return AUTODIN2;   } 


X

10.30 Enabling built-in tracing?



 

"
$ RUN SYS$SYSTEM:SYSMAN =SYSMAN> SYS_LOAD ADD TR$DEBUG TR$DEBUG/LOAD_STEP=INIT/LOG SYSMAN> Exit $$ @SYS$UPDATE:VMS$SYSTEM_IMAGES.COM 




%To stop it from loading early in boot

 

"
$  RUN SYS$SYSTEM:SYSMAN 1SYSMAN> SYS_LOAD REMOVE TR$DEBUG TR$DEBUG/LOG SYSMAN> Exit $$ @SYS$UPDATE:VMS$SYSTEM_IMAGES.COM 




?The first occurance of the name TR$DEBUG within the command is Dconsidered the "product" and the second is considered the ?"image" that should exist within SYS$LOADABLE_IMAGES.

EWhen TR$DEBUG loads in the init phase, it will automatically turn on tracing.

Also see the SDA TR extension.


>

Chapter 11
DECwindows


A

If you are searching for something here, please (consider using the text-format FAQ.

z

11.1 How do I let someone else display something on my workstation?



FOn a workstation, you will want to use the "Customize" menu Eof the session manager utility and select "Security". When Dthe pop-up box appears, you can select the host node, username, and Gtranport that will allow you to launch an application that targets the workstation display.

DIf this does not provide you with access to the display, You need a checklist of sorts:

m

11.2 How do I create a display on another workstation?



HTo create a display from an OpenVMS host to a remote X Windows display, &use one of the following DCL commands:

 

"
A$ SET DISPLAY /CREATE /TRANSPORT=net_transport /NODE=remote_node 7$ SET DISPLAY /CREATE /TRANSPORT=LAT /NODE=remote_node :$ SET DISPLAY /CREATE /TRANSPORT=DECnet /NODE=remote_node 9$ SET DISPLAY /CREATE /TRANSPORT=TCPIP /NODE=remote_node 




BNote that LAT is typically used only for the VXT series X Windows Fterminals, but it can also be used from OpenVMS to OpenVMS systems on Gvarious OpenVMS releases, such as on OpenVMS Alpha V6.1 and later. For ddetails on configuring the TCP/IP transport, see Section 11.14.

?If you are interested in X Windows terminals and have an older FVAXstation system around, please see the EWS package on Freeware V5.0.z

11.3 How can I get the information from SHOW DISPLAY into a symbol?



AUse the undocumented SHOW DISPLAY/SYMBOL, and then reference the Dsymbols DECW$DISPLAY_NODE, DECW$DISPLAY_SCREEN, DECW$DISPLAY_SERVER and/or DECW$DISPLAY_TRANSPORT.

EAn example of calling the underlying (and also undocumented) sys$qio &programming interface for the WSDRIVER(WSAn:) is available at:

 

"
1- http://www.hp.com/go/openvms/freeware/  


FLook in the Freeware V4.0 directory /srh_examples/DECUS_UNDOC_CLINIC/.d

11.4 How do I get a log of a DECterm session?



HIf you are working from a DECwindows DECterm terminal emulator, you can Guse the AutoPrint feature. Choose the "Printer..." menu item Gfrom the "Options" menu, set the printing destination to the Hname of the file you want, and set "Auto Print Mode". You are now free to continue.

GIt should be noted that all of the characters and escape sequences are Gcaptured, but if you display the resulting log file on a DECterm, then 3you will see exactly what was originally displayed.

GYou can also use the "Print Screen" screen capture available Hin the DECwindows session manager menus, if you simply wish to snapshot .a particular portion of the X Windows display.

If you are using the FreewareBVTstar terminal emulator package, you will find a similar logging $mechanism is available in the menus.a

11.5 Why is DECwindows Motif not starting?



GFirst check to see if there is a graphics device, usually a G* device. H(eg: On a DEC 2000 model 300, use the command SHOW DEVICE GQ) If you do not find a graphics device:



)If there is a G* graphics device present:

g

11.6 How do I set the title on a DECterm window?



/If you are creating a new DECterm window, check

 

"
+$ HELP CREATE /TERMINAL /WINDOW_ATTRIBUTES 




?If you want to change the title of an existing window, use the Gfollowing control sequences, where [esc] is the ANSI escape Gcode, value decimal 27, and "text label" is what you want to display:

>To set the DECterm title, send the escape character, then the Echaracters "]21;", then the text label string, and then an 3escape character followed by a backslash character.

FTo set the icon label, send the escape character, then the characters A"]2L;", then the icon label string, and then an escape ,character followed by a backslash character.

HTo set both the DECterm title and icon to the full device name, you can use the following DCL commands:

 

"
$  esc[0,7] = 27 F$  fulldevnam = F$Edit(F$GetDVI("TT","FULLDEVNAM"),"UPCASE,COLLAPSE") 9$  write sys$output esc+ "]21;" + fulldevnam + esc + "\" 9$  write sys$output esc+ "]2L;" + fulldevnam + esc + "\" 




GYou can also change the title and the icon using the Options-Window... menu.

oAlso see Section 12.1 and Section 8.13.w

11.7 How do I customize DECwindows, including the login screen?



DTo customize various DECwindows Motif characteristics including the Fdefaults used by the SET DISPLAY command, the DECwindows login screen Gbackground logo used (the default is the DIGITAL, Compaq, or HP logo), various keymaps (also see Section 11.7.2 and Section 11.7.1), the BFileView defaults, session manager defaults, the DECwindows login >processing, DECwindows log file processing, and various other ,DECwindows attributes, see the example file:

 

"
/$ SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE 




DThis example template file is typically copied over to the filename DSYS$COMMON:[SYSMGR]DECW$PRIVATE_APPS_SETUP.COM and then modified to meet site-specific requirements.

GAdditionally, various X tools such as xsetroot, bitmap and xrdb---some Gthese can be useful in customizing the appearance of an application or Gof the DECwindows Motif display---are provided in the DECW$UTILS: area.

EWhen using DECwindows V1.2-4 and later on OpenVMS Alpha, the default Edesktop is the Common Desktop Environment (CDE). You can select your Hpreferred desktop (CDE or DECwindows Motif) when logging in, or you can Hchange the default to the DECwindows Motif desktop using the DCL symbol Cdecw$start_new_desktop in the DECwindows private application setup Hcommand procedure. See SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE for ?further details, and how to create DECW$PRIVATE_APPS_SETUP.COM.

GNote that with DECwindows CDE, the root window is no longer visible by -default. The root window is hidden behind theF"backdrop" window of the current CDE workspace. To make the Hroot window visible, use the CDE style manager selection "backdrop Gnone", and use information such as that in the OpenVMS FAQ to set the root window.

FTo add a new backdrop to the DECwindows CDE environment, the backdrop ?must first be in or be converted into X11 pixmap format. (This 5conversion is often possible using tools such as xv.):Then (if necessary) create the default backdrop directory DSYS$COMMON:[CDE$DEFAULTS.USER.BACKDROPS]. Place the X11 pixmap file Gcontaining the desired image into the backdrops directory, ensure that Git has a filename extension of .PM. (The xv default filename extension Efor the X11 pixmap file is .XPM, while CDE expects only to see files Gwith .PM.) Now invoke the CDE style manager and select a new backdrop. BYou will find your image will be placed at the end of the list of backdrops available.

HIf you require a message be included on the initial display---where the Gstart session display and the logo appears---you can use either of the following approaches:



AThe login logo is stored as an XPM bitmap image in the text file HSYS$SYSROOT:[SYSCOMMON.CDE$DEFAULTS.SYSTEM.APPCONFIG.ICONS.C]DECDTLOGO.PM,) and it can be changed. Copy the file to J SYS$SYSROOT:[SYSCOMMON.CDE$DEFAULTS.USER.APPCONFIG.ICONS.C]DECDTLOGO.PM, D as DECwindows upgrades can replace the system version of this file.

GOn DECwindows V1.3-1 and later (and possibly on V1.3), both DECwindows ?CDE and DECwindows Motif displays use this logo file. On older Freleases, only the DECwindows CDE displays used this logo file, while Bthe logo used for the Motif login display was hard-coded into the Fpackage and the only available override is the DECW$LOGINLOGO command 9procedure mechanism within the customized, site-specific !DECW$PRIVATE_APPS_SETUP.COM file.

GLook at the contents of the DECDTLOGO.PM file and at other *.XPM files !and tools for additional details.




 r Y \ ^  
PreviousNextContentsIndex