🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.games.starcraft
22 messages
22 total messages Started by Zealot The Crazy Lui Tue, 21 Mar 2006 16:28
OK you code gurus...
#290118
Author: Zealot The Crazy Lui
Date: Tue, 21 Mar 2006 16:28
31 lines
1724 bytes
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?
-- 
"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
Re: OK you code gurus...
#290119
Author: 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
Re: OK you code gurus...
#290120
Author: Luc The Perverse
Date: Tue, 21 Mar 2006 22:32
45 lines
2265 bytes
"Zealot The Crazy Lui" <ktwils...@NOSPAM.comcast.net> wrote in message 
news:9fb022917l7so6ahphku2fin844c138r0s@4ax.com...
> 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??

Why do you think that you can muck with the stack pointer?

Are you sure it is on that line?   (IE, you remove it and the error goes 
away?)

--
LTP

:) 
Re: OK you code gurus...
#290122
Author: Marshlion
Date: Tue, 21 Mar 2006 22:58
45 lines
2989 bytes
Zealot The Crazy Lui wrote:
> 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??

I'm inclined to thign that either you can't add a static number or your 
machine is different in that your add command - I've had the later 
before. I would first try changing "add esp, 12;" to "add 12, esp;" (you 
might want to check the line "lea ebx, scanString;" as well).

--
Marsh Lion
my asm is a little rusty
Re: OK you code gurus...
#290123
Author: Zealot The Crazy Lui
Date: Tue, 21 Mar 2006 23:56
26 lines
2124 bytes
On Wed, 22 Mar 2006 10:58:47 +1200, Marsh_lion
<marsh...@SPAMparadise.net.nz> wrote:
>I'm inclined to thign that either you can't add a static number or your 
>machine is different in that your add command - I've had the later 
>before. I would first try changing "add esp, 12;" to "add 12, esp;" (you 
>might want to check the line "lea ebx, scanString;" as well).

That would be trying to make 12 = 12 + (value of esp), and since you
can't assign a number a value (it already has one) it wouldn't really
work. I'm certain the orders are correct. I've tried taking out the
add command and it made no difference whatsoever. (same error same
place) the program seems to get 'stuck' inside the printf/scanf
function and doesn't get to the stack pointer part which is what I had
originally thought was happening. Still no luck trying to fix the
problem though.

-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290121
Author: Zealot The Crazy Lui
Date: Tue, 21 Mar 2006 23:58
24 lines
2086 bytes
On Tue, 21 Mar 2006 15:32:39 -0700, "Luc The Perverse"
<sll_noSpamli...@cc.usu.edu> wrote:
>Why do you think that you can muck with the stack pointer?
>
>Are you sure it is on that line?   (IE, you remove it and the error goes 
>away?)

the error appears at that line, but it's actually still stuck in the
scanf function doing something when the exception occurs. I think I
can muck with the stack pointer because I added things to it (the push
commands) and then in order to get them off again I have to pop them
off (equivalent to adding 4 per element I pushed). I'm going to talk
to my prof after class about it in about 15 minutes.

-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290134
Author: 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?
Re: OK you code gurus...
#290135
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 00:13
16 lines
1433 bytes
On Wed, 22 Mar 2006 11:06:35 +1100, Chris Mears <ch...@cmears.id.au>
wrote:
>How have you called getData?

In the main method, yes. That's when it gets stuck.

-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290136
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 00:15
24 lines
1772 bytes
On Tue, 21 Mar 2006 16:13:09 -0800, Zealot The Crazy Lui
<ktwils...@NOSPAM.comcast.net> wrote:

>On Wed, 22 Mar 2006 11:06:35 +1100, Chris Mears <ch...@cmears.id.au>
>wrote:
>>How have you called getData?
>
>In the main method, yes. That's when it gets stuck.

Of course I missed the "How"...

getData( &n, &r );
in the main method, n & r are unassigned but defined ints.

-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290139
Author: Chris Mears
Date: Wed, 22 Mar 2006 00:18
9 lines
1145 bytes
Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net> writes:

> On Wed, 22 Mar 2006 11:06:35 +1100, Chris Mears <ch...@cmears.id.au>
> wrote:
>>How have you called getData?
>
> In the main method, yes. That's when it gets stuck.

Can you show us the main function?
Re: OK you code gurus...
#290137
Author: Chris Mears
Date: Wed, 22 Mar 2006 00:25
28 lines
1999 bytes
Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net> writes:

> On Tue, 21 Mar 2006 16:13:09 -0800, Zealot The Crazy Lui
> <ktwils...@NOSPAM.comcast.net> wrote:
>
>>On Wed, 22 Mar 2006 11:06:35 +1100, Chris Mears <ch...@cmears.id.au>
>>wrote:
>>>How have you called getData?
>>
>>In the main method, yes. That's when it gets stuck.
>
> Of course I missed the "How"...
>
> getData( &n, &r );
> in the main method, n & r are unassigned but defined ints.

Thanks.

The particular error message you got ("Access violation writing location
0xe7430e45") suggests to me that scanf is trying to write to a pointer
you gave it but the pointer is wrong.  Can you find out which pointer
has the value 0xe7430e45?  Use printf("%p"...) to print the values of
the pointers n, r and scanString in getData().

It's possible that you are not passing the arguments on the stack in the
correct order.  If that's the case, scanf will be looking at one of the
integer pointers as a string, and anything could happen.  Try reversing
the order of the arguments on the stack.
Re: OK you code gurus...
#290138
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 01:18
58 lines
2973 bytes
On Wed, 22 Mar 2006 11:25:48 +1100, Chris Mears <ch...@cmears.id.au>
wrote:

>Zealot The Crazy Lui <ktwils...@NOSPAM.comcast.net> writes:
>
>> On Tue, 21 Mar 2006 16:13:09 -0800, Zealot The Crazy Lui
>> <ktwils...@NOSPAM.comcast.net> wrote:
>>
>>>On Wed, 22 Mar 2006 11:06:35 +1100, Chris Mears <ch...@cmears.id.au>
>>>wrote:
>>>>How have you called getData?
>>>
>>>In the main method, yes. That's when it gets stuck.
>>
>> Of course I missed the "How"...
>>
>> getData( &n, &r );
>> in the main method, n & r are unassigned but defined ints.
>
>Thanks.
>
>The particular error message you got ("Access violation writing location
>0xe7430e45") suggests to me that scanf is trying to write to a pointer
>you gave it but the pointer is wrong.  Can you find out which pointer
>has the value 0xe7430e45?  Use printf("%p"...) to print the values of
>the pointers n, r and scanString in getData().

0012FE1C   0012FF60 0012FF54
scanString n	    r

(all variable pointers are in the 0012F??? range)

Unhandled exception at 0x004182c0 in Combinations and
Permutations.exe: 
0xC0000005: Access violation writing location 0xe7430e45.

printf generates this fun little error:

Unhandled exception at 0x004182cc in Combinations and
Permutations.exe: 0xC000001E:  An attempt was made to execute an
invalid lock sequence.

>It's possible that you are not passing the arguments on the stack in the
>correct order.  If that's the case, scanf will be looking at one of the
>integer pointers as a string, and anything could happen.  Try reversing
>the order of the arguments on the stack.


-- 
"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
Re: OK you code gurus...
#290124
Author: Marshlion
Date: Wed, 22 Mar 2006 04:14
36 lines
3052 bytes
Zealot The Crazy Lui wrote:
> On Wed, 22 Mar 2006 10:58:47 +1200, Marsh_lion
> <marsh...@SPAMparadise.net.nz> wrote:
> 
>>I'm inclined to thign that either you can't add a static number or your 
>>machine is different in that your add command - I've had the later 
>>before. I would first try changing "add esp, 12;" to "add 12, esp;" (you 
>>might want to check the line "lea ebx, scanString;" as well).
> 
> 
> That would be trying to make 12 = 12 + (value of esp), and since you
> can't assign a number a value (it already has one) it wouldn't really
> work. 

Yes and theory isn't always true (as mentioned in my post, I've had an 
issue where the operands of an instruction are the wrong way round).

> I'm certain the orders are correct. I've tried taking out the
> add command and it made no difference whatsoever. (same error same
> place) the program seems to get 'stuck' inside the printf/scanf
> function and doesn't get to the stack pointer part which is what I had
> originally thought was happening. Still no luck trying to fix the
> problem though.
> 

Yeah, it certainly helps if you can test things individually. Add 
commands usually aren't the source of errors (because the are easy to 
implement and check) whereas I could understand if the function call was 
at fault.

Just as an aside, whats the point of this code (or is it an assignment)? 
It is a lot easier just to write what that does in C.

--
Marsh Lion
Code breaker
Re: OK you code gurus...
#290125
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 05:24
22 lines
1922 bytes
On Wed, 22 Mar 2006 16:14:35 +1200, Marsh_lion
<marsh...@SPAMparadise.net.nz> wrote:
>Yeah, it certainly helps if you can test things individually. Add 
>commands usually aren't the source of errors (because the are easy to 
>implement and check) whereas I could understand if the function call was 
>at fault.
>
>Just as an aside, whats the point of this code (or is it an assignment)? 
>It is a lot easier just to write what that does in C.

Yes, it is a hell of a lot easier to write in C, or Java, or whatever,
but the assignment was to use inline asm, so that's what I did... :/
-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290126
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 05:26
21 lines
1676 bytes
On Tue, 21 Mar 2006 08:28:02 -0800, Zealot The Crazy Lui
<ktwils...@NOSPAM.comcast.net> wrote:

*snipp0rz*

Well thanks you guys for the assissted help. I talked to the prof and
he couldn't  understand what the problem was either, so he said just
to turn in both the asm version and the C version (the C version was
working fine, no problems) which I did. It annoys the hell out of me
that I couldn't get it to work though. It makes me think there's
soemthing wrong with my VS compiler or something...
-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290127
Author: Luc The Perverse
Date: Wed, 22 Mar 2006 05:48
27 lines
1831 bytes
"Zealot The Crazy Lui" <ktwils...@NOSPAM.comcast.net> wrote in message 
news:itn122pup0dl52f42nu4hami9lu1h0lte9@4ax.com...
> On Tue, 21 Mar 2006 08:28:02 -0800, Zealot The Crazy Lui
> <ktwils...@NOSPAM.comcast.net> wrote:
>
> *snipp0rz*
>
> Well thanks you guys for the assissted help. I talked to the prof and
> he couldn't  understand what the problem was either, so he said just
> to turn in both the asm version and the C version (the C version was
> working fine, no problems) which I did. It annoys the hell out of me
> that I couldn't get it to work though. It makes me think there's
> soemthing wrong with my VS compiler or something...

No - you are doing something wrong.

It's not the compiler.

You are probably passing something wrong.   It gets really hairy deferencing 
pointers and stuff.

Find a working example and try to see what you are doing different.

--
LTP

:) 
Re: OK you code gurus...
#290128
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 08:20
32 lines
2375 bytes
On Tue, 21 Mar 2006 22:48:10 -0700, "Luc The Perverse"
<sll_noSpamli...@cc.usu.edu> wrote:
>No - you are doing something wrong.
>
>It's not the compiler.
>
>You are probably passing something wrong.   It gets really hairy deferencing 
>pointers and stuff.
>
>Find a working example and try to see what you are doing different.

See, that's the thing. I've tried "working examples" and they dont'
work. My prof's example, even the bloody example given in the VS help
files on how to call a c function with inline asm. It just doesn't
work! I've tried lots of little bits of switching this and that and
checking values of stuff, but none of it seems to make any difference.
asm C function call = exception. That's it. With printf passing only 1
string it gives me an exception. The string has to be passed right
because I created it immediately before the asm section within the
getData method. There's something wrong that's beyond my control here,
I just don't know what it is.

-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290129
Author: Spyderizer
Date: Wed, 22 Mar 2006 10:49
25 lines
2477 bytes
Zealot The Crazy Lui wrote:
> On Tue, 21 Mar 2006 22:48:10 -0700, "Luc The Perverse"
> <sll_noSpamli...@cc.usu.edu> wrote:
>> No - you are doing something wrong.
>>
>> It's not the compiler.
>>
>> You are probably passing something wrong.   It gets really hairy deferencing 
>> pointers and stuff.
>>
>> Find a working example and try to see what you are doing different.
> 
> See, that's the thing. I've tried "working examples" and they dont'
> work. My prof's example, even the bloody example given in the VS help
> files on how to call a c function with inline asm. It just doesn't
> work! I've tried lots of little bits of switching this and that and
> checking values of stuff, but none of it seems to make any difference.
> asm C function call = exception. That's it. With printf passing only 1
> string it gives me an exception. The string has to be passed right
> because I created it immediately before the asm section within the
> getData method. There's something wrong that's beyond my control here,
> I just don't know what it is.
> 

Missing an include somewhere?
Re: OK you code gurus...
#290130
Author: Zealot The Crazy Lui
Date: Wed, 22 Mar 2006 16:08
20 lines
1651 bytes
On Wed, 22 Mar 2006 22:49:36 +1200, Spyderizer <n...@spam.com> wrote:
>Missing an include somewhere?

You think I need more than:
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include "boolean.h"
#include "combinatorics.h"
?
-- 
"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 7D6h.3h.Ch
Re: OK you code gurus...
#290131
Author: Spyderizer
Date: Thu, 23 Mar 2006 07:09
15 lines
1953 bytes
Zealot The Crazy Lui wrote:
> On Wed, 22 Mar 2006 22:49:36 +1200, Spyderizer <n...@spam.com> wrote:
>> Missing an include somewhere?
> 
> You think I need more than:
> #include <stdio.h>
> #include <assert.h>
> #include <stdlib.h>
> #include "boolean.h"
> #include "combinatorics.h"
> ?

I just seem to remember a programming lecturer having a similar problem 
with a program that by all logic should have just worked. IIRC, it was 
something in the compiler that wasn't set up correctly.
Re: OK you code gurus...
#290132
Author: Steven Ung
Date: Mon, 27 Mar 2006 23:19
30 lines
2073 bytes
"Luc The Perverse" <sll_noSpamli...@cc.usu.edu> wrote in message 
news:f257f3xmqc.ln2@loki.cmears.id.au...
> "Zealot The Crazy Lui" <ktwils...@NOSPAM.comcast.net> wrote in message 
> news:itn122pup0dl52f42nu4hami9lu1h0lte9@4ax.com...
>> On Tue, 21 Mar 2006 08:28:02 -0800, Zealot The Crazy Lui
>> <ktwils...@NOSPAM.comcast.net> wrote:
>>
>> *snipp0rz*
>>
>> Well thanks you guys for the assissted help. I talked to the prof and
>> he couldn't  understand what the problem was either, so he said just
>> to turn in both the asm version and the C version (the C version was
>> working fine, no problems) which I did. It annoys the hell out of me
>> that I couldn't get it to work though. It makes me think there's
>> soemthing wrong with my VS compiler or something...
>
> No - you are doing something wrong.
>
> It's not the compiler.
>
> You are probably passing something wrong.   It gets really hairy 
> deferencing pointers and stuff.
>
> Find a working example and try to see what you are doing different.


Why don't CZ send the code to Luc for debugging?
-- 
Steven Ung
The Ignorant Asian 
Re: OK you code gurus...
#290133
Author: Luc The Perverse
Date: Tue, 28 Mar 2006 02:49
43 lines
2451 bytes
"Steven Ung" <ste...@nodomainname.com> wrote in message 
news:ks8mf3xqa2.ln2@loki.cmears.id.au...
> "Luc The Perverse" <sll_noSpamli...@cc.usu.edu> wrote in message 
> news:f257f3xmqc.ln2@loki.cmears.id.au...
>> "Zealot The Crazy Lui" <ktwils...@NOSPAM.comcast.net> wrote in message 
>> news:itn122pup0dl52f42nu4hami9lu1h0lte9@4ax.com...
>>> On Tue, 21 Mar 2006 08:28:02 -0800, Zealot The Crazy Lui
>>> <ktwils...@NOSPAM.comcast.net> wrote:
>>>
>>> *snipp0rz*
>>>
>>> Well thanks you guys for the assissted help. I talked to the prof and
>>> he couldn't  understand what the problem was either, so he said just
>>> to turn in both the asm version and the C version (the C version was
>>> working fine, no problems) which I did. It annoys the hell out of me
>>> that I couldn't get it to work though. It makes me think there's
>>> soemthing wrong with my VS compiler or something...
>>
>> No - you are doing something wrong.
>>
>> It's not the compiler.
>>
>> You are probably passing something wrong.   It gets really hairy 
>> deferencing pointers and stuff.
>>
>> Find a working example and try to see what you are doing different.
>
>
> Why don't CZ send the code to Luc for debugging?

I'll tell you EXACTLY what I would do.

Write as close as you can, precisely the C code to do what you want to 
happen (but don't go down to register level)

Then, look at the disassembly in the debugger.

Compare for differences.

--
LTP

:) 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads