Re: [Ql-Users] Job data space - foibles?
I dif, honest! It's just that my Tk2 manual is the original as supplied with Trump Card and I can't read the tiny print any more. Heading for Dilwyns web site soon Cheers, Norm. Sent from my HTC - Reply message - From: Marcel Kilgus ql-us...@mail.kilgus.net To: ql-us...@q-v-d.com Subject: [Ql-Users] Job data space - foibles? Date: Wed, Oct 9, 2013 23:37 Norman Dunbar wrote: If I open #3,some_file and ex #3 to test_bin, I do get a channel Id on the stack (and a word count of 1) but if I run it again, the channel Id on the stack is different. I would have thought that the [qdosmsq] channel id for SuperBasic channel #3 would remain constant, especially as I never closed the channel between executions. The TK2 manual says If the parameters of EX start with '#channel TO', then the corresponding SuperBASIC channel will be closed (if it was already open) and a new channel opened as a pipe to the first program. Morale of the story: I should have looked at the documentation first ;-) Well, at least I had! ;-) Not this time ;) Cheers, Marcel ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Job data space - foibles?
Am 10.10.2013 um 00:37 schrieb Marcel Kilgus: Norman Dunbar wrote: The TK2 manual says If the parameters of EX start with '#channel TO', then the corresponding SuperBASIC channel will be closed (if it was already open) and a new channel opened as a pipe to the first program. Morale of the story: I should have looked at the documentation first ;-) Well, at least I had! ;-) Not this time ;) Marcel, Norman, I looked at both (the manual and the code), could see the mention of 'close' in the manual, but not in the code. The original channel is not really closed - It's channel ID in the SuperBASIC channel table is simply overwritten. The TK2 Manual makes also interesting reading regarding the Special Jobs paragraph that have a second $4afb in their header that is actually used to flag to the OS that this job got its own command line parsing routine that will be called within a SuperBASIC context - That is, you can apparently use Basic variables in command lines. Tobias ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Job data space - foibles?
Oh oh, i'm off into hiding ;-) Dilwyn -Original Message- From: nor...@dunbar-it.co.uk Sent: Thursday, October 10, 2013 7:07 AM To: ql-us...@q-v-d.com ; ql-us...@q-v-d.com Subject: Re: [Ql-Users] Job data space - foibles? I dif, honest! It's just that my Tk2 manual is the original as supplied with Trump Card and I can't read the tiny print any more. Heading for Dilwyns web site soon Cheers, Norm. Sent from my HTC - Reply message - From: Marcel Kilgus ql-us...@mail.kilgus.net To: ql-us...@q-v-d.com Subject: [Ql-Users] Job data space - foibles? Date: Wed, Oct 9, 2013 23:37 Norman Dunbar wrote: If I open #3,some_file and ex #3 to test_bin, I do get a channel Id on the stack (and a word count of 1) but if I run it again, the channel Id on the stack is different. I would have thought that the [qdosmsq] channel id for SuperBasic channel #3 would remain constant, especially as I never closed the channel between executions. The TK2 manual says If the parameters of EX start with '#channel TO', then the corresponding SuperBASIC channel will be closed (if it was already open) and a new channel opened as a pipe to the first program. Morale of the story: I should have looked at the documentation first ;-) Well, at least I had! ;-) Not this time ;) Cheers, Marcel ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Job data space - foibles?
On 10 Oct 2013, at 07:08, Tobias Fröschle wrote: Am 10.10.2013 um 00:37 schrieb Marcel Kilgus: Norman Dunbar wrote: The TK2 manual says If the parameters of EX start with '#channel TO', then the corresponding SuperBASIC channel will be closed (if it was already open) and a new channel opened as a pipe to the first program. Morale of the story: I should have looked at the documentation first ;-) Well, at least I had! ;-) Not this time ;) Marcel, Norman, I looked at both (the manual and the code), could see the mention of 'close' in the manual, but not in the code. The original channel is not really closed - It's channel ID in the SuperBASIC channel table is simply overwritten. The TK2 Manual makes also interesting reading regarding the Special Jobs paragraph that have a second $4afb in their header that is actually used to flag to the OS that this job got its own command line parsing routine that will be called within a SuperBASIC context - That is, you can apparently use Basic variables in command lines. Tobias The assembler routine, ending with RTS, following the second $4AFB is obeyed before the program is started. An example of that is in the source code for SMSQ/E in the file extras_exe_source_cct_asm. If you start such a program with ET instead of EX, the special routine will be obeyed straight away. George ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Job data space - foibles?
Am 10.10.2013 um 12:02 schrieb George Gwilt: Marcel, Norman, I looked at both (the manual and the code), could see the mention of 'close' in the manual, but not in the code. The original channel is not really closed - It's channel ID in the SuperBASIC channel table is simply overwritten. The TK2 Manual makes also interesting reading regarding the Special Jobs paragraph that have a second $4afb in their header that is actually used to flag to the OS that this job got its own command line parsing routine that will be called within a SuperBASIC context - That is, you can apparently use Basic variables in command lines. Tobias The assembler routine, ending with RTS, following the second $4AFB is obeyed before the program is started. An example of that is in the source code for SMSQ/E in the file extras_exe_source_cct_asm. If you start such a program with ET instead of EX, the special routine will be obeyed straight away. does anyone write his programs like that? I'm not completely sure why you would want to parse your command line in a SB context - Or what exactly would be the intention of those Special Programs, as TT calls them? I've never used that mechanism. Maybe I should try ;) Tobias ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
Re: [Ql-Users] Job data space - foibles?
Gottit! :-) I knew I read it somewhere, and that somewhere was the Tk2 manual. If there is only one channel on a job's stack then it is open for read/write unless it is a pipe. In which case the direction is as per the pipe. If there a more channels on the stack, the the first is standard input, the last is standard output, everything in between is overwrite. Input is read only, output is write only - I think, the manual doesn't say. Cheers, Norm. Sent from my HTC ___ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm