Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, jennifer7037
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, gamingisfun
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
image
Computers and Technology, 23.06.2019 19:00, jacobbecker99
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u. s. 483 (1954). b. international shoe co. v. washington, 326 u. s. 310 (1945) c. haynes v. gore, 531 u. s. 98 (2000). d. international shoe co. v. washington, 14 u. s. code 336.
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, RG1971
(, urgent need): how do i change my username
Answers: 1
Do you know the correct answer?
Add to the end of user_echo. asm. Enable the program to read an ASCII character from the keyboard (u...

Questions in other subjects: