🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.games.starcraft
Article #290134

Re: OK you code gurus...

#290134
From: Chris Mears
Date: Wed, 22 Mar 2006 00:06
25 lines
1477 bytes
Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net> writes:

> why doesn't this work?
> (C Lang)
> void getData( int* n, int* r )
> {   
> 	char scanString[] = "%d %d";
> 	_asm
> 	{
> 		push r;
> 		push n;
> 		lea ebx, scanString;
> 		push ebx;
> 		call scanf;
> HERE>		add esp,12;
> 	}
> }
>
> where it's marked "HERE>" I get some error (Unhandled exception at
> 0x004182c0 in Combinations and Permutations.exe: 0xC0000005: Access
> violation writing location 0xe7430e45.) and it gets stuck at that
> point. This is exactly how it should be according to my prof, and a
> one other guide I found. Why the hell doesn't it work?

How have you called getData?
Technical Details
Message-ID: <m3y7z3wdf8.fsf@loki.cmears.id.au>
Path: mbox-mo1.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!not-for-mail
References: <34a022ta3sjetnjnkvluulh8sajiq1t5ih@4ax.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!not-for-mail
Newsgroups: alt.games.starcraft
Subject: Re: OK you code gurus...
References: <34a022ta3sjetnjnkvluulh8sajiq1t5ih@4ax.com>
From: Chris Mears <ch...@cmears.id.au>
Date: Wed, 22 Mar 2006 11:06:35 +1100
Message-ID: <m3y7z3wdf8.fsf@loki.cmears.id.au>
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)
Cancel-Lock: sha1:ZLOhbgscix//umHGhTe4X5jDnQ4=
MIME-Version: 1.0
Lines: 25
NNTP-Posting-Host: 220.237.36.237
X-Trace: 1142986204  20112 220.237.36.237
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit