ECE 331 Spring 2009 Homework 7: Assembler and Memory Concepts - Prof. Andrew Mason, Assignments of Electrical and Electronics Engineering

Instructions for homework 7 in ece 331 spring 2009 course. The homework covers topics such as assembly process, pseudocode, assembler, memory types, and stack pointer. Students are required to describe the assembly process from a programming flow chart, plan an algorithm using pseudocode, understand the function of an assembler, describe the output files generated by a 68hc12 assembler, explain the dbne instruction, differentiate between various memory types, initialize the stack pointer, and write an assembly program to copy data from one memory location to another.

Typology: Assignments

Pre 2010

Uploaded on 07/28/2009

koofers-user-s0m
koofers-user-s0m 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 331 Spring 2009 Homework 7
Due Friday Mar 20 at the beginning of class.
From HW6
HW6, Problem 6: If you did not turn this in with HW6 or have a new/updated solution, include it
here, clearly indicated for the grade, and it will be graded as part of HW6.
Homework 7
1. a) Briefly describe the assembly process that is illustrated by the programming flow chart
presented in lecture.
b) If you were to plan your programming algorithm using pseudocode, where would that
occur on the programming flow chart?
2. a) Describe the function of an assembler.
b) Specify and describe the output files generated by a 68HC12 assembler.
3. Describe what the following instruction does:
DBNE B, AGAIN
4. Types of memory
a) What does it mean if memory is non-volatile?
b) What is the key difference between RAM and ROM?
c) What is the key difference between ROM and EEPROM?
d) What is the key difference between RAM and EEPROM?
e) Comparing SRAM and DRAM, describe one advantage of each relative to the other.
5. Where should the stack pointer be initialized?
6. For both questions below, assume the stack pointer contents are initially $3FF0
a) What addresses are filled by the PSHD instruction? What value is in the stack pointer after
this instruction?
b) What addresses are read from by the PULX instruction? What value is in the stack pointer
after this instruction?
7. Complete the following steps to construct a program that will copy values stored in memory
beginning at $2200 to memory locations beginning at $2400, continuing to the next memory
address until a data value of $FF is found. This must be done individually; the grader will be
watching for signs that programs have been shared between students.
a) Plan your algorithm using pseudocode. Turn in your pseudocode with this homework.
b) Write the program in assembly, assemble the code and correct any syntax errors. Include
directives to store the data below at the specified addresses. Turn in the .LST file of the final
program.
$2200 $AA
$2201 $BB
$2202 $CC
$2203 $FF
$2204 $EE
c) Use an assembly simulator to verify your code works correctly. Include in your homework
a comment about what you observed during simulation to prove your program worked
correctly.

Partial preview of the text

Download ECE 331 Spring 2009 Homework 7: Assembler and Memory Concepts - Prof. Andrew Mason and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

ECE 331 Spring 2009 Homework 7

Due Friday Mar 20 at the beginning of class.

From HW HW6, Problem 6: If you did not turn this in with HW6 or have a new/updated solution, include it here, clearly indicated for the grade , and it will be graded as part of HW6.

Homework 7

  1. a) Briefly describe the assembly process that is illustrated by the programming flow chart presented in lecture. b) If you were to plan your programming algorithm using pseudocode, where would that occur on the programming flow chart?
  2. a) Describe the function of an assembler. b) Specify and describe the output files generated by a 68HC12 assembler.
  3. Describe what the following instruction does: DBNE B, AGAIN
  4. Types of memory a) What does it mean if memory is non-volatile? b) What is the key difference between RAM and ROM? c) What is the key difference between ROM and EEPROM? d) What is the key difference between RAM and EEPROM? e) Comparing SRAM and DRAM, describe one advantage of each relative to the other.
  5. Where should the stack pointer be initialized?
  6. For both questions below, assume the stack pointer contents are initially $3FF a) What addresses are filled by the PSHD instruction? What value is in the stack pointer after this instruction? b) What addresses are read from by the PULX instruction? What value is in the stack pointer after this instruction?
  7. Complete the following steps to construct a program that will copy values stored in memory beginning at $2200 to memory locations beginning at $2400, continuing to the next memory address until a data value of $FF is found. This must be done individually; the grader will be watching for signs that programs have been shared between students. a) Plan your algorithm using pseudocode. Turn in your pseudocode with this homework. b) Write the program in assembly, assemble the code and correct any syntax errors. Include directives to store the data below at the specified addresses. Turn in the .LST file of the final program. $2200 $AA $2201 $BB $2202 $CC $2203 $FF $2204 $EE c) Use an assembly simulator to verify your code works correctly. Include in your homework a comment about what you observed during simulation to prove your program worked correctly.