I can get any machine-code program by writing ORIG ?????

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

Question 6 is only reference for question 8 

6. I can get any machine -code program by writing
. ORIG ?????
then coding a bunch of .FILL lines
then putting
.END
An example might be a program at x3000 that does nothing
except execute the TRAP x25 instruction.
It could be coded
as
. ORIG x3000
.FILL b1111000000100101
. END
or
. ORIG x3000
.FILL XF025
. END
This isn't really "coding in assembly language", although it Is technically
assembly language.
Use this alternative approach to get the same machine code as you would
get by assembling
. orig x3000
lea ro, mymsg
puts
halt
mymsg
.fill x21
.fill x21
•stringz "hi"
.end
(Hint, first assemble the given program to see the various hex codes
you need for the .FILLS.
Much easier than figuring this out by yourself.)
Assemble your program, screenshot it in the simulator.
given version of the program.
that you got the same machine codes in the simulator.
Repeat for the
Compare the two screenshots to verify
Transcribed Image Text:6. I can get any machine -code program by writing . ORIG ????? then coding a bunch of .FILL lines then putting .END An example might be a program at x3000 that does nothing except execute the TRAP x25 instruction. It could be coded as . ORIG x3000 .FILL b1111000000100101 . END or . ORIG x3000 .FILL XF025 . END This isn't really "coding in assembly language", although it Is technically assembly language. Use this alternative approach to get the same machine code as you would get by assembling . orig x3000 lea ro, mymsg puts halt mymsg .fill x21 .fill x21 •stringz "hi" .end (Hint, first assemble the given program to see the various hex codes you need for the .FILLS. Much easier than figuring this out by yourself.) Assemble your program, screenshot it in the simulator. given version of the program. that you got the same machine codes in the simulator. Repeat for the Compare the two screenshots to verify
8. A "disassembler" is a kind of program that takes machine code
and produces a corresponding assembly language program.
sometimes used to help reverse-engineer programs where you have the
(It is
machine code but not the source code.
Normally the point is to make
nice assembly language that a human can read and understand...we
ignore that aspect.
Write a program that produces an "assembly" language program (in the
sense of step 6), treating the contents of memory addresses x3000 to
x3100 as the machine code.
For instance, if the program from step 1 were at x3000, the OUTPUT
printed by your disassembler program would be
. ORIG x3000
. FILL b1110000000000010
. FILL b1111000000100010
about 250 more rows omitted
. END
...
...
Your
.asm file should have a table (in comments) indicating which
registers are used for which purpose.
Show a screenshot of it working (you may need to scroll back so we
see the most interesting stuff, which is output first).
can
Transcribed Image Text:8. A "disassembler" is a kind of program that takes machine code and produces a corresponding assembly language program. sometimes used to help reverse-engineer programs where you have the (It is machine code but not the source code. Normally the point is to make nice assembly language that a human can read and understand...we ignore that aspect. Write a program that produces an "assembly" language program (in the sense of step 6), treating the contents of memory addresses x3000 to x3100 as the machine code. For instance, if the program from step 1 were at x3000, the OUTPUT printed by your disassembler program would be . ORIG x3000 . FILL b1110000000000010 . FILL b1111000000100010 about 250 more rows omitted . END ... ... Your .asm file should have a table (in comments) indicating which registers are used for which purpose. Show a screenshot of it working (you may need to scroll back so we see the most interesting stuff, which is output first). can
Expert Solution
steps

Step by step

Solved in 2 steps with 2 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