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