PDA

View Full Version : Anomalies?



RichardBowser
- 4th July 2006, 10:17
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?

Darrel Taylor
- 4th July 2006, 11:31
Hi Richard,

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


MyVar VAR BYTE

@ movwf _MyVar,F


MyVar VAR BYTE SYSTEM

@ movwf MyVar,F