Question: I need to make a program that does the following: Write a machine language program for the LC 3 . It should print out your
I need to make a program that does the following:
Write a machine language program for the LC It should print out your name forward
and backward. You need to only print letters of your first or last name. Your program
should NOT require user input into memory or registers. To get full credit, you must use a
loop to print the letters. Capitalize the first letter. If
Here is the code I have thus far. It currently will print P at the end repeatedly, but everything else works.
; Start at x
; Set a counterR to zero x
; Set the max R value to x
; LD RP x
; Trap x Print letter P x
; LD Rh x
; Trap x Print letter h x
; LD Ra x
; Trap x Print letter a x
; LD Rm xA
; Trap x Print letter m xB
; LD Rs xC
; Trap x Print letter s xD
; LD Ra xE
; Trap x Print letter a xF
; LD Rg x
; Trap x Print letter g x
; LD Re x
; Trap x Print letter e x
; LD Re x
; Trap x Print letter e x
; LD Rg x
; Trap x Print letter g x
; LD Ra x
; Trap x Print letter a x
; LD Rs xA
; Trap x Print letter s xB
; LD Rm xC
; Trap x Print letter m xD
; LD Ra xE
; Trap x Print letter a xF
; LD Rh x
; Trap x Print letter h x
; LD RP x
; Trap x Print letter P x
; Decrement counter by x
; Go back to checking x
; Stop x
; x x
; Letter P x x
; Letter h x x
; Letter a x xA
; Letter m xD xB
; Letter s x xC
; Letter a x xD
; Letter g x xE
; Letter e x xF
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
