Skip to main content
Visitor II
September 23, 2003
Question

PCL, PCH

  • September 23, 2003
  • 2 replies
  • 833 views
Posted on September 23, 2003 at 09:07

PCL, PCH

    This topic has been closed for replies.

    2 replies

    rob2Author
    Visitor II
    September 22, 2003
    Posted on September 22, 2003 at 14:54

    I am trying to get the entry point for a subroutine and store it in memory. My first try was to have the subroutine store the program counter upon its first entry (of course subtracting off for the load commands).

    But, the assembler does not recognize PCL or PCH. In trying to put these into my include file, I cannot find the hardware addresses of the PC.

    A) what are the hardware addresses of the PC?

    B) is there an easier way of doing this (like having the linker place the address in a given ROM location)?

    Thanks

    Visitor II
    September 23, 2003
    Posted on September 23, 2003 at 09:07

    Hi,

    You can not directly access the PC.

    When you declare a label, such as a routine label, that can be used as a value within your code - just the same as when you create a table.

    Hope this helps - if not, please give more detail of how you wish to use this address?

    Simon