====== STACKS ====== The 6x09 microprocessors contain two stack pointer registers S, and U. The microprocessor itself uses the S or System stack pointer for all of its operations which require stack. The U or User stack pointer is available for the developer to use as their own stack. ===== CMOC EXAMPLE ===== void stacks(word sstack, word ustack) { asm { TFR S,D STD sstack } printf("S STACK = %4x\n", sstack); asm { TFR U,D STD ustack } printf("U STACK = %4x\n", ustack); } {{:tandy_color_computer:stacks-coco2b.png?direct&400|Color Computer 2B}} {{:tandy_color_computer:stacks-coco3.png?direct&400|Color Computer 3}} ===== SEE ALSO ===== The Color Computer 3 also uses a [[Secondary Stack]] memory block for high-resolution drawing commands. ===== RTS ===== Return to [[:Tandy Color Computer:]]