integer*4 ext,data,q,status
call caopen("myserver",status)
call cdreg(ext,0,1,3,0) ! point to register
call cfsa(0,ext,data,q)
if (q.ne.0) type *, "bad q at cnaf=1,3,0,0:",q
call cfsa(16,ext,1234,q) ! write 1234 to register
call cfsa(0,ext,data,q)
if (data.ne.1234) then
type *, "bad compare: wrote 1234, read",data
endif