
4-18
x86 MICROPROCESSORS
Stack Overflow and Underflow
SP can have a maximum value of FFFFH. For each PUSH operation, the SP value decre-
ments by 2, and in the limiting case, it can go to SP = 0000.
Any PUSH operation beyond this will cause a ‘stack overflow’. This creates a con-
dition when there is no space in the stack for new data.
Stack underflow is the other case when POP operations cause SP to have values
beyond the defined top of stack.
4.3 | Macros
The name of our assembler is ‘Macro assembler’. As such, we see that it is expected
to be able to handle an item called ‘macros’. What is a macro? It is like an opcode –
when used, it executes. ...