How this zero address instruction works....?
Hello friends,
I have some read about zero address instruction.Such type of instruction is found in machine that store operand in a structure called a pushdown stack.
This theory is used in HEWLETT-Packed calculators.
Can any one have idea how this zero address instruction works ?
I have some read about zero address instruction.Such type of instruction is found in machine that store operand in a structure called a pushdown stack.
This theory is used in HEWLETT-Packed calculators.
Can any one have idea how this zero address instruction works ?
Replies
-
PensuZero address instructions are the instructions which do not need any address to perform the operation. As you said of stack operation. Consider a stack operation push like PUSH 5 then this operation will simply push 5 in top of stack. Another one is POP, here also you dont need any address. I suggest you to read computer architecture by morris mano, he has explained the concept in detail.
Correct me if i am wrong....😀 -
Morningdot HabluYou mean to say that.....both the operand are fetched from the main memory.....?
.
If so then i think that HEWLETT-packed calculator performs vary slow.Am i right...? -
LeoHey Peeyush can you explain in detail what exactly is zero address instruction, is it anyhow related to NOP.
-
Reya@leo:what is NOP??
-
4M4Nzero-address instruction An instruction that contains no address fields; operand sources and destination are both implicit. It may for example enable stack processing: a zero-address instruction implies that the absolute address of the operand is held in a special register that is automatically incremented (or decremented) to point to the location of the top of the stack.
-
Leo
NOP is better known as No Operator. This operator is quite often used in programming to manage unequal inputs. By the way this is very rarely used by professional programmers since it lowers the speed of operation.praveena211@leo:what is NOP??
NOP is usually used by hackers to run buffer overflow attacks over a system, NOP comes into play if coder had explicitly implimented bound checking. Since the program becomes capable of checking bounds itself, NOP is used to create overflow.
Example:
Consider a capacity of buffer is 500 and it is completely filled. Now you want to add extra data to run buffer overflow then you will cover all data in such a way with NOP so that in all the buffer checking mechanism should fail. Now suppose data addition is integer which is to be incremented, then it will be given as
x++
now cover it with equivalent NOP so that bound checking mechanism should not detect it,
NOPx++
now first bound checking mechanism will encounter NOP so it will think there's no increment or decrement means no operation is getting performed on buffer but when it'll encounter x++ it will discard it, to cope this we again add NOP to it like this
NOPx++NOP
so now it starts with NOP and ends with NOP so buffer checking mechanism fails to detect it and buffer overflow runs successfully.
This is one of the most basic use of NOP, there might be many uses but currently i never encountered anything which made me use NOP in program. I hope it was easy explanation. Feel free to ask if anything is not clear. -
Morningdot Hablu
Do you mean to say that address of the operands are stored in registers.....?4M4Nabsolute address of the operand is held in a special register that is automatically incremented (or decremented) to point to the location of the top of the stack.
Are you sure both the operands are stored in registers on the operations are to be carried out.....? -
4M4Nnot operands only their absolute address is stored in the register
-
4M4NBasically it makes use of stack processing
where both operand sources and result destinations are implicitly the top locations of the stack, thus making programs more compact. Stack mechanisms are also used to provide a way of keeping track of multiple interrupts in which the stack serves as a way of “nesting” the interrupts so that those of lesser priority are pushed down so that those of higher priority can be attended to. -
PensuTo be more precise "Zero Address Instructions are instructions which occupy one byte and do not involve an address. Examples of these type of instructions are 'stop execution' or 'clear all status flags'.
This is basically used in stack organized computers. Here the only thing you can access is top of the stack, so you dont need any address to specify it.
For example if you want to perform x=a+b then the airthmetic would be like:
PUSH a TOS<-a
PUSH b TOS<-b
ADD TOS<-a+b
POP x M[x]<-TOS
@mohit: Yes i guess both operands are fetched from the stack only and this process is slow because to find a specific position you have to move stack pointer one by one to desired location.
@leo: every instruction which is of one byte and dont have an address field is a zero address instruction. So NOP must be a zero address instruction. -
LeoThanks Peeyush
-
Nikul Prajapati
>>Zero address instructions are the instructions which do not need any address to perform the operation.PensuZero address instructions are the instructions which do not need any address to perform the operation. As you said of stack operation. Consider a stack operation push like PUSH 5 then this operation will simply push 5 in top of stack. Another one is POP, here also you dont need any address. I suggest you to read computer architecture by morris mano, he has explained the concept in detail.
Correct me if i am wrong....😀
Here, to execute "Zero address instructions" it need address to execute instruction but you need not to specify it explicitly. Address is in definition of instruction it self.
For ex. PUSH 5 means push 5 into the stack where "stack pointer" is pointing right now. -
Nikul Prajapati
>>Zero address instructions are the instructions which do not need any address to perform the operation.PensuZero address instructions are the instructions which do not need any address to perform the operation. As you said of stack operation. Consider a stack operation push like PUSH 5 then this operation will simply push 5 in top of stack. Another one is POP, here also you dont need any address. I suggest you to read computer architecture by morris mano, he has explained the concept in detail.
Correct me if i am wrong....😀
Here, to execute "Zero address instructions" it need address to execute instruction but you need not to specify it explicitly. Address is in definition of instruction it self.
For ex. PUSH 5 means push 5 into the stack where "stack pointer" is pointing right now. -
Nikul Prajapati
>>Zero address instructions are the instructions which do not need any address to perform the operation.PensuZero address instructions are the instructions which do not need any address to perform the operation. As you said of stack operation. Consider a stack operation push like PUSH 5 then this operation will simply push 5 in top of stack. Another one is POP, here also you dont need any address. I suggest you to read computer architecture by morris mano, he has explained the concept in detail.
Correct me if i am wrong....😀
Here, to execute "Zero address instructions" it need address to execute instruction but you need not to specify it explicitly. Address is in definition of instruction it self.
For ex. PUSH 5 means push 5 into the stack where "stack pointer" is pointing right now.
You are reading an archived discussion.
Related Posts
Hey guys. Ive been working on a project which involves a PIC 16F877A, and an electronic kit with a 74LS373 latch. This latch receives several data from the electronic kit...
Location: CrazyEngineers
Purpose: Help the society.
About Me: Speed One Terra Hertz, Memory: One Zetabyte, Processor: Pentium Ultra Core Millenia V2, FHP 450 Motor from Hirata, Japan.
Joined CrazyEngineers Because:...
Have a look at today's google doodle,
What do you think?
Shell Moulding
Shell moulding ;
It is a process in which the sand is mixed with a thermo setting resin is allowed to come into contact a heated metallic pattern...
Anyone have any idea of making a projector
Suggestion using Mobile ..