User Tools

Site Tools


plato:tutor:vertical_segments

Vertical Segments

We might call the segments discussed so far “horizontal” segments (the segments move horizontally across each word). It is possible to define “vertical” seements (each of which occupies only part of a word): successive segments are found in the same position in successive words, rather than in different positions within the same word. As an example, “define segmentv,left=n51,1,30” defines vertical segments each occupying the left half of words n51, n52, n53, etc. Each segment starts in bit position 1 of each word, and each segment is 30 bits long. The right halves of the words could be specified with “define segmentv, right=n51,31,30”, whose elements begin in the 31st bit position and are 30 bits wide. An “s” can be added to denote signed segments, as with horizontal segments.

Aside from the intrinsic usefulness of this kind of segmenting of words, the simpler structure permits TUTOR to process vertical segments much faster than horizontal segments, and only slightly slower than normal whole-word variables.

You can save space with true arrays by putting the elements in vertical segments. The -define- statement looks like “define arraysegv, A(10)=n5,3,12,s”. This example defines a ten-element array, with A(1) represented by a 12-bit signed segment starting in bit position 3 of n5. It is not yet possible to define a true array in horizontal segments.

Alphanumeric to Numeric: The -compute- Command

plato/tutor/vertical_segments.txt · Last modified: 2023/08/05 18:56 by Site Administrator