Let me try put things in the way it was originally intended by the design.
Suppose 32 is stored in a word on the disk by xfs interface, I assume that it is stored as 32\n. Am I right?
(If that is not so, then having a load --num option could be added!).
What I said above \seems to be the correct representation. That is because the machine stores everything as strings. (XSM is a string machine).
So, the number 32 must be seen as the string "32\n" by the machine.
Now, arithmetic instructions must operate on strings interpreting the argument strings as \n terminated numbers.
For instance, if R_0 contains "2\n" and R_1 contains "3\n", then ADD R_0,R_1 should put "5\n" into R_0.
There is no confusion here because the operator ADD is not overloaded. ADD is defined only in this way.
(If the arguments are not of the form NUM\n, NUM\n, the machine must throw exception).
By definition, a string is a sequence of characters that ends on \n. (If a string in a file that is being loaded is too long - like "abcdefghijklmnop\n"
then, the --load instruction of the xfs interface will be forced to either truncate the string and load it as "abcdefghi\n" or
split it into two strings and load it as two consecutive words "abcdefg\n" and "jklmnop\n". I think the latter convention is is being followed now.
(That is, cut the string at the appropriate length cut off and write the remaining as a next string).
Now, if a file contains 32\n 55\n 66\n 77\n, then the file should be properly treated as a file containing integers for the arithmetic operations.
Now, where exactly things are failing? Is the present system working according to the above specification?
1. If we create a text file in Unix, 32\n 44\n 55\n 66\n won't xfsinterface load it correctly?
2. If we wish to provide the user a support to create her/his file as 32 44 55 66 then we can provide a load --num option.
Murali