🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #41691

graf_mkstate

#41691
From: Inst.f.Allg.Elektrotechnik
Date: Thu, 08 Mar 1990 14:46
48 lines
1974 bytes
A simple timing loop with graf_mkstate gives about 2500 microseconds
per call. The Turbo-C program is appended to the end of this message.
I use TOS 1.4 and the same result is obtained with Pascal.

However it takes at least 0.1 seconds before graf_mkstate recognizes 
any button state change. So we have at least 40 calls to this 
AES routine before the change is detected.

I cannot imagine any reason for this. 
If anybody knows, please give an explanation.

Roland Schreier         _                     Technical University of Vienna
Gusshausstrasse 27-29  |_)  _  |  _   _   _|  +43 (222) 58801 3838
A-1040 Wien            | \ (_) | (_| | | (_|  SCHREIER@EAECL1.UNA.AT
Oesterreich - Europe                          roland@tuvie.at

/* ---------------------------------------------------------------- */

/*    BWAIT       Button Wait                                       */
/*    author      Roland Schreier                                   */

#include <stdio.h>
#include <aes.h>
#include <time.h>

int main()
{
  int mx, my, mstate, kstate ;
  char s[128] ;
  long count ;
  clock_t time ;
  
  appl_init() ;
  count = 0 ; time = clock() ;
  do
  {
    count++ ;
    graf_mkstate(& mx, & my, & mstate, & kstate) ;
  } while (mstate == 0) ;
  time = clock() - time ;
  sprintf(s, "[0][mstate = %#.4x |%li ticks |%li calls |%li microseconds ][ OK ]",
             mstate, time, count, (time * 1000000L) / (CLK_TCK * count)) ;
  form_alert(1, s) ;
  appl_exit() ;
  return 0 ;
} /* main */

/* ---------------------------------------------------------------- */
Technical Details
Message-ID: <1160@tuvie>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!tuvie!roland

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!tuvie!roland
From: roland@tuvie (Inst.f.Allg.Elektrotechnik)
Newsgroups: comp.sys.atari.st
Subject: graf_mkstate
Message-ID: <1160@tuvie>
Date: 8 Mar 90 14:46:44 GMT
Reply-To: roland@tuvie.UUCP (Inst.f.Allg.Elektrotechnik)
Organization: Technical University of Vienna
Lines: 48