J Burke ([log in to unmask]) wrote:
: Eureka! After sending my cry for help, and with nothing else to
: try, I started thumbing through the AIF Ref Manual. Lo and
: behold, I came upon an AIF called AIFCONVADDR which "converts
: compatability mode relative addresses to the corresponding native
: mode virtual address"!
 
 
Another possibility is to use item types 10 and 11 instead of 5 and 6
when describing a paramter as a byte or word address.  10 and 11 cause
the switch-to-NM routines to convert your 16-bit byte or word address
to a 64-bit virtual address.  5 and 6 convert your 16-bit byte or word
address to a 32-bit virtual address.
 
Of course, this doesn't help if you need to embed a virtual address within
some data structure that you are passing to a parameter of an NM routine.
Then, the best choice is the AIFCONVADDR routine.
 
An example of the calling sequence of one AIFxxxGET routine, courtesy of
the CSEQ Nugget, for AIFSYSWIDEGET is:
 
 
Procedure AIFSYSWIDEGET (
   Parm#0       : (# actual parameters)   {R26}
   status       : var    record  ;        {R25, @32 -> 32, align 32}
   aif_area     :        int32   ;        {R24}
   return_array1: anyvar int32   ;        {R23} := nil, align 32}
   return_array2: anyvar int32   ;        {SP-$0034} := nil, align 32}
   num_array_entries: var    int32   ;    {SP-$0038} := nil, align 32}
   itemnum_array: anyvar int32   ;        {SP-$003c} := nil, align 32}
   item_array   : anyvar int32   ;        {SP-$0040} := nil, align 32}
   item_status_array: anyvar int32   ;    {SP-$0044} := nil, align 32}
   search_key   : anyvar int32   ;        {SP-$0048} := nil, align 32}
   uid          :        int32   ;        {SP-$004c} := 0
   buffer_ptr   : anyvar record  )        {SP-$0050, @32 -> 64} := nil
                                          {align 32}
      extensible 10
      uncheckable_anyvar
 
Since you've apparently solved your problem, then you are probably
also remembering to pass in the "hidden" first parameter, which is the
parameter number of the last passed-in parameter.  In the example above,
the "extensible 10" means: (a) there is a hidden parameter (the
extensible count), and the caller has to pass at least 10 parameters
(excluding the extensible count)...since the routine has 11 parameters,
this means that you could omit the buffer_ptr parameter, if desired.
 
--
Stan Sieler
[log in to unmask]