new irscan and drscan commands

I need to read and write some jtag registers …

So i think we can do it using the irscan and drscan commands

Into the last revision drscan do not use the var statement …

What is the new right procedure ?

eg: to access idcode

endstate rti

irscan 0 0xe → id code instr

drscan 0 4 0 → exec id code

irscan 0 0xc → intest cmd

drscan 0 32 0 → read idcode and write (nop?)

is this right ?

it do not works … where is my error ?

… especially in chained proc. (but the init is correct and the startup id well checked …)

i need also to write to a scan_n reg. is it possible using irscan and drscan commands ?