Starting from:

$30

CSC3210 – Assignment 2 Solved

Objective: Learn memory organization/layout, data transfer concepts and instructions, direct memory access, memory allocation. 

  

Requirements: 

1.       (5 points) Implement the following expression in assembly language:  

                                                AL = (val3 + 7) - (var2 + val1) + (5/3)*7 

-          Assume that val1, val2, and val3 are 8-bit integer variables -  Initialize val1 with 12, val2 with 9, and val3 with 2 

-          You are only allowed to use 8-bit registers. 

-          Use ONLY mov, add, sub instructions whenever needed. -      Use the debugger to verify your answer. 

3. True/False 

(2.1)  The instruction, var BYTE A  

                            Stores character ‘A’ in to variable named var. 

(2.2)  The instruction, var WORD “ABC”  

stores the string ‘ABC’ in to variable named var.  

(2.3)  The instruction, var DWORD “ABCD” 

                            stores the characters ‘A’,’B’,’C’,’D’ in to variable named var.   

4. Declare a variable: 

Var1 WORD 4 DUP (5 DUP (7) ) 

                What is the total size of the array Var1? Explain your answer. 

More products