Menu

[Solved] 2 Starting Code Problem Named Prob2startbin Complete Code Indicated Comments Exactly 9 Ins Q37221343

Please show your works. thank you.
2. There is starting code for this problem; its named prob2start.bin. Complete this code as indicated in the comments. ThereLC3Edit- prob2start File Edit Translate Help x3000, starting address for this code 9011 8008 0088 0000 ; Hidden in the code o2. There is starting code for this problem; its named prob2start.bin. Complete this code as indicated in the comments. There are exactly 9 instructions for you to write. All the different load instructions (LD, LDR, LDI, LEA) are included so you can see how they differ. Don’t write any additional instructions. Don’t modify or add to the data that follows the final trap instruction. You must write the instructions indicated. If it says LDR, you need an LDR instruction. Change the file name to LastName2.bin but using your LastName. LC3Edit- prob2start File Edit Translate Help x3000, starting address for this code 9011 8008 0088 0000 ; Hidden in the code of the LC3 “Operating Systen”, there ; is a subroutine that lets the user input a charcter fron the keyboard. That subroutine first prints out a pronpt, ; nanely “Input a character” e don’t care nuch about the subroutine and ill not call it, but you will be working with the ; string and to get started, the string’s address (0x4c9) has been stored in a location just after the HALT instruction belou. When you finish the following code and run it, ; it should print out: Input a character>IaUW ; This is actually nade up of h separate prints: Input a character) – UW ; but the four strings will appear all on the sane line. ; 1) Print out the “Input a character” string using its address stored below LD ; TRAP, PUTS x22, address of string nust be in R9 ; 2) Now print out just the first letter of that string LDI ; TRAP, OUT x21, letter to print nust be in Re ; 3) Now print out just the seventh letter of that string LD LDR ; TRAP, OUT x21, letter to print nust be in Re ) Print out the :LEA string uhich is stored belou ; TRAP, PUTS x22, address of string nust be in R8 1111 9000 9810 011TRAP, HALT x25 0089 0180 1100 1901×9, address of a string Show transcribed image text 2. There is starting code for this problem; its named prob2start.bin. Complete this code as indicated in the comments. There are exactly 9 instructions for you to write. All the different load instructions (LD, LDR, LDI, LEA) are included so you can see how they differ. Don’t write any additional instructions. Don’t modify or add to the data that follows the final trap instruction. You must write the instructions indicated. If it says LDR, you need an LDR instruction. Change the file name to LastName2.bin but using your LastName.
LC3Edit- prob2start File Edit Translate Help x3000, starting address for this code 9011 8008 0088 0000 ; Hidden in the code of the LC3 “Operating Systen”, there ; is a subroutine that lets the user input a charcter fron the keyboard. That subroutine first prints out a pronpt, ; nanely “Input a character” e don’t care nuch about the subroutine and ill not call it, but you will be working with the ; string and to get started, the string’s address (0x4c9) has been stored in a location just after the HALT instruction belou. When you finish the following code and run it, ; it should print out: Input a character>IaUW ; This is actually nade up of h separate prints: Input a character) – UW ; but the four strings will appear all on the sane line. ; 1) Print out the “Input a character” string using its address stored below LD ; TRAP, PUTS x22, address of string nust be in R9 ; 2) Now print out just the first letter of that string LDI ; TRAP, OUT x21, letter to print nust be in Re ; 3) Now print out just the seventh letter of that string LD LDR ; TRAP, OUT x21, letter to print nust be in Re ) Print out the :LEA string uhich is stored belou ; TRAP, PUTS x22, address of string nust be in R8 1111 9000 9810 011TRAP, HALT x25 0089 0180 1100 1901×9, address of a string

Expert Answer


Answer to 2. There is starting code for this problem; its named prob2start.bin. Complete this code as indicated in the comments. T… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *