Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!uwmacc!uwmcsd1!ig!jade!ucbvax!DHDURZ1.BITNET!G35 From: G35@DHDURZ1.BITNET Newsgroups: comp.sys.amiga Subject: cli <-> console.device query Message-ID: <8711231609.AA20634@jade.berkeley.edu> Date: Mon, 23-Nov-87 12:02:28 EST Article-I.D.: jade.8711231609.AA20634 Posted: Mon Nov 23 12:02:28 1987 Date-Received: Thu, 26-Nov-87 02:06:59 EST Sender: daemon@ucbvax.BERKELEY.EDU Lines: 24 Last week I tried to write my own shell. Everything works fine as long as I use Execute() to start programs. As Execute() has some drawbacks, I tried to 'RUN' my shell-program and to 'transmit' the command line to the CLI process. Browsing through memory I found a buffer where the console.device (that's what I suppose) stores keyboard entries. This buffer can be found with buffer=(((struct FileHandle*)BADDR(CliProcess->pr_CIS))->fh_Type)+136; (I don't have the source actually here, might be completely wrong). The buffer holds 256 characters and is followed by an LONG pointer, pointing at the last byte entered. Writing my command-line into the buffer and changing this pointer, does in fact transmit the string to my CLI-Process, but does not start the program, as if I had typed "command j" into a CLI window; I have to activate the CLI-window and press return, to make things work. Now here are my questions: Does anyone have an INCLUDE - File for that buffer ? What is CLI waiting for to start ? I'm shure that this is a totally wrong approach to the problem. I would exepect that I have to send some message or an packet somewhere. But what message ? where ? why ? Anyone ? Werner Guenther (G35@DHDURZ1.BITNET)