subject

Add to the end of user_echo. asm. Enable the program to read an ASCII character from the keyboard (using TRAP_GETC) and output it to the ASCII display (using TRAP_PUTC). Repeat this process in a loop until the user presses the key. Consider which type of loop is appropriate (for, while, do-while). As an aside, the process of taking in a key and displaying right back to a user is known as "echoing" their keystroke. Make certain to test your code BEFORE starting problem #2. ;;; The following code will output "Type Here>" on the ASCII display
;;; then it will then read one character from the keyboard
;;; and output it back to the display
;;; HINT: you could simplify this with a directive called ".STRINGZ" - see your textbook!
CONST R0, x54 ; ASCII code for T
TRAP x01 ; this calls "TRAP_PUTC" in os. asm
CONST R0, x79 ; ASCII code for y
TRAP x01
CONST R0, x70 ; ASCII code for p
TRAP x01
CONST R0, x65 ; ASCII code for e
TRAP x01
CONST R0, x20 ; ASCII code for space
TRAP x01
CONST R0, x48 ; ASCII code for H
TRAP x01
CONST R0, x65 ; ASCII code for e
TRAP x01
CONST R0, x72 ; ASCII code for r
TRAP x01
CONST R0, x65 ; ASCII code for e
TRAP x01
CONST R0, x3E ; ASCII code for >
TRAP x01
;; To-Do
;; add code to "loop" reading characters from keyboard and outputting them to display
;; until the "enter" key is pressed
;; pseudocode of algorithm you must implement for problem #1
;; ;; loop until (R0 == enter)
;; read character from keyboard into R0 using TRAP_GETC
;; write character from R0 to ASCII display using TRAP_PUTC
;; repeat loop...
;; loop_end
END

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Why might you chose to crest a function resume
Answers: 1
You know the right answer?
Add to the end of user_echo. asm. Enable the program to read an ASCII character from the keyboard (u...
Questions
question
English, 05.01.2021 20:10
question
Mathematics, 05.01.2021 20:10
question
Mathematics, 05.01.2021 20:10
question
Mathematics, 05.01.2021 20:10
Questions on the website: 13722367