Question

1. Write a machine-language (hex) program to output your first name on the output device. Object...

1. Write a machine-language (hex) program to output your first name on the output device. Object code.

My name is Gabby and so far I can only get it to output "Gab". That's my code.

D1 00 13 F1 FC 16 D1 00 14 F1 FC 16 D1 00 15 F1 FC 16 D1 00 16 00 47 61 62 62 zz

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hi, I hope this is what you wanted. if you still have any doubt please let me know.

I know it is quite complicated but I have explained everything in detail.

I have done this in PEP/9 simulator...

Downloaded from this website :-http://computersystemsbook.com/5th-edition/pep9/  

I have attched source file as well as object file.

comment is added where ever necessary.

if you face any difficulty please feel free to ask me anything at anytime. 2nd screenshot directly run from object code.

---------------------------------------------------------------------- .pep code ------------------------------------------

LDBA 0X001F,d ; load a byte into accumlator from memory 1f which is G (object code for this line is D1 00 1F)

STBA 0xFC16,d ;store a byte from accumlator to output divice (object code for this line is F1 FC 16)

LDBA 0X0020,d ; load a byte into acc from memory 20 which is a (D1 00 20)

STBA 0xFC16,d ;store a byte from accumlator to output divice (object code for this line is F1 FC 16)

LDBA 0X0021,d ; load a byte into acc from memory 21 which is b (D1 00 21)

STBA 0xFC16,d ;store a byte from accumlator to output divice (object code for this line is F1 FC 16)

LDBA 0X0022,d ; load a byte into acc from memory 21 which is b (D1 00 22)

STBA 0xFC16,d ;store a byte from accumlator to output divice (object code for this line is F1 FC 16)

LDBA 0X0023,d ; load a byte into acc from memory 21 which is y (D1 00 23)

STBA 0xFC16,d; store a byte from accumlator to output divice (object code for this line is F1 FC 16)

STOP ;stop (OBJECT CODE IS 00)

.ASCII "Gabby" ; ASCII "Gabby" ( 47 61 62 62 79)

.END

-----------------------------------------------.pepo Means OB JECT FILE-------------------------------------------------

D1 00 1F F1 FC 16 D1 00 20 F1 FC 16 D1 00 21 F1

FC 16 D1 00 22 F1 FC 16 D1 00 23 F1 FC 16 00 47

61 62 62 79 zz

-----------------------------------------------Screenshot of output--------------------------------------------------------

Add a comment
Know the answer?
Add Answer to:
1. Write a machine-language (hex) program to output your first name on the output device. Object...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT