egullich@MOON (Eric Gullichsen) (11/10/87)
Hello net: In response to the recent postings asking about a Prolog for the Amiga (and more honestly, 'cause I want one) I spent a few hours trying to port Edinburgh's CProlog, for which I have licenced source, to Aztec. CProlog comes from the darkest antiquity of Prolog history, the source I have being a 1982 port from an ICL 2900, whatever that is... [The code is rather grotesque, with gotos (!) and many liberties taken with typing. Statements like: p = *p abound.] The problem I pose for the wizards is as follows: How to do signals a la Unix in Aztec? Specifically, I have to be able to interrupt Prolog execution on a user's ^C, and jump to an interrput handler. Lattice seems to support signals as I need them, but the code would require more work than I have the patience for in order to compile under Lattice, whereas compilation (despite many warnings) seems OK in Aztec. Any pointers to an example of handling ^C interrupts in Aztec, anywhere on Fish disks or some other source I'm likely to have, will be greatly appreciated, and rewarded by the eventual posting of a set of Prolog diffs here. The AmigaDOS manual talks of "break" as setting "attention flags" in a task. RKM says nothing about attention flags, and is vague (to my inexperience) about software interrupts in interrupt processing. Thanks from an Amiga neophyte - Eric Gullichsen ARPA: egullich@ads.arpa Usenet: ...sun!ads!egullich I merely consult for ADS. They no nothing of this.
schaub@sugar.UUCP (Markus Schaub) (11/14/87)
In article <8711092331.AA08117@moon.ads.arpa>, egullich@MOON (Eric Gullichsen) writes: > user's ^C, and jump to an interrput handler. Change the exceptionHandler in your taskstructure to point to your exception- procedure. Then set bit 12 (sigBreakC) in the exceptionMask and there you go. In M2Amiga the run-time system supports interrupt on user ^C. BUT be carefull nobody ever explained the kosher way to do this. I basically had problems with AmigaDOS. If you hit ^C during a DOS call some packets are floating around, producing red rectangles in the upper half of your screen (GURUs). Check RKM and taskstructure, and try and fall etc. Maybe somebody at CATS knows a better answer. // Markus Schaub uunet!nuchat!sugar!schaub (713) 523 8422 // M2Amiga Developer trying to get back the money I paid for my \\ // Amiga by selling a few M2Amiga. \X/ c/o Interface Technologies Corp, 3336 Richmond #323, Houston Tx 77098