ENEE 3512 Microprocessors Lab 3

Memory Organization

In this lab assignment you create variables and study how they are saved in memory.

  1. Prelab to be submitted before the beginning of the lab:
    • Create 2 byte values all greater than 100 and 2 less than -100. For each value compute its hex.
    • Create 2 word values less than -10000 and 2 greater than 30000. Compute their hex.
    • Create 4 doubleword values. Each digit in each value must be greater than 9 (e.g. AABBCCDDh).

For each value compute it’s signed decimal and unsigned decimal.

  • Determine the hex values for each character in your name. Note that there is a difference between the upper case and lower case.
  1. Create an Assembly program with the following variables:
    • str1 is a string array with first and last name, separated by a carriage return character and a line feed character. Insert enough spaces in the string so that the entire length is a multiple of 4.
    • val1 is a byte array with 2 values greater than 100 and 2 less than -100.
    • val2 is a word array with 2 values less than -10000 and 2 greater than 30000.
    • val3 is a doubleword array with 4 values with all hex digits greater than 9.
    • str2 is a string array that contains the 4 values in val3 enclosed in quotes.

Use the prelab values for val1, val2, and val3. Your main procedure should only have .STARTUP.

  1. Build the program and open it in CodeView. Note the value in DS, SS, ES before pressing F8 and after pressing F8.
  • DS = ___. After pressing F8, DS = __
  • SS = __. After pressing F8, SS = __
  • ES = ___. After pressing F8, ES =__
  1. Use SHIFT+F3 to change the memory window’s format. Find the format that most properly displays each variable. Note the format below:
  • str1:__
  • val1:__
  • val2:___
  • val3:__
  • str2:___

NAME:

  1. Find the segment:offset address of each variable and compute the 20 bit address
  • str1:__
  • val1:__
  • val2:___
  • val3:___
  • str2:___
  1. Find the segment:offset address of last element in each variable and compute the 20 bit address
  • str1:__
  • val1:__
  • val2:___
  • val3:___
  • str2:___
citation generator
citaion generator
make money online