The error said stack overflow. You are looking in the wrong place. chkstk.asm is where the program actually ran out of stack memory, but your problem is a design issue. When the error happens look at the call stack in the debugger to see what function(s) were called to produce the overflow. You either: 1. Tried to allocate too much memory from the stack. e.g. void badfunc( void ) { long badvar[128*1024]; ... } or, 2. Got caught in a deep function call loop that ended with the same effect as 1. e.g. for small values this is fine, for larger values it will blow the stack long badrecurse( long R ) { long r = 1; // alloc 4 bytes off stack - each iteration! if( R > 1 ) r = badrecurse(R-1); return(R * r); } ...cmk Save the whales - collect the whole set