From: "R. Brenner" Newsgroups: comp.os.msdos.djgpp Subject: problem with using external NASM procedures Date: Tue, 11 Aug 1998 00:58:49 +0200 Organization: Swisscom AG, the blue window Lines: 27 Message-ID: <6qntq4$bl1$1@bw107zhb.bluewin.ch> NNTP-Posting-Host: zhb48pub38.bluewin.ch To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I'm using NASM with DJGPP together. When I want to use an ASM routine, I wrote, in my C program, it works fine until I want to use it in a loop, like (for i=0; i<100; i++) routine(). Then some really strange things happen like crashing or rebooting my computer...what helps? An example of an asm routine I use: (which doesnt work in a loop) _xcopy: push ebp mov ebp,esp mov esi,[ebp+8] ; param1 = source mov edi,[ebp+12] ; param2 = destination mov ecx,[ebp+16] ; param3 = length rep stosd mov esp,ebp pop ebp ret