Erik Klausen wrote: > > char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }; // fill an area with instructions > > > > main () > > { > > void (*f)() = x; // declare a function, starting at the variable x > > f(); // execute it. > > } > > Of course, a PIC programmer wouldn't think of this, since it is > impossible to execute data on a PIC. Erik: You can't execute code from the PIC's Data MEMORY SPACE, but you can certainly hand-code instructions as was done in the Pentium example you quoted... For example, the following 16C54 program will toggle pin RB0 continuously at a 50% duty cycle: PROCESSOR PIC16C54 ORG 0 X: DATA 0x506, 0xA00+$+1, 0x406, 0xA00+X MAIN: MOVLW 0xFE TRIS 6 CALL X ORG 0x1FF GOTO MAIN END -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499