[comp.sys.amiga.tech] Help with console escape sequence

djohnson@beowulf.ucsd.edu (Darin Johnson) (10/03/89)

I can't seem to get a WINDOW STATUS REPORT to be generated from a 
console.  Here is the sample program I am using.

#include <libraries/dos.h>
#include <stdio.h>

main() {
  struct FileHandle *win;
  unsigned char ob[64], i, max;
  extern int EnableAbort = 1;
  win = Open("CON:0/0/200/100/foobar", MODE_NEWFILE);
  ob[0] = 0x9b;
  ob[1] = 0x71;
  Write(win, &ob, 2);
  max = Read(win, &ob, 63);
  for (i=0; i<max; i++)
    printf("%d ", ob[i]);
  printf("\n");
  Close(win);
}

Nothing gets echoed back by the console, except what I type in
myself.  In fact, even function keys and arrow keys do not echo
unless I use RAW.  I've poured through the manuals and can't find any
hints. (and no, I can't go directly to the window, or even use
raw io packets, since eventually, this will have to work from
the UNIX side of a DNET connection)

Darin Johnson
djohnson@ucsd.edu

kodiak@amiga.UUCP (Robert R. Burns) (10/05/89)

In article ... djohnson@beowulf.UCSD.EDU (Darin Johnson) writes:
)I can't seem to get a WINDOW STATUS REPORT to be generated from a console.
)  win = Open("CON:0/0/200/100/foobar", MODE_NEWFILE);
	       ^^^ CON: swallows CSI sequences, you must use RAW:
)  ob[0] = 0x9b;               ob[1] = 0x71;
                 ob[1] = 0x20;    ^2
)  Write(win, &ob, 2);
		   ^3
-- 
Bob Burns, amiga!kodiak				   _
	| /_  _|. _ |	   Commodore __		  |_) _ |_  _ )'
	|<(_)(_)|(_\|<	    /\ |  ||| _` /\	  |_)(_\| )(_\ |
	| \ Software	___/..\|\/|||__|/..\___		   Faith