On January 5, 2006 07:27 pm, Sean Schouten wrote: > > Res only works in relocatable code have to use a linker file etc. > > I'm sure Olin will be all over me but to attempt to understand > > assembler absolute code is easyer. Actually, it also works in the older DOS mpasm, so it's not as recent you think. ;-) Other processors may have different terminologies, for example motorola used rmb, so this instruction has been around quite a while now. > Hmmm, I am missing the linker-file so I guess that that's where I > screw up. I need to learn more about relocatable programming and > linker-scripts. Anyhow, it's high time for me to say goodnight; I > will try the absolute aproach to see if it does work for me tomorrow. relocatable programming is a bit harder to learn at 1st, but better in the long run and works fine in MPlab or MPASM. Because you are starting-out, you can cheat by using the 0x20 suggested by someone, but instead of equ, what you do is "org" so that you can use "res", like this: org 0x20 ;"hard-coded" start of ram area TEMP_VAL res 1 ;temporary value 1 location @0x20 TEMP_VAL2 res 1 ;2nd temp val @0x21 TEMP_VAL_BIG res 4 ;this is a large temp val @0x22 TMP_VAL4 res 1 ;another value @0x26 I would suggest compiling the above as part of your code and showing a list file. That should help you get an idea about the res mneumonic. You'll note that if you want to access the large value TEMP_VAL_BIG above, you can access it like this: movf TEMP_VAL_BIG,W movf TEMP_VAL_BIG+1,W movf TEMP_VAL_BIG+2,W movf TEMP_VAL_BIG+3,W -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist