[Coco] noob question

Joel Rees joel.rees at gmail.com
Wed Nov 8 00:29:39 EST 2017


2017/11/08 6:23 "Randy Weaver" <emceesquared at gmail.com>:
>
> I'm used to coding in c#... an event driven language.

I'd urge you to convince yourself to call C# a language containing
grammatical suuport for an event-driven run-time architecture.

Separate the concepts of language and run-time architecture in your mind.

> Actions are hooked to events that "raise" a function I wrote to do
> something.

In other words, Microsoft gives you their event parsing loop and requires
you to interact with it their way.

> I'm trying to wrap my head around how you would achieve similar behavior
on
> a coco.

You would probably prefer not to. Huge waste of resources supporting the C#
runtime.

> I suppose a loop that kept polling for statuses that I'm interested in.

Heh. Well, that's one of the things you need, anyway.

> IRQs are interesting too but do they fire 60 times a second?

My memory is that the IRQ timing can be altered a little. (And we won't
mention Europe.) And that there are other interrupt sources as well. You'll
need to muck around in the hardware docs for the mainboard and the various
parts. And ask questions as you see things to ask about.

But, until things become a little more clear, thinking that way can be a
good start.

>  And what
> happens when my check doesn't complete in 1/60th of a second. does it fire
> again?

Heh. If you don't know, nobody knows.

Extended Color Basic defines a rather complex but crude run-time that some
here have used (partially) to varying degrees of success. It is not
recommended. Do not look for event processing support in ECB.

OS-9/6809 defines a much cleaner run-time, and provides both primitives and
higher-level suuport for event processing, but there will still be some
assembly required if you need support for a full event model. But you are
likely to find you don't need the full model, even if you need parts, and
OS-9/6809 is pretty rich in a slightly different model of multitasking. You
also get a C compiler (ancient, ca. K&R version) in OS-9, which may help.

HTH

Joel Rees


More information about the Coco mailing list