Searching \ for 'CONSTANT or EQU' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=constant+equ
Search entire site for: 'CONSTANT or EQU'.

Truncated match.
PICList Thread
'CONSTANT or EQU'
2000\05\09@125310 by Martin SchŠfer

flavicon
face
Somebody out there who can explain me the difference between CONSTANT and
EQU? After assembling, the two both become constants in the Cross reference
file. The same question could be asked about the difference between VARIABLE
and SET. The Users guide says only:

EQU - an Assembler Constant

CONSTANT - Symbol Constant

What I want to do is to define a constant for a reload value of timer 1,
dependent on the frequency and perhaps some other parameters.

constant TMR1H_SUB = D'1000' * Frequency / D'4000000' / 256

TMR1H_SUB equ  D'1000' * Frequency / D'4000000' / 256

or something like this. This constant will then be used like

movlw  TMR1H_SUB
subwf  TMR1H,F

Thanks for helping


martin

;**********************************************
;**   name:      Martin Schaefer             **
;**   company:   elektronik 21 GmbH, Germany **
;**   e-mail:    spam_OUTschaeferTakeThisOuTspamelektronik21.de    **
;**********************************************

2000\05\09@131142 by Francisco Armenta

flavicon
face
Martin.

I use the EQU for assigned a memory location for a variable. and
CONSTANT for use a label otherwaise a number.

Francisco

Martin SchŠfer wrote:
{Quote hidden}

2000\05\09@133408 by Andrew Warren

face
flavicon
face
Martin SchŠfer <PICLISTspamKILLspamMITVMA.MIT.EDU> wrote:

> Somebody out there who can explain me the difference between CONSTANT
> and EQU? After assembling, the two both become constants in the Cross
> reference file.

   Martin:

   It appears that there's no functional difference between
   CONSTANT and EQU; the main difference seems to be that you can
   define multiple CONSTANTs on one line, e.g.:

       CONSTANT X=1,Y=2,Z=3

> The same question could be asked about the difference between
> VARIABLE and SET.

   Here there's DEFINITELY no functional difference, but VARIABLE
   allows you to declare a symbol without initializing it, e.g.:

       VARIABLE X,Y,Z

   is perfectly legal; X, Y, and Z can later be defined (and
   redefined) to whatever values you like.

   -Andy

> constant TMR1H_SUB = D'1000' * Frequency / D'4000000' / 256
>
> TMR1H_SUB equ  D'1000' * Frequency / D'4000000' / 256

   Either of those will work.

   -Andy


=== Andrew Warren - .....fastfwdKILLspamspam.....ix.netcom.com
=== Fast Forward Engineering - San Diego, California
=== http://www.geocities.com/SiliconValley/2499

2000\05\09@135728 by Quitt, Walter

flavicon
face
If you use an EQU to assign a memory location for a variable,
you will NOT be able to "watch" it.  That means it will NOT
show up in the "variable" list in the Show Symbols List option
of the Window menu of MPLAB.

{Original Message removed}

2000\05\09@140803 by Francisco Armenta

flavicon
face
Yes, it is true in relocable code, but in absolute code, you can "watch"
it.

Francisco

"Quitt, Walter" wrote:
>
> If you use an EQU to assign a memory location for a variable,
> you will NOT be able to "watch" it.  That means it will NOT
> show up in the "variable" list in the Show Symbols List option
> of the Window menu of MPLAB.
>
> {Original Message removed}

2000\05\09@173203 by Andrew Warren

face
flavicon
face
Quitt, Walter <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU> wrote:

> If you use an EQU to assign a memory location for a variable, you
> will NOT be able to "watch" it.  That means it will NOT show up in
> the "variable" list in the Show Symbols List option of the Window
> menu of MPLAB.

   This is demonstrably false.

   -Andy


=== Andrew Warren - fastfwdspamspam_OUTix.netcom.com
=== Fast Forward Engineering - San Diego, California
=== http://www.geocities.com/SiliconValley/2499

2000\05\09@174626 by Quitt, Walter

flavicon
face
Don't work over here.

I will show you that it doesn't.
Just come on over.  Poway isn't far from San Diego. :-)
It doesn't work with an MPLAB project using a 17C756.
If I use EQU it doesn't show on the left side of the
the Symbol List dialog box for variables.

Using the udata, udata_shr and udata_ovr directives
and res, it works just fine.

-W

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...