Question

ORIG X4500 RO, A LD FHALT A FILL X560A B FILL X4507 C .FILL X4501how to write a C programs to implement this LC‐3 emulator? please!

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

C program :-

#include <stdio.h>

int A = 0x560A;

int B = 0x4507;

int C = 0x4501;

int main()
{

int temp_r0;

r0 = A

return 0;

}

Add a comment
Know the answer?
Add Answer to:
how to write a C programs to implement this LC‐3 emulator? please! ORIG X4500 RO, A LD FHALT A FILL X560A B FILL X4507 C...
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
  • Write a set of C++ programs to implement the following operations listed in the menu function...

    Write a set of C++ programs to implement the following operations listed in the menu function below. a. File: main.cpp - contains the main function b. File: arrayhw.cpp – contains the 1D array function implementations c. File: arrayhw.h – contains the 1D array function prototyped declarations d. May create other files to implement any other needed function The main menu function should display the following: Main Menu, 1D Array Functions Enter a number to choose one of the following actions:...

  • Please implement the function z(a, b, c) in Verilog HDL. Note: Please write your code in...

    Please implement the function z(a, b, c) in Verilog HDL. Note: Please write your code in one module. ? = ? × ? + ?, where ? = ?^3 − ? ? = ???? ( 8/?×? , ?) Hint: output wire z; input wire a, b, c

  • Question: WRITE A PROGRAM IN LC-3 ASSEMBLY LANGUAGE. DO NOT ... WRITE A PROGRAM IN LC-3...

    Question: WRITE A PROGRAM IN LC-3 ASSEMBLY LANGUAGE. DO NOT ... WRITE A PROGRAM IN LC-3 ASSEMBLY LANGUAGE. DO NOT USE PYTHON, JAVA, C or C++ or OTHERS. Your task is to write a program that counts the number of 1 bits of the value stored at location given by Datal. Your program should print the count (in hexadecimal, as it is easier) along with an appropriate heading. Test your program with the following values stored in Datal: a xFFFE...

  • 2. (25 pts) (a) How one can use a single LC-3 instruction to move the value...

    2. (25 pts) (a) How one can use a single LC-3 instruction to move the value of R2 into R3? (b) The LC-3 has no subtract instruction. Write an LC-3 code that could perform the following operation: R1 = R2-R3 (c) Using only one LC-3 instruction and without changing the contents of any register, how could one set the condition codes based on the value that resides in RI? (d) Write LC-3 instruction that clears the contents of R2? (e)...

  • Show how to implement F(a,b,c,d) = ab'c and G(a,b,c,d) = ab'd + cd

    Show how to implement F(a,b,c,d) = ab'c and G(a,b,c,d) = ab'd + cd on the two 3-input 2-output lookup tables shown below. Use the connections that are shown. Draw your circuits and show how you divided them between the LUTs. Then fill in the LUT memories. Label the LUT inputs and outputs.

  • Write four MIPS–Assembly programs to implement the following mathematical ex- pressions (use the “loop approach”) 2...

    Write four MIPS–Assembly programs to implement the following mathematical ex- pressions (use the “loop approach”) 2 2 2 2 (d) 4D: Ï Ï Ï Ï [2° +2° +2° +2°) d=1 c=1 b=1 a=1 Place the result, of each mathematical expression, in the console of MARS.

  • THE ATTACHED PICTURES ARE THE ALGORITHMS of link list IN C PLEASE write the programs of...

    THE ATTACHED PICTURES ARE THE ALGORITHMS of link list IN C PLEASE write the programs of these pictures in C++ while writing the programs make sure that your programs are correct and please do them separately and while doing them comment the EACH STEP I AM posting my question third time please do them PROPERLY and do them separately and comment EACH STEP Please do it properly label EACH STEP in EACH program of C++ please do not do it...

  • Goals . Understand how to implement operator overloading in C++ Warning: Programs must compile us...

    c++ format Goals . Understand how to implement operator overloading in C++ Warning: Programs must compile using gt+ on the Computer Science Linux systems. If your code does not compile on CS machines you will get 0 for the assignment. Organize your files into folders by lab assignment. For this assignment, create a folder called Lab9. A. Read Chapter 18 B. Create a new class called RationalNumber to represent fractions. The class should have the following capabilities: 1) It should...

  • Please do the following programs in C++ complier. Do all the programs. I will give upvote...

    Please do the following programs in C++ complier. Do all the programs. I will give upvote straight away. 1) Write a program that uses a menu. Use a while loop in your code. Ensure your menu has an option to quit the program. 2)Write a program that creates an int array of size 10, then uses a for-loop to populate the array with numbers from your favorite number pattern. 3) Write a function that accepts an array as input then...

  • Problem 1: a) Write LEGv8 assembly language programs for the following C program fragments. Please make...

    Problem 1: a) Write LEGv8 assembly language programs for the following C program fragments. Please make sure to add any necessary comments. P[20] = P[10] + P[30] + 25; b) Show the machine code that will be generated by the assembly code in Problem 1.a. You can write machine code as decimal numbers. please help me solve this

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