For this you will need to add code where it says write your code here. None of the other files need to be changed just the one that needs you to write the code in it. In the image below will be instructions of what your code needs. You do not need to d all of the bulletin do what you can maybe the first 2 or 3 bulletins will be okay. Pls help me out with this and write your code in assembly language, you can use lc3 simulator to write your code and test it! Thank you! main file: .ORIG x3000 TRAP x40 ST R0, FIRST_ADDRESS TRAP x40 ST R0, LAST_ADDRESS LD R0, FIRST_ADDRESS LD R1, LAST_ADDRESS TRAP x41 HALT FIRST_ADDRESS .BLKW #1 LAST_ADDRESS .BLKW #1 .END   trap_vector_output file: .ORIG x0041 .FILL x5000 .END     trap_vector_input file: .ORIG x0040 .FILL x4000 .END     trap_input file: .ORIG x4000 ;WRITE YOUR CODE HERE RET .END

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

For this you will need to add code where it says write your code here. None of the other files need to be changed just the one that needs you to write the code in it. In the image below will be instructions of what your code needs. You do not need to d all of the bulletin do what you can maybe the first 2 or 3 bulletins will be okay. Pls help me out with this and write your code in assembly language, you can use lc3 simulator to write your code and test it! Thank you!

main file:

.ORIG x3000
TRAP x40
ST R0, FIRST_ADDRESS

TRAP x40
ST R0, LAST_ADDRESS

LD R0, FIRST_ADDRESS
LD R1, LAST_ADDRESS

TRAP x41

HALT

FIRST_ADDRESS .BLKW #1
LAST_ADDRESS .BLKW #1

.END

 

trap_vector_output file:

.ORIG x0041
.FILL x5000
.END

 

 

trap_vector_input file:

.ORIG x0040
.FILL x4000
.END

 

 

trap_input file:

.ORIG x4000
;WRITE YOUR CODE HERE
RET
.END

Enter starting memory address:
x3000
Enter ending memory address:
x3003
Memory contents x3000 to x3003:
x3000 XF030
x3001 XB006
x3002 XF040
x3003 XB005
Example execution of the Memory Dump routine
Transcribed Image Text:Enter starting memory address: x3000 Enter ending memory address: x3003 Memory contents x3000 to x3003: x3000 XF030 x3001 XB006 x3002 XF040 x3003 XB005 Example execution of the Memory Dump routine
To implement trap_input.asm you must do the following:
You must read a users input of "x####" where the #'s are hex digits
Once you have the 4 hex digits you must store the hex values in RO
For example: if user types the ASCII characters "xA1B5" then at the end of your TRAP call RO
must contain the value "xA1B5"
NOTE: This is very tricky! For example the ASCII value "A" will be read from the keyboard in HEX
as "x0041", somehow you must convert this to "x000A". Also, the ASCII value "0" will be read
from the keyboard in HEX as "x0030"
So if the user enters "xA1B5" 5 different values will be read in this order:
X0078
x0041
x0031
x0042
x0035
x000A
After all these inputs RO must read:
XA1B5
This TRAP call should function properly even after being called multiple times, you will need to
call this TRAP function at least twice to complete this lab (to get your starting and ending
Transcribed Image Text:To implement trap_input.asm you must do the following: You must read a users input of "x####" where the #'s are hex digits Once you have the 4 hex digits you must store the hex values in RO For example: if user types the ASCII characters "xA1B5" then at the end of your TRAP call RO must contain the value "xA1B5" NOTE: This is very tricky! For example the ASCII value "A" will be read from the keyboard in HEX as "x0041", somehow you must convert this to "x000A". Also, the ASCII value "0" will be read from the keyboard in HEX as "x0030" So if the user enters "xA1B5" 5 different values will be read in this order: X0078 x0041 x0031 x0042 x0035 x000A After all these inputs RO must read: XA1B5 This TRAP call should function properly even after being called multiple times, you will need to call this TRAP function at least twice to complete this lab (to get your starting and ending
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY