Thanx So Much Ron, your support is so great.
Problem Solved ! But still I dont know the reason of this error.
Let me explain what was the problem, and sometime I tought that I am really stuppid . :)


//--------------------------------------------------------------
do
{  // GAMELOOP
        gamestate_draw();
        switch(game.status)
        {
                case GAME_PLAY: gamestate_elapse();   break;
                case GAME_REPLAY: gamestate_replay(); break;
        }
        gamestate_preparedraw();
        gamestate_playsounds();
                        
        EvtGetEvent(&event, eventN);
                
        if (! SysHandleEvent(&event))
                if (! MenuHandleEvent(0, &event, &error))
                        if (! ApplicationHandleEvent(&event))
                                FrmDispatchEvent(&event);
}
while(game.status==GAME_PLAY || game.status==GAME_REPLAY);
//--------------------------------------------------------------


In this loop gamestate_elapse() was too big. It was at Segment2. Compile and run game works fine. So I decide to divide it like this


//-----------------------------------
gamestate_elapse()
{
        ...
        a
        b
        c
        d
        ...
}
//-----------------------------------
and after division my code was like this;

//-----------------------------------
game_subproc
{
        a
        b
        c
        d
}

gamestate_elapse()
{
        ...
        game_subproc();
        ...
}
//-----------------------------------


At this point Signed .word overflow error occured, and then I try many things (more than 2 days, may be I am really stuppid). 3 segments etc..
Nothing works except if I put sub proc in it and removing sub proc.


This is really interesting because problem wasnt in there. Somehow this
effected to my another subroutine which is also includes switch(). :) :) :) Problem solved when I use a subroutine except some of lines of it.


I am really sure that this switch() never changed. This is really ineresting. But I must say that please use small switch()s if your codes so big; Use subroutines (procs) !

Thanx Ron,

YILMAZ YORU

Ron Nicholson wrote:

On Sun, 10 Oct 2004 23:25:54, YILMAZ YORU writes:

When I add a new proccedure to my application code this error occurs;
Is this the end of my codes ? :(

"/cygdrive/c/DOCUME~1/YILMAZ/LOCALS~1/Temp/cc7SEX7w.s:22702: Error: Signed .word overflow; switch may be too large; 33176 at 0x3d76
make: *** [myapp.o] Error 1 "



What "Signed .word overflow" means ? I dont understood this.


Could be a branch offset too large to fit inside a word-sized signed integer.
Do you have a large switch statement?  Break it into halves, or try making
it smaller (perhaps moving some ot the code into subroutines?).  Do you
have code at the beginning calling procedures near the end?  Try moving
the calling code or the called procedure towards the middle.  etc.


Ron Nicholson
HotPaw Productions
http://www.hotpaw.com/rhn/palm



-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to