ch4-stackString

ch4-stackString - Stack and string instructions EE 3750...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Stack and string instructions EE 3750 2 Stack instructions PUSH source action 1: SP ! SP-2 action 2: word to which SP points in stack segment ! source POP dest action 1: dest ! word to which SP points in stack segment action 2: SP ! SP+2 PUSHF - push flags register onto stack POPF - pop from stack to flags register PUSHFD - push EFLAGS register POPFD - pop EFLAGS register PUSHA - push all 16-bit registers (on 80286+) POPA - pop all 16-bit registers (on 80286+) PUSHAD - push all 32-bit registers (on 80386+) POPAD - pop all 32-bit registers (on 80386+)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3 Stack example SS*16 = 50000 50001 50002 50003 50004 50005 50006 50007 PUSH AX PUSH BX . . . POP BX POP AX ! TOS0 ! TOS1 ! TOS2 ! TOS3 ! TOS4 ! TOS0 ! TOS1 ! TOS2 , TOS3 , TOS4 Initially, AX = 1234H, BX = 07A9H, SS= 5000H, SP = 6H 12 34 07 A9 4 String instructions — background DF — direction flag DF = 0 : auto-increment (+1 for byte, +2 for word) DF = 1 : auto-decrement
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

Page1 / 7

ch4-stackString - Stack and string instructions EE 3750...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online