- the idea of
task1is to extract each letter in an8-bit registerand effectively encode it by collecting the step data value in theregister
- the idea in
task2part 1 is to find the line on which the points are located, (check if the x or y coordinates are equal) and decreasing the remaining coordinates - the idea in
task2part 2 is to call the function from part 1 and add it to a vector of distances,then increasing its address - the idea in
task2part 3 is to take an index and find out its square using eitherlooporjump, then the comparison with the element in the distance vector
- the idea of
task3is similar to that oftask1, both letters are taken from plain and key and using an algorithm resulting from thetabular matrix, add the resulting letter inenc_string.
The algorithm can be presented as follows:
- if the letter in
plain < key, it is subtracted in theascii codekey - plain and 65 is added - if the letter in
plain >key, their difference is subtracted from 26 and 65 is added. - also, an area is needed to
refreshand forget the address of the key in case the string is longer than this
- the idea of
task4is to generate the indexes corresponding to thespiral matrixby using jumps in4 areaswhere the spiral matrix is traversed (top sidearea, thenright side, thenbottom side,left sideand thenrepeat). - a
zonemust also be implemented that decreases the number of steps taken to traverse the zones, because the more the spiral progresses, the more it decreases in "dimension". - then it is taken from the address where the
key matrixis with the generated index and adding it to theletter plain, everything is put at the address where the string must be encoded.