
PROGRAMMING CONCEPTS III 155
It is important to be very clear about stack operations if you plan to use the stack. Any wrong
alteration of the stack can cause a system crash.
Stack Overfl ow and Underfl ow
SP can have a maximum value of FFFFH. For each PUSH operation, the SP value decrements
by 2, and in the limiting case, it can go to SP = 0000.
Any PUSH operation beyond this will cause a ‘stack overfl ow’. is creates a condition
when there is no space in the stack for new data.
Stack underfl ow is the other case when POP operations cause SP to have values beyond
the defi ned top of stack.
4.3 | Macros
e name of our assembler is ‘Macro assembler’. ...