Page 1 of 1
Is the Job list somewhere in RAM?
Posted: Thu Jan 19, 2017 10:17 pm
by Paul
Hello my friends.
I hope someone can help me with background information about QDOS/Minerva/SMS
Can a list of active jobs be found in RAM?
Is there a system variable or position in RAM where I can see which job is currently running?
I am curious to find out more.
kind regards Paul
Re: Is the Job list somewhere in RAM?
Posted: Thu Jan 19, 2017 10:46 pm
by NormanDunbar
There is a list of jobs in the system, but you have to go look for them. There's a system variable named sv_jbbas which is the base of the jobs table in qdosmsq. Some details here
http://qdosmsq.dunbar-it.co.uk/doku.php ... :jobs:jobs - you might like to look at mt_jinf too at
http://qdosmsq.dunbar-it.co.uk/doku.php ... aps:trap_1 where there is an abridged example of scanning the job stack using this very trap call.
I also did an easy pointer tutorial, back in 1994, for Quanta, and one of the demo programs was a job finder/watcher. That was written in SuperBasic, and scanned the job table and for each job found, listed the details and register values on screen.
Hth
Cheers,
Norm.
Re: Is the Job list somewhere in RAM?
Posted: Fri Jan 20, 2017 5:01 am
by Paul
Thanks a lot Norman.
The first link showed what I hoped to find.
The second link didn't work on my iOS device.
I now know how to find jobs.
Is there also a memory location showing which job is currently running? I know this sounds weirded because it should only show me my own job number when beeing looked for by a QL program. But I would like to try to find out from "outside" the QL by examining the RAM content.
kind regards Paul
Re: Is the Job list somewhere in RAM?
Posted: Fri Jan 20, 2017 10:49 am
by tofro
Paul,
the system variable SV_JBPNT ($28064 on a "black box") points to the job table entry of the current job. From that table you can get the job tag and, for example, all saved registers of the job.
Note this is only a snapshot and might change any time in the current 50th of a second - So you must have the QL "frozen" by some way (typically having it in supervisor mode) to make any useful sense of this information.
The format of a job table entry is documented in section 18.5 of the Technical Guide
http://www.dilwyn.me.uk/docs/manuals/qltm.pdf
Tobias
Re: Is the Job list somewhere in RAM?
Posted: Fri Jan 20, 2017 12:03 pm
by Paul
Ah, that's great. Thank you very much.
You say Blackbox, that assumes it's the same in Minerva and JM...
also on gc and SGC? I guess yes.
That would be enough for my purpose then.
kind regards Paul
Re: Is the Job list somewhere in RAM?
Posted: Fri Jan 20, 2017 1:31 pm
by tofro
Paul wrote:
You say Blackbox, that assumes it's the same in Minerva and JM...
Minerva, yes, as long as the second screen (F3/F4 startup option) is not used.
Paul wrote:
also on gc and SGC? I guess yes.
Yes for both, unless SMSQ/E is used.
You can check whether the system variables indeed are at $28000 by issuing a "PRINT VER$(-2)" in Basic.
Original QL ROMS will return a "bad parameter" error. You can safely assume $28000 for the system variables, then.
Minerva and SMSQ/E will return the actual system variable address as response. Use that + $64 instead of the $28064 above, then.
Tobias
Re: Is the Job list somewhere in RAM?
Posted: Fri Jan 20, 2017 10:28 pm
by NormanDunbar
Sorry about the second link, it should have been
http://qdosmsq.dunbar-it.co.uk/doku.php ... rap_1:injb - I can't work this new fangled Internet thing!
Cheers,
Norm.