Micah Carrick wrote: > An equate is just a way of defining constants which the compiler > will know to replace the label with the defined constant value > anywhere it sees it in the souce code. > > A Cblock actually allocates a block of RAM to store a value and > can therefore be manipulated etc. > > Is this correct? Micah: No. CBLOCK and EQU do the same thing: They assign constant values to symbols. "Allocating a block of RAM" is a meaningless concept on the PIC; CBLOCK is just a syntax that makes the assignment of consecutive values easier, and makes it simpler to go back and insert or remove symbols from the list without having to change other lines of code. This: CBLOCK 20H REG1 REG2,2 REG3 ENDC is equivalent to this: POINTER SET 20 REG1 EQU POINTER REG2 EQU REG1+1 REG3 EQU REG2+2 POINTER SET REG3+1 And this: CBLOCK REG4 REG5,4 ENDC is the same as: REG4 EQU POINTER REG5 EQU REG4+1 POINTER SET REG5+4 -Andrew === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === (but open to offers) === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist