You are on page 1of 1

Politehnica University of Bucharest Electronics, Telecommunications and Information Technology Faculty

Microprocessors Architecture Laboratory Final Test Practice Exercises

Final test practice exercises


1. Write an x86 assembly program that calls a subprogram named maximum. This subprogram receives through the AX and BX registers two 16 bit, signed numbers and returns through the CX register their maximum. Check the correct functionality of the program using multiple input parameters values. 2. Write an x86 assembly program that passes through an array of 16 bit, unsigned integers (declared in the program) and stores into AX the number of times a certain reference value ref is found. Check the correct functionality of the program using different arrays and reference values. 3. Write an x86 assembly program that copies an array of characters (a source string) stored in the memory into another memory zone (the destination string) using the string transfer instructions. The elements will be passed through form right to left (from higher addresses to lower addresses). 4. Write an x86 assembly program that passes through an array of 8 bit, unsigned integers (declared in the program) and replaces all the values smaller than a certain reference value ref with that particular value. Check the correct functionality of the program using different arrays and reference values. 5. Write an x86 assembly program that compares two arrays composed of 8 bit signed integers. The arrays have the same length. The program should store in the BX register the number of differences found. Check the functionality for different arrays.

Other possible exercises


1. Problems similar to the fourth program in lab 4. 2. Problems similar to the first and the second programs in lab 4.

-1-

You might also like