stack instructions, Basic Computer Science

Assignment Help:
These instructions permit the use of the stack to store or recover data.
POP
POPF
PUSH
PUSHF

POP INSTRUCTION
Purpose: It improves a portion of information from the stack
POPF INSTRUCTION
Purpose: It extracts the flags stored on the stack
POPF
This command moves bits of the word stored on the superior part of the stack to the flag register.
PUSH INSTRUCTION
Purpose: It puts a word on the stack.
Syntax:
PUSH source
The PUSH instruction reduces by two the value of SP and then transfers the data of the source operator to the new resulting address on the just modified register.
The decrement on the address is due to the fact that when adding values to the stack, this one raises from the greater to the smaller segment address, consequently by subtracting 2 from the SP register what we do is to raise the size of the stack by two bytes, which is the only amount of information the stack can handle on every input and output of information.
PUSHF INSTRUCTION
Purpose: It situates the value of the flags on the stack.
Syntax:
PUSHF
This command reduces by 2 the value of the SP register and then the content of the flag register is relocated to the stack, on the address indicated by SP.
The flags are gone stored in memory on the similar bits indicated on the POPF command.

Related Discussions:- stack instructions

Types of chat room, Types of chat room: Java Chat rooms: The most comm...

Types of chat room: Java Chat rooms: The most common and popular chat scripts are based on java which is object oriented language. Java is freely available and comes with virt

Designing computer based system-systems life cycle approach, Systems Life C...

Systems Life Cycle Approach Systems Analysis and Design follows a life cycle for development, as shown below. Brief discussion on this approach is given here: Figure

Logic and arithmetic functions, The instructions of the logic functions are...

The instructions of the logic functions are: and not, or and xor. These act on the bits of their operators. To make sure the result of the operations we revolve to the cmp and test

Explanation pre increment with example, Problem 1 What is precedence of...

Problem 1 What is precedence of operators? How are expressions evaluated using precedences? Defining precedence of operators Explanation of how expressions are evaluat

Consistency or data in dbms, Consistency or data in DBMS Consistency - da...

Consistency or data in DBMS Consistency - data in DBMS(Database) is accurate in modeling real world, follows integrity constraints User may ensure transaction consistent by itsel

Computer processing, Computer Processing: Most of the earliest compute...

Computer Processing: Most of the earliest computer memories have been based on physical elements which can exist in just one of the two states (on or off): such an element cor

Computer generations, Computer Generations: From the early 1940's to t...

Computer Generations: From the early 1940's to the present, computer scientists have been able to identify clear-cut stages in the development of computer technology. With eac

How will url services be affected, URL services has two divisions. Basic we...

URL services has two divisions. Basic webpages and custom webpages. Ricky Vega, Custom's manager wants to find out why Custom is not profitable. He has prepared the following repor

Probability, Mike sells on the average 15 newspapers per week (Monday – Fri...

Mike sells on the average 15 newspapers per week (Monday – Friday). Find the probability that 2.1 In a given week he will sell all the newspapers

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

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!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd