HC12XE: how to call _CONV_LOGICAL_TO_GLOBAL asm routine from c++ programming

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HC12XE: how to call _CONV_LOGICAL_TO_GLOBAL asm routine from c++ programming

Jump to solution
567 Views
precisionman
Contributor I

hi,

I want to use _CONV_LOGICAL_TO_GLOBAL asm routine and call it from c++. How do I pass the PPAGE and local address and how to store global address from the routine to a variable?
Thx. Tim

Labels (1)
0 Kudos
1 Solution
360 Views
kef
Specialist I

You don't need to call this routine directly. Compiler calls it when required. Try disassembling code below

int * nptr;            // near pointer to int
int * far fptr;        // global pointer to int
int * __rptr rptr;   // RPAGE pointer to int

void main(void) {
  /* put your own code here */
 

   fptr = nptr;               // _CONV_NEAR_TO_GLOBAL
   fptr = rptr;               // _CONV_LOGICAL_TO_GLOBAL

}

View solution in original post

0 Kudos
1 Reply
361 Views
kef
Specialist I

You don't need to call this routine directly. Compiler calls it when required. Try disassembling code below

int * nptr;            // near pointer to int
int * far fptr;        // global pointer to int
int * __rptr rptr;   // RPAGE pointer to int

void main(void) {
  /* put your own code here */
 

   fptr = nptr;               // _CONV_NEAR_TO_GLOBAL
   fptr = rptr;               // _CONV_LOGICAL_TO_GLOBAL

}

0 Kudos