Creating a c++ program

Assignment Help Operating System
Reference no: EM1379651

A text document with machine code (not assembly code) for little man's computer following instruction set. Instructions are in different lines (no need for semicolon at the end of each instruction)

Arithmetic 1xx ADD
2xx SUB
Data Movement 3xx STORE
5xx LOAD
BR 6xx JUMP
BRZ 7xx BRANC ON 0
BRP 8xx BRANCH ON +
Input/Output 901 INPUT
902 OUTPUT
Machine Control 000 HALT
(coffee break) COB

Output:
Any output specified in the input file by 902 will be displayed on screen

Computer specification:
· Two digits memory (mail box) address: 00-99

· Three digits instruction or data in each memory slot

· One calculator, one program counter

· The program in the input file needs to be loaded into memory first and stored in consecutive slots starting from address 00

· 901 instruction will ask user's input from keyboard, 902 displays content in calculator

Other requirements:
Your program should accept any length of input program that can be fit in little man's 100 memory slots and generate correct result and/or output on screen.

Submit the source code together with readme file with instruction to compile, build and use your program.

Example:
Input file contains following code (return positive difference):
901
310
901
311
210
808
510
211
902
000
Running of the program with this input will ask user to input 2 numbers, let's say 5 and 10, the program will output the positive difference on the screen, which is 5.

Reference no: EM1379651

Questions Cloud

Computing the access time : Main memory uses a block transfer capability & has 1st word (four bytes) access time of fifty ns and access time for following words as 5 ns.
Determine the format of main memory address : Given that a system has two way set associative cache of size eight KBytes, with sixteen bytes cache lines, and a byte-addressable main memory of size 64 MBytes.
Creating programs to compute : Compare zero-, one-, two-, and three-address machines through writing programs to compute X = (A+B X C)/D - E X F)
Evaluate a dbms in terms of lock granularity : Suppose you are asked to evaluate a DBMS in terms of lock granularity and the different locking levels. Create a simple database environment in which these features would be important.
Creating a c++ program : A text document with machine code for little man's computer following instruction set. Instructions are in different lines.
Define cache and its purpose : Describe what a cache is and what its purpose is. Also explain what data gets placed into the cache, and when it is put there.
Direct mapped cache- word, block, tag : Think about a byte addressable computer with twenty-four bit addresses, a cache capable of storing a total of 64KB of data, and blocks of 32 bytes.
Find the sizes of the tag, block and word fields : Assume that a computer using direct mapped cache has 2^24 words of main memory and a cache of sixty-four blocks, where each cache block contains sixteen words.
Format of a memory address : Assume that a computer using a set associative cache has 2^16 words of main memory and a cache of thirty-two blocks, where each cache block contains eight words.

Reviews

Write a Review

Operating System Questions & Answers

  Discussion on dns for internet operations

Discuss how do you think the DNS is important for internet operations and what would happen if the DNS of your company/orgnization or your provider or root DNS fails?

  Page table entries are needed for two-level paging

Assume that word 0 is part of a hole and that the highest word in memory contains valid tries are needed in the page table if traditional(one-level) paging is used? how many page table entries are needed for two-level paging, with 10 bits in ea..

  Microsoft traditional and current name resolution approaches

Determine Microsoft traditional name resolution approaches and Microsoft current name resolution approaches also discuss the differences between them?

  Minimum length of ethernet frames

Discuss how many minimum length Ethernet frames can a ten Mbps switch port forward in one second, assuming no collision?

  Characterize page fault rate-process first start execution

When a process first start execution, how would you characterize the page fault rate? Once the working set for a process is loaded into memory, how would you characterize the page fault rate?

  Scientific principles behind a computer technology

Explain the scientific principles behind a computer technology and discuss how social, political, economic or ethical impact of computers on our cultural structures and beliefs.

  Question about lan operating systems

Assume you are network administrator for a new corporation that has ten users and plans to add five more users within a year. The files require to be accessed by all ten users and each user must have different security rights.

  What percentage of memory-s total operating time refreshes

Consider a dynamic RAM that must be given a refresh cycle 64 times per ms. What percentage of the memory's total operating time must be given to refreshes?

  Find the total number of bytes in the frame

Determine how long does it take to transmit a 10baseT Ethernet frame that contains 256 bytes of data and ignore all the interframe gap that follows the frame.

  Explain the concepts of nat and ipv6

At present we have a huge problem with advertising corporations which are making profiles of people by collecting their information.

  Automate or automated patch deployment

Discuss and define Automate or Automated patch deployment?

  Integrity without confidentiality

Determine the difference between message confidentiality and message integrity? Can you have confidentiality without integrity?

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