[Coco] Basic09/disabling processes/saving CPU time
L. Curtis Boyle
curtisboyle at sasktel.net
Thu Oct 9 09:30:03 EDT 2008
On Wed, 08 Oct 2008 19:38:08 -0600, Robert Gault
<robert.gault at worldnet.att.net> wrote:
> 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.
Runb/BASIC09 are the only process that will show up in procs, so the F$ID
call will give you the process # for the entire Runb program (no matter
how many modules in Basic09 you are running in the current program). If
you have a copy of my PROC command, I actually go into the BASIC09/RUNB
data area to get what the currently running module is, and list it on the
screen in parenthesis.
--
L. Curtis Boyle
More information about the Coco
mailing list