Idea for new timer functionality in ZBasic

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Idea for new timer functionality in ZBasic

Post by spamiam »

Don,

I was thinking about the ability to use a timer interrupt in the native mode devices, and the lack of such an ability in the VM devices.

You probably remember in the old PC days that it was possible to "hook" into an existing interrupt (like the keyboard) to have a TSR process do stuff in the background.

Would it be possible to have such a hook for one of the timers in the VM. It would have to have interrupts pretty frequently (like less than 1ms) in order to be significantly better than what Sleep() and Delay() can provide. If a "hook" is used, then it might not interfere with stuff like the software serial comms.

Of course there would be a fairly small amount of processing allowed to do in the user-interrupt so that it does not try to become re-entrant. So maybe the VM can have a limit on the number of bytes of code in such a user interrupt service.

-Tony
Post Reply