🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Xbtimer() troubles!!!!

#26801
From: peterb
Date: Wed, 13 May 1987 21:33
39 lines
1598 bytes
--

Ok, I give up. I've been battling the developers package documentation
long enough, so someone educate me:

I'm trying to get a 5Khz tick value by using Xbtimer(), and a service
routine. I kluged up a program to test this out, and its:

long tick=0;
int kick_count();

main()
{
	Xbtimer(0, 1, 122, &kick_count); /* gives a clock of 5039.xxx Hz */

	/* .. When I want the value of the tick, I just use tick */
}

kick_count() is in assembler which only increments tick. It does not
use any registers at all.

Of course the program doesn't run, and crashes after the call to Xbtimer().

Now the question: How do I get the damn thing to work?  Which return
do I use on my kick_count routine, and rts, rte, or an rtr? And do
I have to hack anything on the stack before the return to get this to work???

Help! I am going nuts!

Could some kind soul send me a code example, both for the call to Xbtimer()
and the little service routine to increment tick???

Thanx in advance,
--
Peter Barada
Xyvision, Inc.
(617)-245-4100
UUCP: ...!ihnp4!mirror!beldar!peterb
Technical Details
Message-ID: <49500004@beldar>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!necntc!adelie!mirror!st!beldar!peterb

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!necntc!adelie!mirror!st!beldar!peterb
From: peterb@beldar.UUCP
Newsgroups: comp.sys.atari.st
Subject: Xbtimer() troubles!!!!
Message-ID: <49500004@beldar>
Date: Wed, 13-May-87 17:33:00 EDT
Article-I.D.: beldar.49500004
Posted: Wed May 13 17:33:00 1987
Date-Received: Sat, 16-May-87 10:19:58 EDT
Lines: 39
Nf-ID: #N:beldar:49500004:000:1058
Nf-From: beldar.UUCP!peterb    May 13 17:33:00 1987