Wednesday, 15 April 2020

Doing things as and when.

Well, every, after and cancel work as the gif on the right shows. They seem to be fairly reliable, though I haven't bullied it too much yet.

It's deliberately made not reentrant, so if you call a routine it can't call another one until you return from that. If you delay it while it does a lot of work it just queues the events up for later. I thought that was safer rather than just letting it do what it wants, which the Amstrad version does, as far as I can see. The underlying code allows any number of repeats, so I may extend it so you can say "after 150,2,5 call code.routine()" which will call it 5 times at 1.5 second intervals.

I also added @ as an operator returning a variable data address, because I'd added it as a token for RPL which I want to keep as FORTHesque as possible.

No comments:

Post a Comment

Breaking change

We all make mistakes. One early mistake I made was copying (partly) the old thing in Microsoft BASIC where you didn't have to declare ...