[comp.sys.hp] HP3000 Terminal control

kevinf@agora.rain.com (Kevin Fowler) (03/17/91)

[]

Our DP shop is moving to HP3000/MPEXL (from IBM/MVS), and I was starting
to play around with the FCONTROL intrinsic to see if I could come up
with a *nix-like stty, or cbreak().  I haven't had much luck yet, and was
wondering if there was someone out there who has already blazed this 
trail.  Once I get past this, I was going to work on getting PC Curses
(or some -alike) up and running.

Thanks,

kevinf@agora.rain.com

-- 
+-----------------------------------------------------------------------------+ 
| Kevin Fowler / kevinf@agora.rain.com                                        |
| P. O. Box 69393                            This Space For Rent              |
| Portland OR 97201-0393                                                      |

hm@hcshh.UUCP (Hellmuth Michaelis) (03/18/91)

In <1991Mar17.020416.28523@agora.rain.com> kevinf@agora.rain.com (Kevin Fowler) writes:

>Our DP shop is moving to HP3000/MPEXL (from IBM/MVS), and I was starting
>to play around with the FCONTROL intrinsic to see if I could come up
>with a *nix-like stty, or cbreak().  I haven't had much luck yet, and was
>wondering if there was someone out there who has already blazed this 
>trail.  Once I get past this, I was going to work on getting PC Curses
>(or some -alike) up and running.

here is something what i did in porting microemacs to MPE XL using
the CCS-C-Compiler. it switches the MPE-Terminal to complete transparent
i/o mode usable for such an editor.
if you ever get pc-curses up and running, please post the source (or at
least the diffs!)

hpopen()
{
	/* dummy parameter for FCONTROL & FDEVICECONTROL */
	int i = 0;

	/* enable typeahead parameter for FDEVICECONTROL */
	unsigned short si = 1;

	/* our new stdin */
	freopen("$stdinx", "rNH", stdin);

	/* disable echo */
	FCONTROL(fileno(stdin),13, (unsigned short ^) &i);

	/* disable system break */
	FCONTROL(fileno(stdin),14, (unsigned short ^) &i);

	/* disable subsystem break */
	FCONTROL(fileno(stdin),16, (unsigned short ^) &i);

	/* enable binary read */
	FCONTROL(fileno(stdin),27, (unsigned short ^) &i);

	/* enable typeahead */
	FDEVICECONTROL(fileno(stdin), (void far *) &si, 1, 192, 51, 2,\
					(unsigned short *) &i);

	if(ccode() != CCE)
	{
		hpclose();	/* clean up */
		fprintf(stderr,"\nunable to enable mpe-typeahead,FDEVICECONTROL failed!\n");
		exit(99);
	}
	ttrow = 999;
	ttcol = 999;

	fki = -1;	/* init fkey-handling */
}

good luck!


-- 
------------------------------------------------------------------------------
Hellmuth Michaelis    HCS Hanseatischer Computerservice GmbH   Hamburg, Europe
uucp: hm@hcshh.hcs.de  (..!mcsun!unido!hcshh!hm)         phone: +49 40 5501075
------------------------------------------------------------------------------