LC-3 Assembly: Hex Sum & Fibonacci Programming Assignments, Slides of Computer Science

Two lc-3 assembly language programming assignments. The first assignment requires writing and testing a program to calculate and print the sum of two double-digit hexadecimal numbers entered from the console. The second assignment involves writing and testing a program to calculate and print all fibonacci series numbers that can be stored in lc-3 words. Hints and instructions for each assignment, along with expected outputs.

Typology: Slides

2012/2013

Uploaded on 04/30/2013

ekaan
ekaan 🇮🇳

4.5

(4)

54 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
HW 7:
1) Write and test an LC-3 assembly language program to calculate and print on the
console, the sum of two double digit hexidecimal numbers entered from the
console.
Show:
- A clear and complete Flow Diagram
A snapshot of your well commented Assembly program in the LC-3
Editor Window with the Assembly response.
A snapshot of the Simulator execution and the Console Display
Window with the input and output displayed.
2) Write and test an LC-3 assembly language program to calculate and print all the
numbers in the Fibonacci series that can be stored in words of the LC-3. The
program should stop when it determines it has found the largest number.
You can print out the values in hexadecimal rather than decimal to simplify your
output algorithm. Hint: Testing for sign and shifting left, four times will
identify the four bits of one hex character. Convert the character to ASCII
and print it. Repeat this three more times to print the four hex characters of
one number.
Show:
- A clear and complete Flow Diagram
A snapshot of your well commented Assembly program in the LC-3
Editor Window with the Assembly response.
A snapshot of the Simulator execution and the Console Display
Window with the Fibonacci numbers displayed.
Docsity.com

Partial preview of the text

Download LC-3 Assembly: Hex Sum & Fibonacci Programming Assignments and more Slides Computer Science in PDF only on Docsity!

HW 7:

  1. Write and test an LC-3 assembly language program to calculate and print on the console, the sum of two double digit hexidecimal numbers entered from the console.

Show:

  • A clear and complete Flow Diagram
  • A snapshot of your well commented Assembly program in the LC- Editor Window with the Assembly response.
  • A snapshot of the Simulator execution and the Console Display Window with the input and output displayed.
  1. Write and test an LC-3 assembly language program to calculate and print all the numbers in the Fibonacci series that can be stored in words of the LC-3. The program should stop when it determines it has found the largest number.

You can print out the values in hexadecimal rather than decimal to simplify your output algorithm. Hint: Testing for sign and shifting left, four times will identify the four bits of one hex character. Convert the character to ASCII and print it. Repeat this three more times to print the four hex characters of one number.

Show:

  • A clear and complete Flow Diagram
  • A snapshot of your well commented Assembly program in the LC- Editor Window with the Assembly response.
  • A snapshot of the Simulator execution and the Console Display Window with the Fibonacci numbers displayed.

Docsity.com