<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S12 / MagniV Microcontrollersのトピックppage register &amp; far pointer</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ppage-register-far-pointer/m-p/163054#M5198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;In my project &amp;nbsp;I have several files in C &amp;amp; assembler language&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I'm using a banked memory model and in an assembler file I wrote my assembler font tables.&lt;/P&gt;&lt;P&gt;Initially I din't have any problem because the fonts were in the fixed flash page.&lt;/P&gt;&lt;P&gt;But now (code increased) they are in the 31 page.&lt;/P&gt;&lt;P&gt;I need to get the right font pointer with this assembler funtion:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;GetFontPtr:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldx &amp;nbsp; &amp;nbsp;#Fnt_00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;ix* = font 0&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldy &amp;nbsp; &amp;nbsp;1,sp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;iy* = font code to use&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;cpy &amp;nbsp; &amp;nbsp;#0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;is font type N° 0 ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;beq &amp;nbsp; &amp;nbsp;GetFontPtr01&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldx &amp;nbsp; &amp;nbsp;#Fnt_01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;ix* = font 1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;GetFontPtr01:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;subd &amp;nbsp; #32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;subd space&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;lsld &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;16 bit entry&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;leax &amp;nbsp; d,x &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;load effective addres from d&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldx &amp;nbsp; &amp;nbsp;0, x ;low address&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldab &amp;nbsp; PPAGE ;high address (PPAGE)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;rtc&lt;/DIV&gt;&lt;DIV&gt;I modified the return convention and everything it's ok especially if and only if the GetFontPtr is in the same page of fonts.&lt;/DIV&gt;&lt;DIV&gt;But I want to keep my assembler function in page 30 and the font in page 31.&lt;/DIV&gt;&lt;DIV&gt;In this condition the instruction ldx 0,x get the right address, because the Fnt_00 and Fnt_01 tables are seen from linker and the address it's ok...but no PPAGE register !&lt;/DIV&gt;&lt;DIV&gt;Infact it is 30.The value where is the function and not the &amp;nbsp;fonts.Clearly I don'thave the rigt pointer.&lt;/DIV&gt;&lt;DIV&gt;Simple example: if the table font has this address 318000 from ldx 0,x I get 8000 but the ppage reg is 30 not 31 !&lt;/DIV&gt;&lt;DIV&gt;I need to know &amp;nbsp;to export the ppage value from my assembler file.&lt;/DIV&gt;&lt;DIV&gt;Is it possible in your opinion ? Or I have to write the functions in the same font file ?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I would not to do this.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Claudio&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Nov 2010 07:59:22 GMT</pubDate>
    <dc:creator>Claudione</dc:creator>
    <dc:date>2010-11-16T07:59:22Z</dc:date>
    <item>
      <title>ppage register &amp; far pointer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ppage-register-far-pointer/m-p/163054#M5198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;In my project &amp;nbsp;I have several files in C &amp;amp; assembler language&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I'm using a banked memory model and in an assembler file I wrote my assembler font tables.&lt;/P&gt;&lt;P&gt;Initially I din't have any problem because the fonts were in the fixed flash page.&lt;/P&gt;&lt;P&gt;But now (code increased) they are in the 31 page.&lt;/P&gt;&lt;P&gt;I need to get the right font pointer with this assembler funtion:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;GetFontPtr:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldx &amp;nbsp; &amp;nbsp;#Fnt_00 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;ix* = font 0&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldy &amp;nbsp; &amp;nbsp;1,sp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;iy* = font code to use&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;cpy &amp;nbsp; &amp;nbsp;#0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;is font type N° 0 ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;beq &amp;nbsp; &amp;nbsp;GetFontPtr01&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldx &amp;nbsp; &amp;nbsp;#Fnt_01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;ix* = font 1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;GetFontPtr01:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;subd &amp;nbsp; #32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&lt;/SPAN&gt;;subd space&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;lsld &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;16 bit entry&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;leax &amp;nbsp; d,x &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;load effective addres from d&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldx &amp;nbsp; &amp;nbsp;0, x ;low address&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;ldab &amp;nbsp; PPAGE ;high address (PPAGE)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;rtc&lt;/DIV&gt;&lt;DIV&gt;I modified the return convention and everything it's ok especially if and only if the GetFontPtr is in the same page of fonts.&lt;/DIV&gt;&lt;DIV&gt;But I want to keep my assembler function in page 30 and the font in page 31.&lt;/DIV&gt;&lt;DIV&gt;In this condition the instruction ldx 0,x get the right address, because the Fnt_00 and Fnt_01 tables are seen from linker and the address it's ok...but no PPAGE register !&lt;/DIV&gt;&lt;DIV&gt;Infact it is 30.The value where is the function and not the &amp;nbsp;fonts.Clearly I don'thave the rigt pointer.&lt;/DIV&gt;&lt;DIV&gt;Simple example: if the table font has this address 318000 from ldx 0,x I get 8000 but the ppage reg is 30 not 31 !&lt;/DIV&gt;&lt;DIV&gt;I need to know &amp;nbsp;to export the ppage value from my assembler file.&lt;/DIV&gt;&lt;DIV&gt;Is it possible in your opinion ? Or I have to write the functions in the same font file ?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I would not to do this.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Claudio&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 07:59:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ppage-register-far-pointer/m-p/163054#M5198</guid>
      <dc:creator>Claudione</dc:creator>
      <dc:date>2010-11-16T07:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: ppage register &amp; far pointer</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ppage-register-far-pointer/m-p/163055#M5199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only solution you have here is to&amp;nbsp;go through a function which is allocated in non-banked flash to actually access the paged data (the font pointer in your case).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cannot access a paged pointer from banked code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check how this is done in et run time libraries in module datapage.c.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 18:45:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/ppage-register-far-pointer/m-p/163055#M5199</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2010-11-16T18:45:22Z</dc:date>
    </item>
  </channel>
</rss>

