Laboratory Assignment 1 - Embedded Computer Systems | CPE 323, Assignments of Engineering

Material Type: Assignment; Professor: Milenkovic; Class: INTRO TO EMBEDDED COMPUTER SYS; Subject: Computer Engineering; University: University of Alabama - Huntsville; Term: Unknown 2005;

Typology: Assignments

Pre 2010

Uploaded on 07/22/2009

koofers-user-0jf
koofers-user-0jf 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CPE 323: Laboratory Assignment 1
Purpose: To study the 68000 instruction set and the Easy68K simulator; and
to utilize them to write M68K assembly programs.
Getting started:
To download and learn more about Easy68K visit the following Web site:
http://www.monroeccc.edu/ckelly/EASy68K.htm
Read help and become familiar with the simulator I/O operations.
An example: The example below prints a string pointed to by the register A1.
*-----------------------------------------------------------
* Program Number: 0.1
* Written by : A. Milenkovic
* Date Created : January 2005
* Description : Display a string pointed to by the register A1
*-----------------------------------------------------------
NL EQU $0A
CR EQU $0D
START ORG $1000
LEA STRG,A1 load address of STRG into A1
MOVE.W SIZE,D1 load D1 with the string size
MOVE.B #0,D0 load D0 with 0 (print string)
TRAP #15
STRG dc.b 'Hello World!',CR,NL,'Hello World (again)!',CR,NL
SIZE dc.w SIZE-STRG define the size of the string
STOP #$2000
END START
We also provide more examples at:
http://www.ece.uah.edu/~milenka/cpe421-07F/docs/m68k/examples/.
Assignment #1: Write an M68K assembly program that performs the following operations on signed
integer arrays A and B:
1: Reads in the integer arrays. Assume that sizeof(int) = 2 bytes. The maximum number of elements
in the integer arrays is 512.
2: Displays the stored arrays.
3: Sorts (in ascending order) the arrays and displays the elements of the sorted arrays.
4: Displays the resulting array C = A * B.
Your main loop of the program should provide an interface that will let the user select which one of 4
functions described above should be performed.
Assignment #2: Write an M68K assembly program that performs the following operations on a string
S.
1: Reads in the string. The string should be delimited by a NULL character ($00). The maximum
number of characters in the string is 256.
2: Displays the stored string.
3: Creates and displays a new string with all upper case letters.
Use a similar user interface to the one in the previous assignment.
Submission: Check lab submission policy at the course Web site:
http://www.ece.uah.edu/~milenka/cpe421-07F/.
CPE/EE 323 Lab Alex Milenkovich

Partial preview of the text

Download Laboratory Assignment 1 - Embedded Computer Systems | CPE 323 and more Assignments Engineering in PDF only on Docsity!

CPE 323: Laboratory Assignment 1

Purpose: To study the 68000 instruction set and the Easy68K simulator; and to utilize them to write M68K assembly programs.

Getting started : To download and learn more about Easy68K visit the following Web site: http://www.monroeccc.edu/ckelly/EASy68K.htm Read help and become familiar with the simulator I/O operations.

An example : The example below prints a string pointed to by the register A1. *-----------------------------------------------------------

  • Program Number: 0.
  • Written by : A. Milenkovic
  • Date Created : January 2005
  • Description : Display a string pointed to by the register A *----------------------------------------------------------- NL EQU $0A CR EQU $0D START ORG $ LEA STRG,A1 load address of STRG into A MOVE.W SIZE,D1 load D1 with the string size MOVE.B #0,D0 load D0 with 0 (print string) TRAP #

STRG dc.b 'Hello World!',CR,NL,'Hello World (again)!',CR,NL SIZE dc.w SIZE-STRG define the size of the string

STOP #$ END START We also provide more examples at: http://www.ece.uah.edu/~milenka/cpe421-07F/docs/m68k/examples/.

Assignment #1: Write an M68K assembly program that performs the following operations on signed integer arrays A and B: 1: Reads in the integer arrays. Assume that sizeof(int) = 2 bytes. The maximum number of elements in the integer arrays is 512. 2: Displays the stored arrays. 3: Sorts (in ascending order) the arrays and displays the elements of the sorted arrays. 4: Displays the resulting array C = A * B. Your main loop of the program should provide an interface that will let the user select which one of 4 functions described above should be performed.

Assignment #2: Write an M68K assembly program that performs the following operations on a string S. 1: Reads in the string. The string should be delimited by a NULL character ($00). The maximum number of characters in the string is 256. 2: Displays the stored string. 3: Creates and displays a new string with all upper case letters. Use a similar user interface to the one in the previous assignment.

Submission : Check lab submission policy at the course Web site: http://www.ece.uah.edu/~milenka/cpe421-07F/.

CPE/EE 323 Lab Alex Milenkovich