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
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--------------------------------------------------------
1. Write a machine-language (hex) program to output your first name on the output device. Object...
Program language - JAVA 1) Write a program that will display the following. My name is ____(Shelby)_________. (your name) My major is ___Psychology________. (your major) My hobbies are ___Surfing_____, ___Eating_____, and ___Reading______. (your hobbies) Code: Output:
Please write this in C. Write this code in Visual Studio and upload your Source.cpp file for checking (1) Write a program to prompt the user for an output file name and 2 input file names. The program should check for errors in opening the files, and print the name of any file which has an error, and exit if an error occurs opening any of the 3 For example, (user input shown in caps in first line) Enter first...
I'm having trouble getting my program to output What is your first name? damion what is your last name? anderson damion, Your first name is 6 characters Your last name, anderson, is 8 characters Your name in reverse is: noimad nosredna This is my code so far: #include <stdlib.h> #include <stdio.h> void sizeOfName(char** name); void printSizeOfName(int *first, int *last, char** name); void reverseString(int *first, int *last, char** name); int main() { char** name; name = (char**)malloc(2*sizeof(char*)); name[0] = (char*)malloc(100*sizeof(char)); name[1]...
What is the type of code in line 16? The answer is supposed to be Object. Can someone give me an in depth explanation why? What is the type of the code in line 16: 1 2 package app: import java.util.ArrayList; public class Controller { 3 4 5 6 7 8 public static void main(String[] args) { 9 BookBag my Bookbag = new BookBag(); Book myBook = new Book("123 of Java"); Phone myPhone = new Phone (14.2); 10 11 12...
Please read this comment: This is the only file given by my professor and so can you please help me to write a python program. You can use any test file and post the output with the code. The output might be different then above but please help me to get started with the PYTHON code. Thank you in advance You are going to write a Python program that represents a command line version of a hexadecimal editor. This program...
Using C programming language Question 1 a) through m) Exercise #1: Write a C program that contains the following steps (make sure all variables are int). Read carefully each step as they are not only programming steps but also learning topics that explain how functions in C really work. a. Ask the user for a number between 10 and 99. Write an input validation loop to make sure it is within the prescribed range and ask again if not. b....
Im having trouble with this C++ program. Lab 10/object/test files provided LAB 10 1 //Savings.cpp - displays the account balance at 2 //the end of 1 through 3 years 3 //Created/revised by <your name> on <current date> 4 5 #include <iostream> 6 #include <iomanip> 7 #include <cmath> 8 using namespace std; 9 10 //function prototype 11 double getBalance(int amount, double rate, int y); 12 13 int main() 14 { 15 int deposit = 0; 16 double interestRate = 0.0; 17...
The second phase of your semester project is to write pass one of a two‑pass assembler for the SIC assembler language program. As with Phase 1, this is to be written in C (not C++) and must run successfully on Linux. Pass one will read each line of the source file, and begin the process of translating it to object code. (Note: it will be to your advantage to have a separate procedure handle reading, and perhaps tokenizing, the source...
Java Programming The program template represents a complete working Java program with one or more key lines of code replaced with comments. Read the problem description and examine the output, then study the template code. Using the problem-solving tips as a guide, replace the /* */ comments with Java code. Compile and execute the program. Compare your output with the sample output provided. Modify class Time2 to include a tick method that increments the time stored in a Time2 object...
programming language: C++ *Include Line Documenatations* Overview For this assignment, write a program that will simulate a game of Roulette. Roulette is a casino game of chance where a player may choose to place bets on either a single number, the colors red or black, or whether a number is even or odd. (Note: bets may also be placed on a range of numbers, but we will not cover that situation in this program.) A winning number and color is...