PDA

View Full Version : Basic variable and @ASM command



F1CHF
- 1st February 2008, 08:37
Hello
Hope that this question is not already covered in this nice forum !
I've made some search without succes !
question:
Is there a way to "pass" a variable between a basic process
ex : TOTO var byte
and a @asm process that will get a byte from a DTMF integrated circuit
ex : get DTMF_IN ...
thanks in advance
Francois

Acetronics2
- 1st February 2008, 10:01
Hi, François

Sorry, ... but it's worse !!! ... and an example is given in the Holy Bible ( the manual ...)

see p. 180-181 $ 8.2 of the latest release ( or 177-178 of the "pbpm 304" )

Alain

F1CHF
- 1st February 2008, 10:29
Did I find the right sentence ?

All symbol names defined in a PBC program are similarly defined in
assembly, but with the name preceded with an underscore ( _ ). This
allows access to user variables, constants, and even labeled locations, in
assembly. Similarly, system variable (such as W0) names are also
preceded by underscores (such as _W0).

so my wonderfull TOTO var byte
will be known by my ASM code as _TOTO ?

life is wonderfull

RTFM you said ! you are right !
Francois

Acetronics2
- 1st February 2008, 11:23
Hi, François

Just read a bit further ... the MOST important thing is HOW to define variables that can be used either by MPasm or PbP ...

Alain

Archangel
- 2nd February 2008, 07:35
Hi F1CHF,
in your PBP directory where you store your programs (the ones you have written and compiled) there will be files with the suffix .asm and the names of those programs, open one and compare to the basic versions, and see the answer to your question. :) A great way to learn assembly too . . .
js