C166-变量和函数指定物理地址之二

按照《RENAMECLASS Compiler Directive》http://www.keil.com/support/man/docs/c166/c166_renameclass.htm

#include "variables.h"

extern void sub_000A0();

#pragma HLARGE
#pragma RENAMECLASS(FCODE=FCODE1)
int sub_00000(int a,int b)
{
int c;

sub_000A0();
c = a+b;
return c;
}

#include "variables.h"

#pragma HLARGE
#pragma RENAMECLASS(FCODE=FCODE1)
void sub_000A0()
{
printf("hello\n");
}

void main (void) { /* execution starts here */
c = sub_00000(a,b);

}

猜你喜欢

转载自www.cnblogs.com/xihong2014/p/9695944.html