Shop OBEX P1 Docs P2 Docs Learn Events
How do I use the DW directive? — Parallax Forums

How do I use the DW directive?

Kenneth KramerKenneth Kramer Posts: 11
edited 2004-11-12 09:19 in General Discussion
Hi,

where do I place the DW directive in my source code, and how do I retrieve data·defined by this directive?

TIA,
Kenneth

Comments

  • BeanBean Posts: 8,129
    edited 2004-11-12 00:38
    You can use the DW directive anywhere as long as it is NOT in the execution path.

    Use IREAD to get the data into your program.

    Bean.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2004-11-12 09:19
    Keneth,

    The DW directive only works in the code section, i.e. the DW directive should only be placed· after an ORG that references program memory. Please
    find attached, a snippet from my SX book, where I explain DW and the IREAD instruction.

    I hope that this makes clear how the DW directive works, and how you can retrieve data defined with DW directives.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,


    Günther
    pdf
    59K
    DW.pdf 58.7K
Sign In or Register to comment.