Anomalies?


Closed Thread
Results 1 to 2 of 2

Thread: Anomalies?

  1. #1
    RichardBowser's Avatar
    RichardBowser Guest

    Post Anomalies?

    Hi folks

    I am just starting an investigation of some seeming ‘anomalies’ I’ve encountered while trying to mix assembler with BASIC code under PBP. I’ve noticed there seem to be things you can do in BASIC that you just cannot do in assembler. For example, I can declare ‘MyVar VAR BYTE bankA system’, and it compiles fine. I can read MyVar & write it to my heart's content <u>in BASIC</u>. But if I try to access it in assembler (‘movwf _MyVar,F’), I get an error message telling me that _MyVar is <i>undefined</i>. Yet if I remove the phrase “bankA system”, I can read and/or write _MyVar <u>perfectly</u>.

    Have you experienced folks had success in accessing such variables in assembler, or is this just an aberration peculiar to me?

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Richard,

    When using the SYSTEM modifier, you don't need to use the underscore before the variable name.

    Code:
    MyVar  VAR  BYTE 
    
    @    movwf  _MyVar,F
    Code:
    MyVar  VAR  BYTE SYSTEM
    
    @    movwf   MyVar,F
    DT

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