I am trying to create a script to be executed in VxWorks. The script should create an output file with specific data. I would like something like the following:
saveFd = open("myoutput.txt",0x102, 0777 )
oldFd = ioGlobalStdGet(1)
ioGlobalStdSet(1, saveFd)
#I would like to use three variables
#I don't know if I should use them as environment variables
putenv("MYBUSA=0x000000")
putenv("MYBUSD=0x000000")
putenv("DATAA=0x000000")
for(i=0;i<N;i++){
#modify memory using my variables.
m getenv("MYBUSA"), 4 getenv("DATAA")
#display memory using my variables. This output should be redirected to the file.
d getenv("MYBUSB"), 4
#update variable DATAA
DATAA = DATAA + 1;
}
#recover old std output
ioGlobalStdSet(1, oldFd)
Thanks in advance.