Variable sharing. Not sure how to describe this.


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Variable sharing. Not sure how to describe this.

    Maybe something like this
    Code:
    POT_ROUTINE:
    IF BUTT1 =1 THEN IOUT = 1
    IF BUTT2 = 1 THEN IOUT = 0
    POT = IOUT
    RETURN
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Variable sharing. Not sure how to describe this.

    You're going to have issues with a variable named POT since this is a PBP command, and reserved, but if you just want to alias the low byte in a word var, then use something like this;

    ADPOT VAR WORD
    IOUT VAR ADPOT.BYTE0 ' this is just an alias to the low byte in ADPOT.

    Any value you place in IOUT will be placed in ADPOT.LOWBYTE. And whatever value is in ADPOT.LOWBYTE will also be in IOUT since it's the same RAM address as the low byte in ADPOT . It's in the manual...;o)
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts