thanks, but i'm not shure if this will work for me, as i use a compiler to generate the assembler code. so i think i have to patch the assembler code, before the compiler forwards it to the assembler?!? thanks tino Scott Dattalo Gesendet von: pic microcontroller discussion list 11.09.02 08:16 Bitte antworten an pic microcontroller discussion list An: PICLIST@MITVMA.MIT.EDU Kopie: Thema: Re: stack check in mplab simulator (5.62) On Wed, 11 Sep 2002, Martin Buehler wrote: > i simulate my code for a 16f876 using the mplab simulator. > this chip has 8 hardware stack levels. so i think the simulator does > automatically check, that i never use more than 8 levels. > for system integration, i would like to work with the icd, which uses 1 > stack level itself. > how can i reduce the stack size for the simulation to 7, so that i can see > > in the simulation, if i will get problems, using the icd? > i could not find a file, where i can define the number of stack levels. > tino org 0 ifdef SIMULATING_ONLY call $+1 ; push a bogus value onto the stack. endif bra start Is that what you're looking for? Scott -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.