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, 23.06.2019 09:30
:you areto design the controller for alight that functions both as an ordinary light and also as a motion activated light and alarm. a.if the manual switch s is on, then the light l is on. b.besides the manual switch, there is a motion detector, m1, which activatesthis light.c.if motion is detected but the light is on anyway because s is on, only then a secondoutput a, an alarm, is turned on. d.the disable switch, d, disables the motion activated light and alarmbut leaves manual control operation of the light using switch s.(i)read the problem statement and clearly identify the inputs and outputs for the circuit you are designing. (ii)create the truth table for this system; include the light, alarm, switch, disable, and the motion sensor.(iii)draw a schematic of this system.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience.ob. add presenter's notes to each slide.oc. add a video to each slide.od. save her slide presentation to a flash drive
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
Each time you save a document, you will need to type in the file type in which it should be saved you can select the save button to save it with the same file name if it has been previously saved you will need to select the location to save the file you will need to use the save as dialog box
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
Geography, 28.08.2021 08:10
question
English, 28.08.2021 08:10
question
English, 28.08.2021 08:10
question
Mathematics, 28.08.2021 08:10
question
English, 28.08.2021 08:10
question
Computers and Technology, 28.08.2021 08:10
Questions on the website: 13722363