LC3 Assembly Project

Status
Not open for further replies.

anakiran

New Member
Hi,

I have a assembly programming project for mu Computer Organization Class. Can anyone help with the problem below?


Objectives:


This programming project will help you

  • to apply concepts learned in programming the LC-3 machine;
  • to write LC-3 assembly instructions to implement looping;
  • to use LC-3 Simulator to debug and execute a program.
Description:

In this programming activity, you will be writing program to prompt for and retrieve a 16-character binary string from the keyboard and count the number of 1s in the input string.

Display the count on the screen with the appropriate label. Note that the number of ones counted from the 16-character string input could be 0 – 16. Converting the numbers 0 – 9 into ASCII ‘0’– ‘9’ is fairly straightforward. You’ll need to make additional adjustments to convert the values between 10 – 16 to ‘1’ ’0’, ‘1’ ‘1’, etc.

Implement data validation to verify that the user only enters either ‘0’s or ‘1’s. Make sure you display an appropriate message for invalid input entered. Allow the user to retry and continue when this occurs.

Example: If the user entered the binary string 0101111111111010 then your program should output: Number of 1s in the input binary string: 12.
 

johnb35

Administrator
Staff member
We really don't like to see homework threads on here. If you have someone else tell you the answer, how are you gonna learn?

I'm gonna close this thread.
 
Status
Not open for further replies.
Top