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

Fuction to delete a record in phone book in c, function to delete a telepho...

function to delete a telephone book record in c programing using struct and objects...?

Describe the binary search algorithm, QUESTION 1 Describe the binary se...

QUESTION 1 Describe the binary search algorithm using an example of your own. QUESTION 2 (a) By showing all your workings, give a big-O estimate for f(x) = (x + 1)lo

Basic, WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL M...

WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL MARKS AND PERCENTAGE

Data transmission, Data transmission: Most digital communication data i...

Data transmission: Most digital communication data is transmitted in a serial form, that is, only one bit at a time. Transmission of data in serial form means each bit is tran

Long term goal of artificial intelligence, Long term goal of artificial int...

Long term goal of artificial intelligence: This is not to be complex with the applications of AI programs to other sciences, discussed later. Rather, it is just pointing out th

Word processing software, Word Processing Software : The main use for word...

Word Processing Software : The main use for word processing is found in secretarial offices and small publishing companies. However, if you are involved in generating your own cor

Hardware basics, HARDWARE BASICS In the foregoing section of this Unit...

HARDWARE BASICS In the foregoing section of this Unit, an attempt has been made to explain to you the historic perspective relating to the development of computer from its ear

N-ary relationships in database design, n-ary relationships in database des...

n-ary relationships in database design Each n-ary where n>2 relationship type is maped into a table name of the relationship works as the name of the table. The primary key of suc

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