[Coco] Clock "Timing".

Arthur Flexser flexser at fiu.edu
Tue Apr 4 14:59:27 EDT 2017


There's a TIMER function in Extended Basic that is a 60th of a second
counter.
An example of the syntax would be Y=TIMER to read the timer.  You can also
zero it with TIMER=0. This is all interrupt driven, so your program can be
doing other things as the count increases.

I believe it's accurate to something like a 10th of a percent or
thereabouts.

Art

On Tue, Apr 4, 2017 at 2:50 PM, John Lochey via Coco <coco at maltedmedia.com>
wrote:

> Hi all,
> I'm making a binary clock for the CoCo2 via emulation (XRoar at the
> moment).
>
> As far as I know (from reading "Getting Started...Color Basic"), the way
> to time an actual second of time on a Color Computer 2 is to use a
> For...Next loop that corresponds as closely to an "actual" second as
> possible.
> Is there a better way using just the Extended BASIC command set?
> Also, provided that the emulator has the same settings as the original
> CoCo2, will the same timing loop work via emulation and hardware?
>
> Or am I a dreamer!  ;)
>
> Johnny
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list