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
Is the Job list somewhere in RAM?
- NormanDunbar
- Forum Moderator
- Posts: 2487
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: Is the Job list somewhere in RAM?
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.
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.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Re: Is the Job list somewhere in RAM?
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
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?
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
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
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Is the Job list somewhere in RAM?
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
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?
Minerva, yes, as long as the second screen (F3/F4 startup option) is not used.Paul wrote: You say Blackbox, that assumes it's the same in Minerva and JM...
Yes for both, unless SMSQ/E is used.Paul wrote: also on gc and SGC? I guess yes.
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
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
- NormanDunbar
- Forum Moderator
- Posts: 2487
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: Is the Job list somewhere in RAM?
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.

Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.