Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@pensu-8tNeGU • Nov 12, 2010
Zero 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-6Xuj4M • Nov 12, 2010
You 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...? -
@leo-ZJQlmh • Nov 12, 2010
Hey Peeyush can you explain in detail what exactly is zero address instruction, is it anyhow related to NOP.
-
@reya-SMihdC • Nov 13, 2010
@leo:what is NOP??
-
@4m4n-jQmegc • Nov 13, 2010
zero-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-ZJQlmh • Nov 13, 2010
praveena211@leo:what is NOP??
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.
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-6Xuj4M • Nov 13, 2010
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.
Do you mean to say that address of the operands are stored in registers.....?
Are you sure both the operands are stored in registers on the operations are to be carried out.....? -
@4m4n-jQmegc • Nov 13, 2010
not operands only their absolute address is stored in the register
-
@4m4n-jQmegc • Nov 13, 2010
Basically 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. -
@pensu-8tNeGU • Nov 13, 2010
To 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. -
@leo-ZJQlmh • Nov 13, 2010
Thanks Peeyush
-
@nikul-prajapati-nZoWp1 • Jul 17, 2012
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....๐>>Zero address instructions are the instructions which do not need any address to perform the operation.
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-nZoWp1 • Jul 17, 2012
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....๐>>Zero address instructions are the instructions which do not need any address to perform the operation.
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-nZoWp1 • Jul 17, 2012
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....๐>>Zero address instructions are the instructions which do not need any address to perform the operation.
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.