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
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...
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 : } */
Write a MIPS Assembly language program to request a file name from the user, open the...
Write a MIPS Assembly language program to request a file name from the user, open the file, read the contents, and write out the contents to the console. This is what I have so far: .data    fileName:   .space 100    prompt1:   .asciiz "Enter the file name: "    prompt2:    .asciiz ""    prompt3:   .asciiz "\n"    buffer:    .space 4096 .text    main:        #        li $v0, 4        la $a0, prompt1       ...
7.3 Loops: Output range with increment of 10 IN CORAL LANGUAGE zyBooks Write a program whose...
7.3 Loops: Output range with increment of 10 IN CORAL LANGUAGE zyBooks Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer. Ex: If the input is -15 30, the output is: -15 -5 5 15 25 Ex: If the second integer is less than the first as in 20 5, the output is: Second integer...
Write the following java program: Desc Output the name and time of the runner who came...
Write the following java program: Desc Output the name and time of the runner who came in first, as well as the name and time of the runner who came in last in a marathon race (assuming there are no ties). Input A text file named marathon.txt containing the name and time of each participant in the following format (the file has at least 1 participant, name is just 1 word with no space, and name and time are separated...
Write an assembly language program that will print out the message of your choosing #NOTE #write...
Write an assembly language program that will print out the message of your choosing #NOTE #write in a simple way, so that i can execute it from command window using masm
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT