Computer Organization and Assembly Language Process | CEG 320, Assignments of Computer Architecture and Organization

Material Type: Assignment; Class: Computer Organization; Subject: Computer Engineering; University: Wright State University-Main Campus; Term: Fall 2004;

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-5v4
koofers-user-5v4 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The Symbol Table
1. Consider the following assembler directives when answering the following questions:
a. What is the the value of VAR1 in the symbol table?
$002000
b. What is the value of ARRAY1 in the symbol table?
$002002
c. What is the value of COUNT in the symbol table?
5
d. What is the value of VAR2 in the symbol table?
$002008
e. What does the affected memory look like, starting at address $002000?
CEG 320/520: Computer Organization and Assembly Language Programming
Fall, 2004
Homework: Assembler Directives and the Symbol Table - Solution updated 9-13-04
ORG $002000
VAR1 DC.W 35
ARRAY1 DS.W 3
COUNT EQU 5
VAR2 DC.L 20
Address Contents
$002000 $0023 (VAR1)
$002002 ? (ARRAY1)
$002004 ? (ARRAY1)
$002006 ? (ARRAY1)
$002008 $0000 (VAR2)
$00200A $0014 (VAR2)
$00200C XXXX (unused)
pf2

Partial preview of the text

Download Computer Organization and Assembly Language Process | CEG 320 and more Assignments Computer Architecture and Organization in PDF only on Docsity!

The Symbol Table

  1. Consider the following assembler directives when answering the following questions:

a. What is the the value of VAR1 in the symbol table?

b. What is the value of ARRAY1 in the symbol table?

c. What is the value of COUNT in the symbol table?

d. What is the value of VAR2 in the symbol table?

e. What does the affected memory look like, starting at address $002000?

CEG 320/520: Computer Organization and Assembly Language Programming

Fall, 2004 Homework: Assembler Directives and the Symbol Table - Solution updated 9-13-

ORG $

VAR1 DC.W 35

ARRAY1 DS.W 3

COUNT EQU 5

VAR2 DC.L 20

Address Contents $002000 $0023 (VAR1) $002002_? (ARRAY1)_ $002004_? (ARRAY1)_ $002006_? (ARRAY1)_ $002008 $0000 (VAR2) $00200A $0014 (VAR2) $00200C XXXX (unused)

Homework: Assembler Directives and the Symbol Table

Consider the assembler directives on the previous page and your answers to the previous questions when answering the following questions. Assume that D1 was cleared before each instruction.

2. MOVE.W VAR1, D

3. MOVE.L #ARRAY1, D

4. MOVE.L VAR2, D

5. MOVE.L #VAR2, D

6. MOVE.W #COUNT, D

a. After the second pass of the assembler, what does the above instruction look like (in assembly code)?

MOVE.W $002000, D

b. What are the contents of D1 after the above instruction is executed?

D1: $0000 0023

a. After the second pass of the assembler, what does the above instruction look like (in assembly code)?

MOVE.L #$002002, D

b. What are the contents of D1 after the above instruction is executed?

D1: $0000 2002

a. After the second pass of the assembler, what does the above instruction look like (in assembly code)?

MOVE.L $002008, D

b. What are the contents of D1 after the above instruction is executed?

D1: $0000 0014

a. After the second pass of the assembler, what does the above instruction look like (in assembly code)?

MOVE.L #$002008, D

b. What are the contents of D1 after the above instruction is executed?

D1: $0000 2008

a. After the second pass of the assembler, what does the above instruction look like (in assembly code)?

MOVE.W #5, D

b. What are the contents of D1 after the above instruction is executed?

D1: $0000 0005