You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation for the offsetlen instruction left me unsure whether it shifts the source data or not. testoffsetlen.tasm was uninstructive as its test data is uniform. I assumed it shifts because of the "offset" in the name, but output from my tests seems to indicate it truncates. I'm wondering, is it meant to shift, or shall I correct the documentation?
here's my intended documentation:
"offsetlen"
-0-++0
defines a masking window, only trits visible
through the window are written to the destination.
usage:
offsetlen|A,B,C
if A is "off", the remaining trits in the destination are preserved.
if it is "on", they are overwritten with 0.
B is the offset for the window's low-value edge (the right side).
C is the size of the window, the length extending toward high values.
affected operations are read and write to IO and memory.
the window remains active until reset with "offsetlen|off,0,9".
see also: romread* setdata IOread* IOwrite*
The users manual has information on this on page 28
so essentially what it does is act like a sort of mask.
i.e. if i have a value in ram, say: +0+---++0
and i set offsetlength as such:
tasm: offsetlen|off,1,1
and i have register 1 set to ---------
then i copy that memory value to register 1 and we now have register 1 as:
-------+-
Documentation for the offsetlen instruction left me unsure whether it shifts the source data or not. testoffsetlen.tasm was uninstructive as its test data is uniform. I assumed it shifts because of the "offset" in the name, but output from my tests seems to indicate it truncates. I'm wondering, is it meant to shift, or shall I correct the documentation?
here's my intended documentation:
test code:
https://github.com/eekee/SBCTVM_Mk2_VMUSER/blob/master/offsetlen.tasm
https://github.com/eekee/SBCTVM_Mk2_VMUSER/blob/master/offsetlen.tasm
The text was updated successfully, but these errors were encountered: