Strictly speaking all you are doing is assigning the label "TEMPW" to the number 0x020 (32) (and so on). What you use them for (memory address, location in register space, number of coffee beans in a decagram or whatever) is totally up to you. The assembler couldn't care less as long as it is within the range required for the destination. This is a *really* subtle point and one that is important to remember because I continually see new PICmicro programmers get messed up on it. The reason why it is confusing is that most new programmers assume the assembler is a lot smarter than what it is. I'm being pedantic because of your follow up question ("I forgot to ask, is it assumed to 1 byte in memory, or is this something for each processor?"). The only thing assumed is that each label is assigned to a constant. The four labels below could be declared using: CBLOCK 0x020 TEMPW TEMPS REGA REGB ENDC or ORG 0x020 TEMPW ORG 0x021 TEMPS ORG 0x022 REGA ORG 0x023 REGB or using the equate symbols that you have specified below. In any of the cases, you can use the labels as constants, register addresses or program memory addresses. To keep the usage of the labels for different purpose separate, I use the four conventions: 1. For variable registers, I use the CBLOCK directive. Note that with the CBLOCK statement, you have the option of specifying how many the counter is incremented by (the default is one) before the next label's value is assigned. 2. For program memory address, I define the labels in the source code as I show above. 3. For numeric constants, I use the "EQU" directive as you have done. 4. For variables within conditionally assembled code, I use the "define" directive. This allows a great deal of flexibility in programming, but it is often not for the faint of heart. myke ----- Original Message ----- From: "rad0" To: Sent: Sunday, April 15, 2001 9:12 PM Subject: [pic]: beginning assembly question > what are these equate statements doing? > > Is this assigning the var labels to positions in memory or > setting aside memory space, or what? > > thanks in advance > > > ; VARIABLE DECLARATION > > TEMPW EQU 0x20 > > TEMPS EQU 0x21 > > REGA EQU TEMPS + 1 > > REGB EQU REGA + 1 > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body