Newb Page Value Expected

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

Newb Page Value Expected

跳至解决方案
856 次查看
johnnorth
Contributor II

Hi All,

  I'm very new to this and trying to create a project for the MC9S12XHZ512 chip in assembly. I have used the wizards to set this up but whenever I try to do a CALL as in "call sub_E111, #$E9" I get a Page value expected.

 

  My assembler options are "-CPUHCS12X -D__RUN_XGATE_OUT_OF_FLAS -MapFlash"

 

and linker options are -MapFlash

 

I have not changed anything else from the default except for defining my code. Is there something I need to set to enable this call?

 

Thanks

标签 (1)
1 解答
800 次查看
kef
Specialist I

Just remove the # sign.

Instead of specifying specific page number, in CW *.asm you can use the following notation

   call   foo, PAGE(foo)

and even just

   call   foo

在原帖中查看解决方案

0 项奖励
回复
4 回复数
800 次查看
johnnorth
Contributor II

Thanks. A very beginners mistake bit I have it fixed now.

Thanks

800 次查看
Monica
Senior Contributor III

John, was this helpful?

Please let us know! :smileywink:

Regards!

0 项奖励
回复
801 次查看
kef
Specialist I

Just remove the # sign.

Instead of specifying specific page number, in CW *.asm you can use the following notation

   call   foo, PAGE(foo)

and even just

   call   foo

0 项奖励
回复
800 次查看
johnnorth
Contributor II

I should note that Ive also tried adding the -mb command line flag to both the assembler and linker options for my target.  There are plenty of examples using C and these work, but I just cant get it to work when adding an asm file.

Thanks

0 项奖励
回复