How implement both a push and pop instruction

Assignment Help Data Structure & Algorithms
Reference no: EM13699951

Question: A computer has 8 general purpose registers (R0 to R7) but does not have PUSH or POP instructions. The computer does have the register indirect with auto increment mode (post-inc) and register indirect with auto decrement mode (predec) for storing and loading to memory, as illustrated below (with pseudo-code comments):

LD R2, [R1]+ // R2->M[R1] // R1->R1 + 1

ST [R1]+, R2 // M[R1]->R2 // R1->R1 + 1

LD R2, -[R1]

// R1->R1 - 1 // R2->M[R1]

// R1->R1 - 1 // M[R1]->R2

Using some combination and sequence of these instructions, you are to show how implement both a PUSH and POP instruction where R7 is used as the stack pointer and R6 is used as the data register to push or pop.

Be sure to add comments. The comment should explain the purpose of the program and the data to be entered.

Reference no: EM13699951

Questions Cloud

Set all paragraph text to the hexadecimal color : Set all paragraph text for paragraphs nested inside div tags to the hex color #CC0000. (What color will they turn if they've already been told in step #1 to be #00E5EE? See the Hint!)
Calculate the percentage difference in the fundamental : Problem- Calculate the percentage difference in the fundamental vibration wave number of 23Na35Cl and 23Na37Cl on the assumption that their force constants are the same
How much water added to hydrochloric acid : Problem- Assuming volumes are additive, how much water (in mL) should be added to 30.8 mL of a 1.12 M solution of hydrochloric acid (HCl) to produce a 0.100 M solution
Find the corresponding rpn notation : Find the corresponding RPN notation and write the program using PUSH, POP, ADD, MUL, SUB, and DIV stack instructions.
How implement both a push and pop instruction : A computer has 8 general purpose registers (R0 to R7) but does not have PUSH or POP instructions. The computer does have the register indirect with auto increment mode (post-inc) and register
How much water should be added to sodium hydroxide : Problem- Assuming volumes are additive, how much water (in mL) should be added to 13.7 mL of a 2.35 M solution of sodium hydroxide (NaOH) to produce a 0.250 M solution
How many times will the cpu have to reference memory : How many times will the CPU have to reference memory in order to fetch and execute a two-word indirect addressing mode instruction (b) if the instruction is a JMP instruction?
Explain atomic number and mass number of the nuclide : Problem- Give the symbols for the nuclide that is formed in each of the following radioactive decays by indicating the atomic symbol, atomic number, and mass number of the nuclide.
Write the lisp functions : Write the subsequent LISP functions, add2, add5 and double, if they executed will produce the following results:

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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