Hi, On 9/18/05, Sean Schouten wrote: > Looking at the last line of code where the CODE-Directive had been utilized, > I wondered if they where defining the label START as an ORG 0x00 type of > thing for later use in their code. The UDATA at the top threw me off > though... I supposed that any UDATA-Directive should be 'finished' off by a > CODE-Directive. Am I wrong thinking that? No, not really must follow this way. But it's a good idea to keep all the relevant code and RAM in the same module, right? In a big project, you might have several module (ASM) files, and I think it's a good idea to place all code with relevant UDATA together. > The thing is that my main program code is at the bottom of the source, and > usually where I put my ORG 0x00. If I where to implement the above code in > my code, would I replace the ORG 0x00 in the main program code with a simple > "Start"-label? I not sure what you mean here... but normally I will have RESET_V code 0x00000 Start: ; instructions go here goto main ; an example! > I also presumed that the UDATA-Directive that comes before the > RES-directives is a must? Not really. If your module (ASM code) don't need any RAM, then you could ignore that. > Ah, a last-minute addition to this email: MPASM is complaining that I am > using CODE and UDATA in my ASM and telling me that I can only use them when > generating an object file... Does that mean that I am not thought of as a > likable person in this absolutely MAD world? Most likely, you didn't add the linker script to your project. Have you? Best regards, -- WH Tan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist