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

  Write pseudocode of thread with and without semaphores

Assume we have two threads A and B A and B are to repeatedly print out ping and pong. Write down pseudocode of thread A and B How can this be solved with and without semaphores.

  Procedure that adds 2 words together

Create a small procedure that adds two words together and stores the results in CX and DX. Call the procedure from a program that loads the words to be added together in registers BX and AX

  What would you do to influence procurement process-platform

What would you do to influence the procurement process for both platforms (hardware & OS, such as desktops, laptops, servers, etc.) and application software?

  Maintaining network configuration

In a Windows 2003 server network discuss various devices such as: repeaters, routers and gateways. Detemrine the functions for those devices? At which layer of the OSI model do those devices operate?

  Determine values of it industry certifications

Discuss briefly how IT certification works. What business arenas are IT certifications needed, security, or what technical problem is IT certification designed to solve?

  Question about big oh relationship

Provide witnesses n0 and c that can be used to prove the relationship. Select your witnesses to be minimal, in the sense that n0-1 and c are not witnesses, and if d

  Discussion networking concepts using the osi model

Suppose your manager has asked you to explain the frame format of a typical Ethernet packet. Set-up a written report. Be sure to discuss Manchester encoding and 8B/10B encoding.

  Draw curves for throughput-delay and power

Assume two hosts A and B are connected via router R. A-R link has infinite bandwidth; A-R link has infinite bandwidth; draw curves for throughput, delay, and power, each as function of load.

  It assets and intellectual property in opensource

Will IBM's plan to give away some of its IT assets and intellectual property and increase its support of opensource software products like Linux be a successful growth strategy in the "brutally competitive marketplace" in which it operates?

  Network design question

Bench Fitness Centers has 8- i ndividual  locations in this area. Most of the centers have the similar equipment and provide the same services,

  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..

  Finding netbios information for a remote machine

Discuss the steps that you use to trouble your DNS issue in the client side and also find NetBIOS information for a remote machine.

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