🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.games.starcraft
Article #290119

Re: OK you code gurus...

#290119
From: Zealot The Crazy Lui
Date: Tue, 21 Mar 2006 16:47
43 lines
2438 bytes
On Tue, 21 Mar 2006 08:28:02 -0800, Zealot The Crazy Lui
<ktwils...@NOSPAM.comcast.net> wrote:

>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?

Also nice to note...
whenever I try to use the prof's exact example, I get this:
Unhandled exception at 0x004182bc in test.exe: 0xC000001E:  An attempt
was made to execute an invalid lock sequence.

the first time it tries to add to esp. I'm assuming that if my prof
says we are suppoed to be able to add to esp, we are probably supposed
to be able to add to esp, so why won't it let me??
-- 
"No I'm saying that I'm a cow dung." - Stephen "Suupernuubie" Ung
"Eat a bag of hell." - Cyric The Mad
"I'm all for the girl on girl action, but it could put a strain on the marriage" - LTP

MSN:ktw...@hotmail.com (BUT DON'T SEND E-MAIL!) YIM: ktwilson AIM: YahooKyleW
Zealot the Crazy Lui
Grand 16-Star General and overall director of AGSC operations for the Pronoun Army(and webmaster)
http://pronounarmy.homestead.com/ http://thirty-five-mil.blogspot.com/
re-vamped sig 11111010110.0010.10000
Technical Details
Message-ID: <9fb022917l7so6ahphku2fin844c138r0s@4ax.com>
Path: mbox-mo1.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!txtfeed2.tudelft.nl!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!feed10.multikabel.net!feeder1.cambrium.nl!feed.tweaknews.nl!138.199.65.86.MISMATCH!sn-ams-06!sn-xt-ams-08!sn-post-ams-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
References: <34a022ta3sjetnjnkvluulh8sajiq1t5ih@4ax.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeeder.wxs.nl!txtfeed2.tudelft.nl!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!feed10.multikabel.net!feeder1.cambrium.nl!feed.tweaknews.nl!138.199.65.86.MISMATCH!sn-ams-06!sn-xt-ams-08!sn-post-ams-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net>
Newsgroups: alt.games.starcraft
Subject: Re: OK you code gurus...
Date: Tue, 21 Mar 2006 08:47:35 -0800
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <9fb022917l7so6ahphku2fin844c138r0s@4ax.com>
References: <34a022ta3sjetnjnkvluulh8sajiq1t5ih@4ax.com>
X-Newsreader: Forte Agent 3.0/32.763
MIME-Version: 1.0
X-Complaints-To: ab...@supernews.com
Lines: 43
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit