Question: Write a program to multiply AX by 2 6 , using shifting and additioninstructions ( HINT: 2 6 = 1 6 + 8 + 2

Write a program to multiply AX by 26, using shifting and additioninstructions (HINT: 26=16+8+2).2. Write a procedure named WriteScaled that outputs a decimal ASCIInumber with an implied decimal point. Suppose the following numberwere defined as follows, where DECIMAL_OFFSET indicates that thedecimal point must be inserted 5 positions from the right side of thenumber:DECIMAL_OFFSET=5.datadecimal_one BYTE 100123456789765When calling WriteScaled, pass the numbers offset in EDX, the numberlength in ECX, and the decimal offset in EBX. Write a test program thatpasses three numbers of different sizes to the WriteScaled procedure.3. Write a procedure that performs simple encryption of a message byrotating each plaintext byte a varying number of positions in differentdirections. For example, in the following array that represents theencryption key, a negative value indicates a rotation to the left and apositive value indicates a rotation to the right. The integer in each positionindicates the magnitude of the rotation:key BYTE -2,4,1,0,-3,5,2,-4,-4,6In other words, -2 means to rotate the byte two bits to the left, while 4means to rotate the byte four bits to the right. Your procedure should loopthrough a plaintext message and align the key to the first 10 bytes of themessage. Rotate each plaintext byte by the amount indicated by itsmatching key array value. Then, align the key to the next 10 bytes of themessage and repeat the process. Write a program that tests yourencryption procedure by calling it with a message.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!