Develop trap routines and the use them to implement program

Assignment Help Assembly Language
Reference no: EM131449750

Lab Assignemnt: TRAPs and Subroutines - Memory Dump Computer Organization

PURPOSE

In this lab, students will gain familiarity with the use of low-level subroutines, caller/callee register saving policy, and TRAP calls.

ASSIGNMENT

Using the LC-3 simulator, you will construct an assembly-level program that prompts the user for a starting address (in hex) and an ending address (in hex). Your program will then output the contents of memory (in hex) between the provided ranges (inclusive).

Enter starting memory address:
x3000
Enter ending memory address:
x3001
Memory contents x3000 to x3001:
x3000 xF030
x3001 xF025

Example execution of the Memory Dump routine:

I/O for this routine requires that we develop a routine to enable the input of a 4-digit hex value and a routine for displaying the contents of a 16-bit registers/memory location as a 4-digit hex value. We will implement each of these routines as TRAPs.

• Input (Trap x40): A Trap routine (invoked as TRAP x40) that reads a 4-digit hex from the keyboard and returns the value in R0. This trap may call other traps. You will develop this trap routine and locate it in memory at address x4000.

• Output (Trap x41): A Trap routine (invoked as TRAP x41) that displays the contents of R0 to the display as a 4-digit hex value. This routine should output exactly 5 characters: a leading "x" and the 4 hex digits. Do not display a carriage return/line feed/end-of-line as part of the trap call. This trap may also call other traps. You will develop this trap routine and locate it in memory at address x5000.

Develop these TRAP routines and the use them to implement a program to perform memory dumps (using the i/o format provided in the example above).

Note: The representation for output characters (ASCII) is different than the standard binary representation of the value. For example, you may find it useful to note that the ASCII representation for any single-digit value is #48 greater than the number itself. Thus, the ASCII representation of the character 0 has value #48 (x30) while the ASCII representation of the character 1 has value #49 (x31).

Attachment:- Shift_r.rar

Reference no: EM131449750

Questions Cloud

What is good and bad about each one : Research 3 online tools/services on the internet....tell me what they offer, what is good and bad about each one, and what would you recommend?
Security engineering-cryptography : Define steganography and discuss a method of how steganography is accomplished.
Explain how technology has advanced each of their businesses : Utilize your research and identify the methods these innovators or leaders are using to communicate through technology in an effort to remain relevant.
Expression affect privacy and personal intellectual : How does freedom of expression affect privacy and personal intellectual?
Develop trap routines and the use them to implement program : Develop these TRAP routines and the use them to implement a program to perform memory dumps (using the i/o format provided in the example above).
Describe what the home page will look like : Explain the effects that the Cascading Style Sheet (.css) will have on the Web page. There must be a minimum of two (2) changes. Be sure to include detail.
Determine a discrete-time transfer function : Determine a discrete-time transfer function that approximates G(8) using the Adams-Schlumberger predictor as an operational substitution method. You may use a computer algebra package to help with the resulting algebra.
Substantial security threats facing networks today : 1. What are some of the most substantial security threats facing networks today? Why should we be worried about those threats?
What is the profitability index : What is the profitability index for the following set of cash flows if the relevant discount rate is 10 percent

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd