Question: Instructions Start your programs at x 3 0 0 0 . Make sure to comment each line of code in the case of machine code

Instructions
Start your programs at x3000.
Make sure to comment each line of code in the case of machine code and have
adequate comments in case of assembly code. Use the four-column model for assembly code
1. Write a machine code program for the LC3. It should print out the letters: AZBYCXDWEVFUGTHSIRJQKPLOMN That is, print all 26 letters of the English alphabet alternating letters in ascending order, starting at A, with letters in descending order, starting with Z. Your program must use loop(s).
2. Write an assembly language program to simulate a simple guessing game. The program has stored the value n(n is a number between 0 and 9, inclusive). The program will continually ask the user to guess a number between 0 and 9(see sample
program input/output below). If your program encounters any non-digit character, the
program should output Invalid input. Invalid input should still count as a guess. You can use
in your strings (.STRINGZ) to make the prompt start on a newline. Assume that the user guesses correctly within 9 guesses.
Your program is required to include a line of code like the following:
Number .FILL #7 ; The number to guess
The line of code above should allow the user to succeed when they enter '7'.If I edit your program during grading and change 'n' to another value in the range 0 to 9,then your program should behave appropriately with the new value.
Sample Output
Guess a number from 0 to 9: 3
Your guess was too low.
Guess again: 9
Your guess was too high.
Guess again: a
Invalid input.
Guess again: 7
Correct! You took 4 guesses.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!