construct the program for our imaginary computer!   There must be made of at least 5 instructions   There should be at least 3 different types of instructions (write, move, decrement, add, or)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

  construct the program for our imaginary computer!

  There must be made of at least 5 instructions

  There should be at least 3 different types of instructions (write, move, decrement, add, or)

Write [number] to EAX
This instruction takes the operand number and puts it in the EAX register, overwriting whatever's
already in that location. It takes 3 cycles: one cycle each to fetch, decode, and execute the
instruction. The operand can be in decimal or binary, but it will be converted to binary when it is
put into EAX.
Move from [memory] to [other memory]
This instruction takes the value from the first memory operand and copies it into the other
memory operand, overwriting whatever's in the destination. If the first memory operand is EAX,
it takes 3 cycles (fetch, decode, execute), but if the first memory operand is address 1 or address
2, it takes 4 cycles (fetch, decode, get value from RAM, execute).
Decrement EAX
This instruction subtracts 1 from the value in EAX, storing the result in EAX. It takes 3 cycles:
fetch, decode, and execute. If the value in EAX is 00000000, then the decrement will cause it to
underflow and become 11111111.
Add [memory] to EAX
This instruction takes the value inside of the memory operand (either address 1 or address 2) and
adds it to the number inside of EAX, storing the result in EAX. This takes 4 cycles: fetch,
decode, get the memory value from RAM, and execute the addition. If this would cause the value
in EAX to be greater than 8 bits, it instead just leaves the lowest 8 bits of the result.
OR [memory] with EAX
This instruction takes the value inside of the memory operand (either address 1 or address 2) and
the value inside of EAX and performs a binary OR operation with the two, storing the result in
EAX. This takes 4 cycles: fetch, decode, get the memory value from RAM, and execute the
OR. (Review section 1.4 from chapter 1 if you don't remember how to perform the binary OR
operation.)
Transcribed Image Text:Write [number] to EAX This instruction takes the operand number and puts it in the EAX register, overwriting whatever's already in that location. It takes 3 cycles: one cycle each to fetch, decode, and execute the instruction. The operand can be in decimal or binary, but it will be converted to binary when it is put into EAX. Move from [memory] to [other memory] This instruction takes the value from the first memory operand and copies it into the other memory operand, overwriting whatever's in the destination. If the first memory operand is EAX, it takes 3 cycles (fetch, decode, execute), but if the first memory operand is address 1 or address 2, it takes 4 cycles (fetch, decode, get value from RAM, execute). Decrement EAX This instruction subtracts 1 from the value in EAX, storing the result in EAX. It takes 3 cycles: fetch, decode, and execute. If the value in EAX is 00000000, then the decrement will cause it to underflow and become 11111111. Add [memory] to EAX This instruction takes the value inside of the memory operand (either address 1 or address 2) and adds it to the number inside of EAX, storing the result in EAX. This takes 4 cycles: fetch, decode, get the memory value from RAM, and execute the addition. If this would cause the value in EAX to be greater than 8 bits, it instead just leaves the lowest 8 bits of the result. OR [memory] with EAX This instruction takes the value inside of the memory operand (either address 1 or address 2) and the value inside of EAX and performs a binary OR operation with the two, storing the result in EAX. This takes 4 cycles: fetch, decode, get the memory value from RAM, and execute the OR. (Review section 1.4 from chapter 1 if you don't remember how to perform the binary OR operation.)
Expert Solution
Step 1Introduction

Assembly language which refers to the  low-level programming language that are used for a computer or other programmable device specific to a particular computer architecture in contrast that the most high level of programming languages, which are usually portable across multiple systems.

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education