sets scratchpad values: n to n-1, interchanges f and a

setvar1(&n,&i,&a,&f);