[Coco] Basic09/disabling processes/saving CPU time

Robert Gault robert.gault at worldnet.att.net
Wed Oct 8 21:38:08 EDT 2008


George Ramsower wrote:
> I could use a little more CPU time in my CNC effort with a CC3.
> 
> I was wondering if it's possible to issue a BO9 statement that could 
> disable any non-critical interruptions in OS9 to give maximum CPU time 
> to the routine inside a B09 program, such as when I'm stepping the 
> motors in my Coco CNC machine. After the stepping is done, then I wish 
> to issue a statement to put things back like they were.
> 
> 
> Please. This needs to be done in Basic 09. A SYSCALL is okay. I like 
> those, but don't undstand them.
> 
> Current progress in this project is that I can now engrave an aluminum 
> plate with the name of the company I work for  and the equipment number 
> below the name. I need to get a photo of that onto my Coco site.
> http://coco.thetinbox.com
> 
> Engraving can be done FAST with a dremmel. Speed would help.
> 
> George
> 

As stated by Dave Kelly, about the only thing you can do is use syscall 
first to find the process ID of either runB or your specific Basic09 
program and then use syscall to change the priority to 255 (highest).

Saying this is simple but actually doing it may be confusing. That it 
can be done is demonstrated by the OS-9 program procs. That displays 
process IDs for running programs.

You will need to use the two system calls Get ID and Set Priority, OS9 
F$ID and OS9 D$SPrior. The first call from your Basic09 program with 
syscall OS9 F$ID will get the process ID. The second call with syscall 
OS9 F$SPrior should set your priority to 255 (highest).

Whether this will achieve anything you'll have to test. Whether the 
method will be sufficient without changing the priority of runB or 
Basic09 is not known by me.



More information about the Coco mailing list