> Hi list, > > I have managed to write this code to get the difference between two values > in RAM. > > Pos_24: ;*Move to posistion#24 > movlw d'24' ;*240Green > movwf TARG_STAT ; save > movf PRES_STAT,w ; present location > sublw d'24' > movwf DEF_STAT ; calculate setps to move > goto ExitFunction > > But can this be done easier becourse repeating this for all 24 stations > costs a lot of memory. > > Harry Can you give a little more detail as to what you're trying to do? What PIC are you using? If the same code is applied to a bunch of RAM, you can use a loop and one (or more) FSR and INDF registers. Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist