[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::lat

Title:LAT notes conference
Notice:To reset your notebook -> SET SEEN/BEFORE=13-OCT-1992:01:00
Moderator:STAR::KOJNOK
Created:Mon Mar 10 1986
Last Modified:Fri May 23 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:4961
Total number of notes:19526

4960.0. "Porting problem VAX to ALPHA VMS in PASCAL" by SIOG::BRENNAN_M (Drink Canada dry-when do we start) Mon May 19 1997 13:14

    One of my customers here is converting his application from VAX to
    ALPHA. The program is written in PASCAL.
    
    
    He is having problems with the LAT SETMODE function. A small example of
    this is give here:
    
  LAT_MAP_ITEMLIST = RECORD
    node_func : WORD;
    node_len  : WORD;
    node_addr : INTEGER;
    (*node_term : INTEGER;*)
    port_func : WORD;
    port_len  : WORD;
    port_addr : INTEGER;
    (*port_term : INTEGER;*)
    link_func : WORD;
    link_len  : WORD;
    link_addr : INTEGER;
    (*link_term : INTEGER;*)
    term      : INTEGER;
  END;

VAR 
  rc : UNSIGNED;
  func : P_STR_10;
  err_msg : P_STR_80;
  iosb : IOSB_STR;
  item_list : LAT_MAP_ITEMLIST;
  item_list_size : WORD;

BEGIN

  func := 'MAP_PORT  ';
  err_msg := ZERO;

  item_list_size := SIZE( item_list );

  item_list.node_len := UB1;                   
  item_list.node_func := LAT$_ITM_TARGET_NODE_NAME;
(*  item_list.node_func := IO$M_LT_MAP_NODNAM;*)
(*  item_list.node_func := 1;*)
  item_list.node_addr := IADDRESS( node );
(*  item_list.node_term := 0;*)

  item_list.port_len := UB2;
  item_list.port_func := LAT$_ITM_TARGET_PORT_NAME;
(*  item_list.port_func := IO$M_LT_MAP_PORNAM;*)
(*  item_list.port_func := 2;*)
  item_list.port_addr := IADDRESS( port );
(*  item_list.port_term := 0;*)

  item_list.link_len := UB3;
  item_list.link_func := LAT$_ITM_TARGET_SERVICE_NAME;
(*  item_list.link_func := IO$M_LT_MAP_LNKNAM;*)
(*  item_list.link_func := 4;*)
  item_list.link_addr := IADDRESS( lat_link );
(*  item_list.link_term := 0;*)

  item_list.term := 0;

(*
               FUNC := %IMMED (IO$_TTY_PORT + IO$M_LT_MAP_PORT),
               P3   := %IMMED ( LAT$C_ENT_PORT + LAT$C_ENTS_UNK )
*)
  rc := $QIOW( 
               CHAN := %IMMED port_chan,
               FUNC := %IMMED (IO$_TTY_PORT + IO$M_LT_SETMODE),
               IOSB := %REF iosb,
               P1   := %REF item_list,
               P2   := %IMMED item_list_size,
               P3   := %IMMED ( LAT$C_ENT_PORT + ( LAT$C_ENTS_UNK * 65536 ) )
             );

  IF rc <> SS$_NORMAL THEN
    rpt_err( func, 1, sys_err, rc, err_msg );

  rc := iosb.cond;

  IF rc <> SS$_NORMAL THEN
    rpt_err( func, 2, sys_err, rc, err_msg );

  lat_map_port := rc;

END;
    
    
    	The IOSB from the IO$M_LT_SETMODE is giving "BAD PArameter Value".
    The program works on the VAX.
    
    Anyone any ideas on this?
    
    Martin Brennan
    
T.RTitleUserPersonal
Name
DateLines
4960.1Try Asking in TURRIS::PASCAL...XDELTA::HOFFMANSteve, OpenVMS EngineeringMon May 19 1997 14:4326
:    One of my customers here is converting his application from VAX to
:    ALPHA. The program is written in PASCAL.

   Assuming the call syntax is correct for OpenVMS Alpha, you'll probably
   want to ask the Pascal folks (TURRIS::PASCAL) for assistance -- this
   problem is probably due to an OpenVMS Alpha difference somewhere in
   the Pascal compiler, and you'll want someone more Pascal-literate to
   check through this code.
    
:    	The IOSB from the IO$M_LT_SETMODE is giving "BAD PArameter Value".
:    The program works on the VAX.

   I'd -- of course -- verify that the code works on OpenVMS VAX...
   (I've learned to confirm these sorts of customer statements.  :-)

...
:    Anyone any ideas on this?

   I'd use the debugger, and look at the raw data structures passed into
   the sys$qio[w] call -- I'd look for any padding the compiler places
   into the data structures, as this padding can throw off system calls.
   And of course, I'd verify the itemcodes values and such, as well.
   (Data structure padding is one of those areas where VAX compilers
   tend to differ from Alpha compilers -- Alpha compilers tend to use
   "natural alignment", where VAX compilers tend to use byte-alignment.)