Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. static unsigned __starttime;
  2.  
  3. void uSDL_StartTicks(void){
  4.         __asm__ __volatile__ (
  5.         "int $0x40"
  6.         :"=a"(__starttime)
  7.         :"a"(26),"b"(9)
  8.         :"memory"
  9.     );
  10. }
  11.  
  12. unsigned uSDL_GetTicks(void){
  13.     unsigned __curtime;
  14.     __asm__ __volatile__(
  15.         "int $0x40"
  16.         :"=a"(__curtime)
  17.         :"a"(26),"b"(9)
  18.         :"memory"
  19.     );
  20.     return (__curtime-__starttime);
  21. }
  22.  
  23. void uSDL_Delay(unsigned time){
  24.     __asm__ __volatile__(
  25.         "int $0x40"
  26.         ::"a"(5), "b"(time/3)
  27.         :"memory"
  28.     );
  29. }
  30.