Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
The Stack
A procedure call is supported by a stack. So let's discuss stack in assembly. Stacks are 'Last In First Out' data structures and are used for storing return addresses of procedures and for parameter passing and saving the return value.
In 8086 microprocessor a stack is made in the stack segment. SS register stores the offset of stack segment whereas SP register stores the top of stack. A value is pushed in top of the stack or taken out (poped) from top of the stack. The stack segment may be initialized as below:
STACK_ SEG SEGMENT STACK
DW 100 DUP (0)
TOS LABEL WORD
STACK_SEG ENDS
CODE SEGMENT
ASSUME CS: CODE, SS: STACK_SEG
MOV AX, STACK_SEG
MOV SS, AX ; initialise stack segment
LEA SP, TOP ; initialise stack pointer
CODE ENDS
END
The directive STACK_SEG SEGMENT STACK declares logical segment for stack segment. DW 100 DUP (0) assigns actual size of stack to 100 words. All locations of this stack are initialized to zero. Stacks are recognized by the stack top and so the Label Top of Stack (TOS) has been selected. Please consider that stack in 8086 is a WORD stack. Stack facilities include the use of indirect addressing by a special register, the stack pointer (SP). SP is decremented by itself as items are put on the stack and incremented as they are retrieved. Putting something on to stack is known as a PUSH and taking it off is known as a POP. The address of last element pushed on to stack is termed as the top of stack (TOS).
What are two reasons for using layered protocol? Layered protocol implies protocols used into each layer are the layer's own business that is they don't influence protocol of a
The features are needed to implement top down parsing are? Ans. Source string marker, Prediction making mechanism and also matching and backtracking mechanism features are need
Pass I of the assembler must also generate the intermediate code for the processed statements. Justify your answer. Criteria for selection of a suitable intermediate code form
What are the requirements to design Combinational Logic ? Ans . Design Requirements of Combinational Logic:- (i) By the specifications of circuit, we find out the
The main function of a browser is to? The important function is to interpret HTML of a browser.
Pros and Cons of Assembly Language The following are a number of advantages / disadvantages of employing assembly language: Assembly Language offers more control over ha
Can you list out some of enhancements in Verilog 2001? In earlier version of Verilog, we use 'or' to specify more than one element in sensitivity list. In Veri
Create a class called ticket that records the information of a performance ticket.The class should include at least six data items: performanceId, seatRow, seatNo, class, price, da
Q. What is the significance of having less memory references? As the time needed for memory reference is more than that of a register reference so increased number of memory r
Q. Explain about Combinational Circuits? Combinational Circuit is one of the models for parallel computers. In interconnection networks, different processors correspond with ea
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd