After seeing a program where there are more returns than calls... > Now to answer the question "Why don't this work?:" > > It is like Mr. Ringer. Most Sundays when we would go to > church we would stop at the crossroads and pick up Mr. Ringer > and give him a ride to church. > When the collection plate was passed during the service I > noticed that sometimes he would put a dollar in the > collection plate then take out four dollars, as if he was > making change for a five dollar bill. Later in life I > realized that Mr. Ringer had given much to the community and > the church in earlier years and everyone knew he was "making > change" but as he was sometimes very short on money and too > proud to ask for charity, every one was happy that a small > part of the collection was going directly to where it was needed. > > Just as Mr. Ringer put money in the collection plate when he > had it, you return from the sinetable routine with the RETLW > pulling a return address off the stack. And then at the end > of the program you try that again with the RETLW 0 > instruction. But there was nothing on the stack. And your > program, unlike Mr. Ringer, goes to Hell! One of the better explanations of stack overflow... Errr... Underflow. --- James Newton: PICList webmaster/Admin mailto:jamesnewton@piclist.com 1-619-652-0593 phone http://www.piclist.com/member/JMN-EFP-786 PIC/PICList FAQ: http://www.piclist.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist