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).
In a particular exchange during busy hour 1200 calls were offered to a group of trunks, during this time 6 calls were lost. The average call duration being 3 minutes Calculate
a. How to use source files in PHP? Define with examples. b. What are benefits of PHP sessions? How is a PHP session formed? c. What is XML and explain its utility? Design an
What are the Applications of Linked List are a) Fixed block storage allocation b) garbage collection
In this technique, operand field of instruction includes an address and an index register thatcomprises an offset. This addressing scheme is normally used to address the consecutiv
Identify the type of cohesion in the following statements: 1. Compute average daily temperatures at various sites 2. Initialize sums and open files 3. Create new temperature rec
Interrupt handling: Handling Interrupts Several situations where the processor should avoid interrupt requests Interrupt-enable Interrupt-disable Typical
Q. Find 10's complement for decimal number? Adding 1 in 9's complement produces 10's complement. 10's complement of 0256 = 9743+1 = 9744. Please note on adding the number in
Step 1: Click on the icon in the object tool bar Or Insert -> SSI Step 2: Select the file Step 3: Add the file Step 4: Provide the URL (where to be attached) Step
Q. Design Odd-Even Transposition Algorithm? Algorithm: Odd-Even Transposition for I=1 to N { If (I%2 != 0) //i.e. Odd phase {
Adavantages and disadvantages of compilers and interpreters
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd