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

Browser cookies, Browser Cookies: A cookie is a small message sent by ...

Browser Cookies: A cookie is a small message sent by the Web server to a your web client. This message is stored by the browser as a text file. The basic purpose of cookie is

Cop2505, Create a program that uses a menu with options to enter student in...

Create a program that uses a menu with options to enter student information (name, ID, GPA), print student information, or quit the program. Use data files and FILE pointers to sto

Define z-transform of sequence x[n], QUESTION (a) Define z-transform o...

QUESTION (a) Define z-transform of sequence x[n]. (b) A causal LTI system has impulse response h[n], for which the z-transform is                     H(z) = (1+z -1

Socket programming, Important: • No cheating will be tolerated. • No late s...

Important: • No cheating will be tolerated. • No late submissions. Total Points for this programming assignment: 100 The goal of your programming assignment is to build and experim

Python - Dictionary, A dictionary is variable and is one more container typ...

A dictionary is variable and is one more container type that can store any number of Python objects, counting other container types. Dictionaries consist of pairs (identified items

Variable - concept of programming language, Variable - Concept of programmi...

Variable - Concept of programming language: Variable: As referencing memory by its physical address is very tedious, variable names are used. A variable is a symbolic name giv

Java, what is meant by deliverable in strus base applications

what is meant by deliverable in strus base applications

In-door patient department, In-door Patient Department Ideally all ...

In-door Patient Department Ideally all features of OPD.  Both OPD and IPD modules should be inter-linked.  In addition all details pertaining to the patient's medica

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