Re: A89: Delays, how do you create them


Re: A89: Delays, how do you create them

Yes I did check that header file out.  I came up with the following code that
is SUPPOSED to make a small arrow blink but it doesnt.  Heres the code:

//begin code snippit

static unsigned char arrow[]=
    { 0xFE, 0x82, 0x44, 0x28, 0x10, 0x0, 0x0, 0x0};//the arrow sprite

OSFreeTimer(USER_TIMER);//free the user timer for use
OSRegisterTimer(USER_TIMER,2*20);//register the user timer for 2 seconds (???)
Sprite8(80,90,8,arrow,LCD_MEM,SPRT_XOR);//put the arrow sprite on the screen
while(!ngetchx())//while no keys are pressed excute the following code
    if(OSTimerExpired(USER_TIMER))//if the user timer is expired excute the
        Sprite8(80,90,8,arrow,LCD_MEM,SPRT_XOR);//XOR the sprite to the screen
    }//end if
}//end while
//end code snippit

Can you tell me why that doesnt work?  Is it something with the while loop or
ngetchx() function conflicting with the timers?  (just a thought)  Well if
you can help me i would GRREATLY appreciate it as i could continue with
making my game.  

Thanks again!,