Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site cwruecmp.UUCP Path: utzoo!linus!decvax!cwruecmp!bammi From: bammi@cwruecmp.UUCP (Jwahar R. Bammi) Newsgroups: net.micro.atari Subject: ST help! Message-ID: <1367@cwruecmp.UUCP> Date: Tue, 7-Jan-86 02:36:03 EST Article-I.D.: cwruecmp.1367 Posted: Tue Jan 7 02:36:03 1986 Date-Received: Wed, 8-Jan-86 20:05:17 EST Organization: CWRU Dept. Computer Eng., Cleveland, OH Lines: 73 Has anyone had any luck with the xbios Xbtimer() trap. Every time I try to use it I get 2 Mushrooms. I have tried my code in supervisor mode and get the same result. Here is a short test program I wrote to see what was going on. I use a control register value of 7 which should give me a prescale value of 200, and data register value of 0 that should give me a count of 256 for timer 'a' on the 68901. Theoretically i should get an interrupt frequency of 48 Hz. ( 2.4576 Mhz / 256 / 200 ). #include #define VOID int long counter; /* Interrupt handler */ VOID my_handler() { counter++; } /* Start_timer */ VOID start_timer() { VOID my_handler(); /* Start the timer */ counter = 0L; Xbtimer(0, 7, 0, my_handler); } /* Stop the timer */ VOID stop_timer() { VOID my_handler(); /* Stop the timer by clearing the timer a control register */ Xbtimer(0, 0, 0, my_handler); } /* Stack pointer save area */ long ssp_save; main() { /* Save the super stack, get into super mode using USR stack */ ssp_save = Super(0L); start_timer(); while(counter == 0L) /* twiddle thumb */; /* Got interrupt */ stop_timer(); /* get out of supervisor mode */ Super(ssp_save); Cconws("I made it!!\r\n"); /* I never get the message */ } Any help will be much appreciated. -- Jwahar R. Bammi Usenet: .....!decvax!cwruecmp!bammi CSnet: bammi@case Arpa: bammi%case@csnet-relay CompuServe: 71515,155