Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly Programming: Lab 9 60 points Obiectives: Code and test simple logical or bit functions using assembly calls Stepl. This code uses AND operator in

image text in transcribed
Assembly Programming: Lab 9 60 points Obiectives: Code and test simple logical or bit functions using assembly calls Stepl. This code uses AND operator in assembly. The name of the assembly call is a and. It has two input parameters that are passed by value, which are unsigned integers. The AND result is returned by the function. Vary inputs and test the operation Step2. Code and test logical OR, XOR, and NOT functions as a or, a_xor, a_not functions in assembly. It is similar to Step 1. Vary inputs and test the operations Step3. This code uses BSF (Bit Scan) function in assembly. The name of the assembly cal is a_ bitscan. The first parameter is an unsigned integer and the second is a variable with pass by reference. After the call, the second parameter indicates the bit index of the first bit set in the first parameter. If a bit is set, thern the return code is zero, otherwise the return code is "1". Vary inputs and test the operation Step4. This code uses BT (Bit Test) function in assembly. The name of the assembly call is a_bittest. The first and second parameters are unsigned integers. The first parameter specifies the value of the data and the second parameter specifies the bit position to be tested. After the call, the return code indicates whether a specified bit is set or reset (1 or 0). Vary inputs and test the operation. Step5. Code and test logical shift left (a_shl), shift right (a_shr), rotate left (a rol), and rotate right (a_ ror) in assembly. Make appropriate parameters for input and output. Vary inputs and test the operations Step6. Code and test logical shift left double (a_shld), shift right double (a shrd) in assembly the second parameter is the integer value to be shifted, and the third parameter indicates number of bits to be shifted. The return code from the assembly function is zero. The assembly functions use shld and shrd assembly instructions respectively. After the shifting is done, the assembly function stores the result in first parameter. In your C program, allocate 100 bytes of memory and clear it before the assembly call is invoked. Test all operations and verify results. These operations have three input parameters. First parameter is an integer pointer to memory ry, the address of this memory is passed to the function asa Assembly Programming: Lab 9 60 points Obiectives: Code and test simple logical or bit functions using assembly calls Stepl. This code uses AND operator in assembly. The name of the assembly call is a and. It has two input parameters that are passed by value, which are unsigned integers. The AND result is returned by the function. Vary inputs and test the operation Step2. Code and test logical OR, XOR, and NOT functions as a or, a_xor, a_not functions in assembly. It is similar to Step 1. Vary inputs and test the operations Step3. This code uses BSF (Bit Scan) function in assembly. The name of the assembly cal is a_ bitscan. The first parameter is an unsigned integer and the second is a variable with pass by reference. After the call, the second parameter indicates the bit index of the first bit set in the first parameter. If a bit is set, thern the return code is zero, otherwise the return code is "1". Vary inputs and test the operation Step4. This code uses BT (Bit Test) function in assembly. The name of the assembly call is a_bittest. The first and second parameters are unsigned integers. The first parameter specifies the value of the data and the second parameter specifies the bit position to be tested. After the call, the return code indicates whether a specified bit is set or reset (1 or 0). Vary inputs and test the operation. Step5. Code and test logical shift left (a_shl), shift right (a_shr), rotate left (a rol), and rotate right (a_ ror) in assembly. Make appropriate parameters for input and output. Vary inputs and test the operations Step6. Code and test logical shift left double (a_shld), shift right double (a shrd) in assembly the second parameter is the integer value to be shifted, and the third parameter indicates number of bits to be shifted. The return code from the assembly function is zero. The assembly functions use shld and shrd assembly instructions respectively. After the shifting is done, the assembly function stores the result in first parameter. In your C program, allocate 100 bytes of memory and clear it before the assembly call is invoked. Test all operations and verify results. These operations have three input parameters. First parameter is an integer pointer to memory ry, the address of this memory is passed to the function asa

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

reading the karnaugh map the logic expresion none AB + AC chegg

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago