Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!sbsvax!roeder From: roeder@sbsvax.cs.uni-sb.de (Edgar Roeder) Newsgroups: comp.sys.atari.st Subject: Re: break Summary: try catch Keywords: RTX job control vi ksh csh SIGSTOP _main cli isr Message-ID: <4252@sbsvax.cs.uni-sb.de> Date: 7 May 90 15:10:59 GMT References: <3060@ultb.isc.rit.edu> Organization: Universitaet des Saarlandes, Saarbruecken, W-Germany Lines: 45 In article <3060@ultb.isc.rit.edu>, jdb9608@ultb.isc.rit.edu (J.D. Beutel) writes: > > Does anybody know how break (i.e., ^C) works on the ST? > Is it something in TOS? (I wouldn't think so since I don't > remember hearing about it, and I know some programs don't break.) Yes it is done by TOS. But only the GEMDOS functions Cconin/Cconrs/Cconout and Cconws use it. If a program uses BIOS for terminal-i/o, it has to do the ^C trapping itself. > and I miss multi-tasking and job control. So, thinking about > device drivers, SIGSTOP, and the like, I really should understand ^C. Have you seen the demo of Master? This shell has job-control (but no multi- tasking). Jobs are created by system("-i") from C-Code, by 'if exec "-i"' in a batchfile or you can start your program as 'program args |' and then input '!-i' at the prompt after any full screen of output. Stopped jobs may be restarted by '%' in any order. > I suppose I could just have the cli slip in an isr to monitor > whatever tty-type input devices, and grap any ^Z that comes along, > but there'll probably be complications if I don't understand > what else is going on. The catch-program posted to comp.binaries.atari.st does it just this way. You can install it in your auto-folder (catch.mmx has to be renamed to catch.prg) and let it catch any ^C/^Z/^\-keypress at any time (even if your program is in an endless loop). If ^C is pressed, you are asked wether you want to break or continue. If ^Z is pressed, an eventually installed shell (at _shell_p) is called interactively. See catch.doc for more uses of this program. If you want to know more about ^C-trapping, you can also look up the documentation for etv_term (the terminate-vector of GEMDOS). > J. David Beutel 11011011 jdb9608@cs.rit.edu "I am, therefore I am." Hope this helps! - Edgar -- Mail: Edgar R\"oder E-Mail: roeder@cs.uni-sb.de Liesbet-Dill-Stra\ss e 3 D-6602 Dudweiler -o- -o- W-Germany ^ Phone: 06897/74643 '---'