FREDRIK HULDTGREN wrote : > It doesnt seem as if we are able to change TOS on our 18F458 PIC. When > the following code has been done, the right numbers havent been placed > on TOS. How do you know ? > temp =26; > _asm movf temp,0,1 _endasm > _asm movwf TOSL,1 _endasm This doesn't look as assembler, what tool are you using ? > It doesnt work for TOSU,TOSL,or TOSH. > We've included the p18f458.h file. Can not see it... > Any clues as to what we are doing wrong? What *are* you trying to do ? That is, why do you need to updat the stack pointer ? Since this *looks* like some HLL, I'd expect the stack pointer to move around in a rather uncontrollered way, only known to the "inside" of the actual compiler in use. Are you sure that the _asm end _endasm compiler directives (?) doesn't change the TOS themselfs ? Tell us a bit more about what you are trying to do, and why you need to do it that way, and everything will probably be easier to understand and to answer. Jan-Erik. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body