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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,425 次查看
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

标签 (1)
0 项奖励
回复
1 解答
1,218 次查看
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 项奖励
回复
1 回复
1,219 次查看
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 项奖励
回复