45181 Parallax Inc, 45181 Datasheet - Page 166
![SX TECH TOOL KIT NO POWER](/photos/9/29/92994/mfg_45181_sml.jpg)
45181
Manufacturer Part Number
45181
Description
SX TECH TOOL KIT NO POWER
Manufacturer
Parallax Inc
Series
SXr
Type
Microcontrollerr
Datasheet
1.45180.pdf
(184 pages)
Specifications of 45181
Contents
SX Book, SX Key, SX Tech Board, Samples, Resonators, Cable and Manual
Product
Microcontroller Basic Stamps
Operating Supply Voltage
5 V
For Use With/related Products
SX MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 166 of 184
- Download datasheet (2Mb)
15 Appendix E: SX Data Sheet
15.2.20 The Pop
When a return instruction is executed, the stack is popped. Specifically, the content of Stack 1 is copied
to the program counter and the content of each address in the stack is copied to the next higher level.
Stack 1 gets the value that was in Stack 2, etc. until Stack 7 is overwritten with the contents of Stack 8.
Consequently, the contents that were in Stack 8 are now duplicated in Stack 7.
15.2.21 Stack Overflow
As mentioned before, the stack can store up to eight return addresses (with Stack Extend on), or up to
two return addresses by default. With each push, the stack stores another address. When the stack is
full, the next push results in an overflow. The first time the stack is pushed into an overflow condition,
the first address pushed is lost forever. If the stack were to be pushed again, the second address pushed
would be lost also. A stack overflow condition inevitably leads to unintentional infinite loops or bizarre
looping actions in your program. Care should be taken to ensure a stack overflow does not ever occur.
15.2.22 Stack Underflow
When the stack is popped more times than it has been pushed, a stack underflow occurs. Since a stack
underflow causes unknown addresses to be stored in PC, a program may perform bizarre looping
actions, such as a jump to unused program memory.
15.2.23 Returns
There are five different return instructions available on the SX. The RET (return) instruction simply
pops the stack thereby setting the program counter to the instruction that followed the call. The RETW
(return with literal in w) instruction behaves the same way but loads W with the literal value specified.
RETP pops the stack and updates the page select bits to point to the page returned to. RETI pops the
Page 166 SX-Key/Blitz Development System Manual 2.0 Parallax, Inc.
Figure 35 - The Pop
PC<10:0>
Stack 1
Stack 2
Stack 3
Stack 4
Stack 5
Stack 6
Stack 7
Stack 8
Related parts for 45181
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![451-00303](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
Terminals 3 Pin Single Row Header (long)
Manufacturer:
Parallax Inc
![451-04001](/photos/39/86/398671/451-04001-l_tmb.jpg)
Part Number:
Description:
Headers & Wire Housings 16 Pin Single Row Header
Manufacturer:
Parallax Inc
![30008](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
![70009](/photos/26/92/269208/70009-l_tmb.jpg)
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
![27404](/photos/26/91/269197/27404-l_tmb.jpg)
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
![70016](/photos/8/99/89966/mfg_70016_tmb.jpg)
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
![30008](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
![70009](/photos/26/92/269208/70009-l_tmb.jpg)
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
![28135](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
![SX18AC/SO](/images/manufacturer_photos/0/5/515/parallax_inc_tmb.jpg)
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: