answersLogoWhite

0


Best Answer

It all depends on the flow of the instruction stream. If the processor fetches the memory location under direct fetch under control of the program counter, it is clearly an instruction. If the processor accesses the memory location as a result of fetching or storing an operand, it is clearly data. Where it may be unclear, and subject to interpretation, is when the fetch is part of a table lookup indexing through an array. It could go either way, depending on how you look at it.

In the 8085, if S0 and S1 are both high during a fetch, it is an opcode fetch. The 8086/8088 is similar but S0 and S1 are inverted in that case, i.e. both low during opcode fetch.

The bottom line is that, for the 8085, it does not matter because there is only one address space and, for the 8086/8088, the processor knows when to use CS (Code Segment) versus DS (Data Segment).

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How does a compute know whether the contents of a memory location should be treated as a program instruction or as a piece of data?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between the instruction location counter and the program counter?

The Instruction Location Counter is a variable inside of the assembler. While the Program Counter is a register. The PC solely keeps track of the next instruction in a program, ILC increments by each instruction's operand length.


How does the Fetch Decode Execute work?

The program counter in the processor holds the address of the next instruction needed from main memory. The program counter copies its contents into the memory address register. The memory address register then sends the address along the address bus to main memory and the contents of the memory location specified by the address are sent along the data bus to the memory buffer register. The contents of the memory buffer register are then copied to the current instruction register where they are decoded and executed.


How does fetch decode cycle work?

The program counter in the processor holds the address of the next instruction needed from main memory. The program counter copies its contents into the memory address register. The memory address register then sends the address along the address bus to main memory and the contents of the memory location specified by the address are sent along the data bus to the memory buffer register. The contents of the memory buffer register are then copied to the current instruction register where they are decoded and executed.


How does fetch decode execute cycle work?

The program counter in the processor holds the address of the next instruction needed from main memory. The program counter copies its contents into the memory address register. The memory address register then sends the address along the address bus to main memory and the contents of the memory location specified by the address are sent along the data bus to the memory buffer register. The contents of the memory buffer register are then copied to the current instruction register where they are decoded and executed.


What is the Process (Fetch Decode Execute Store)?

The program counter in the processor holds the address of the next instruction needed from main memory. The program counter copies its contents into the memory address register. The memory address register then sends the address along the address bus to main memory and the contents of the memory location specified by the address are sent along the data bus to the memory buffer register. The contents of the memory buffer register are then copied to the current instruction register where they are decoded and executed.


1 To develop a program using the ADI instruction to add the two hexadecimal numbers 3AH and 48H and store the result in memory location 2100H?

Write a program using the ADI instruction to add the two hexadecimal numbers 3AH and 48H and store the result in memory location 2100H


What A CPU really only understands instructions that are written in machine language.?

A CPU will have an "instruction set" which consists of primitive instructions i.e a command like MOVE:1002,1003 could be an example of an instruction to move the contents in memory location 1002 to the memory location of 1003. Some CPU's operate as a RISC (Reduced Instruction Set Computer) and others operate as a CISC(Complex Instruction Set Computer). Which basically means some have more "primitive instructions" than others but the more complex an instruction is - The more work will be needed to execute it. Alan Turing proved only 6 of these primitive commands are needed to compute anything that is "computable" by machines. Nowadays, programmers will write code in an "high level" language which contains more of these "primitive commands" but then the code will be compiled into a set of instructions that the CPU can actually execute (i.e to the instruction set of the targeted CPU). If we were to try to write any sufficiently complex program using only the instruction sets of CPU's, it would become very complicated for humans to understand and would take a ridiculously long time.


When was Missouri Virtual Instruction Program created?

Missouri Virtual Instruction Program was created in 2007.


What is the verb for computer?

The verb for computer is compute.Other verbs are computes, computing and computed."I am computing"."We have computed the program""I like to compute".


Why call instruction in 8085 microprocessor have 18 state and how its operate?

The CALL InstructionOpcode OperandCALL 16-bit memory addressof a subroutineIt is a 3-byte instruction that transfers the program sequence to a subroutineSaves the content of the PC (Program Counter-16-bit register) , the address of the next instruction , on the stackDecrements the stack pointer register by 2Jumps unconditionally to the memory location specified by the 2nd and 3rd bytes.This instruction is accompanied by a RETURN instruction in the subroutine


What will be the content of program counter of 8085 mpu has fetched machine code located at the memory location 205FH?

It depends on whether the machine code is one, two, or three bytes long, and on whether or not the instruction transferred control to another location. In the case of a non-jump single byte instruction, the PC will have a value of 2060H after the instruction is complete, and it will be 2061H or 2062H after a two or three byte instruction. In the case of a jump, call, or interrupt, the PC will depend on the instruction.


What is psuedocode used for?

Assembler directives are also known as pseudocode.It is instruction to assembler regarding the program to be assembled. For example ORG 4000 is an assembler directive which tells the assembler that program is stored from location 4000.