Question

In: Computer Science

Write a machine language program to output your name on the output device. The name you...

Write a machine language program to output your name on the output device. The name you output must be longer than two characters. Write it in a format suitable for the loader and execute it on the Pep/9 simulator.

my name is Kevin

Solutions

Expert Solution

Address

Machine code/object code

Assembly code

Meaning

000

D1 00 1F

LDBA 0x001F,d

Load K

003

F1 FC 16

STBA 0xFC16,d

o/p K

006

D1 00 20

LDBA 0x0020,d

Load e

009

F1 FC 16

STBA 0xFC16,d

o/p e

0C

D1 00 21

LDBA 0x0021,d

Load v

0F

F1 FC 16

STBA 0xFC16,d

o/p v

12

D1 00 22

LDBA 0x0022,d

Load i

15

F1 FC 16

STBA 0xFC16,d

o/p i

018

D1 00 23

LDBA 0x0023,d

Load n

01B

F1 FC 16

STBA 0xFC16,d

o/p n

01E

00

STOP

01F

4B 65 76 69 6E

.ASCII “Kevin”

Ascii of each Character stored in memory

024

zz

.END

Assembly Code

LDBA 0x001F,d
STBA 0xFC16,d
LDBA 0x0020,d
STBA 0xFC16,d
LDBA 0x0021,d
STBA 0xFC16,d
LDBA 0x0022,d
STBA 0xFC16,d
LDBA 0x0023,d
STBA 0xFC16,d
STOP
.ASCII “Kevin”
.END

0000              D1001F              LDBA 0x001F,d
0003            F1FC16                  STBA 0xFC16,d
0006            D10020                  LDBA 0x0020,d
0009            F1FC16                  STBA 0xFC16,d
000C            D10021          LDBA 0x0021,d
000F        F1FC16          STBA 0xFC16,d
0012        D10022          LDBA 0x0022,d
0015        F1FC16          STBA 0xFC16,d
0018        D10023          LDBA 0x0023,d
001B        F1FC16          STBA 0xFC16,d
001E        00              STOP
001F        4B6576696E      .ASCII “Kevin”
0024                                        .END

USing STRO TRAP

Address

Machine code

Assembly code

Meaning

0000

49 00 04

STRO name,d

String output trap

0003

00

STOP

0004

4B 65 76 69 6E

name: .ASCII “Kevin”

Ascii of each Character stored in memory

009

.END


Related Solutions

Write an assembly language program that prints your first name in the output. Use immediate addressing...
Write an assembly language program that prints your first name in the output. Use immediate addressing with a hexadecimal constant to designate the operand of CHARO for each letter of your name. Comment each line except STOP and END. Cut and paste the Assembler Listing into your document and paste a screen shot of the Output area of the Pep8. Use the name "Kevin" as example Assembler Listing Screen Shot of Output area of the Pep8 program
In Java language. Write a brief program that writes your name to a file in text...
In Java language. Write a brief program that writes your name to a file in text format and then reads it back. Use the PrintWriter and Scanner classes.
Write a program to perform the following actions: the language is Java – Open an output...
Write a program to perform the following actions: the language is Java – Open an output file named “Assign14Numbers.txt” – Using a do-while loop, prompt the user for and input a count of the number of random integers to produce, make sure the value is between 35 and 150, inclusive. – After obtaining a good count, use a for-loop to generate the random integers in the range 0 ... 99, inclusive, and output each to the file as it is...
Convert the following pep/9 machine language program into an assembly code. Determine the output of this...
Convert the following pep/9 machine language program into an assembly code. Determine the output of this program if the input is ‘tab’. The left column is the memory address of the first byte on the line: 0000 D1FC15 0003 F1001F 0006 D1FC15 0009 F10020 000C D1FC15 000F F10021 0012 D10020 0015 F1FC16 0018 D1001F 001B F1FC16 001E 00
Assembly Language Coding Using MARS (MIPS) 1)Write a program that prints your name in a Triangle....
Assembly Language Coding Using MARS (MIPS) 1)Write a program that prints your name in a Triangle. (NAME = John Doe) 2)Write a Program that intializes X to 10, Y to 20 and Z to -50, adds X and Y and Z and prints the following the value of each variable, for example value of x is 10 as well as the result of the addition.
In C Programming Language Write a program to output to a text log file a new...
In C Programming Language Write a program to output to a text log file a new line starting with day time date followed by the message "SUCCESSFUL". Please screenshot the results.
Write a program using C language that -ask the user to enter their name or any...
Write a program using C language that -ask the user to enter their name or any other string (must be able to handle multiple word strings) - capture the epoch time in seconds and the corresponding nanoseconds - ask the user to type in again what they entered previously - capture the epoch time in seconds and the corresponding nanoseconds -perform the appropriate mathematical calculations to see how long it took in seconds and nanoseconds (should show to 9 decimal...
Write Lexical Analyzer program in C language. Below is the sample input and ouput. /* output...
Write Lexical Analyzer program in C language. Below is the sample input and ouput. /* output Enter the string: if(a<b){a=10;} Tokens are identifier :if punctuation mark : ( identifier :a operator:< identifier :b punctuation mark : ) punctuation mark : { identifier :a operator:= constant :10 punctuation mark : ; punctuation mark : } */
IN ASSEMLY LANGUAGE MASM! please show output run. Write a program that ask the user to...
IN ASSEMLY LANGUAGE MASM! please show output run. Write a program that ask the user to write a string and reverse a string using indirect addressing (may not use the stack - push/pop). The string will be given by the user and be up to 64 characters long. INCLUDE Irvine32.inc INCLUDE macros.inc MAX = 64 .data source BYTE MAX DUP('#'),0 destination BYTE LENGTHOF source DUP('*'),0 actual_length DWORD ? ask BYTE "Enter a String: ",0 .code main proc ; ask user...
Objective: Write this program in the C programming language Loops with input, strings, arrays, and output....
Objective: Write this program in the C programming language Loops with input, strings, arrays, and output. Assignment: It’s an organization that accepts used books and then sells them a couple of times a year at book sale events. Some way was needed to keep track of the inventory. You’ll want two parallel arrays: one to keep track of book titles, and one to keep track of the prices. Assume there will be no more than 10 books. Assume no more...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT