Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ncar!oddjob!uwvax!umn-d-ub!umn-cs!shamash!rosevax!pwcs!stag!daemon From: syntel!dal@stag.UUCP (Dale Schumacher) Newsgroups: comp.sys.atari.st Subject: Getting a BREAK signal out of the RS232 Port Message-ID: <369@stag.UUCP> Date: 4 Apr 88 03:26:19 GMT Sender: daemon@stag.UUCP Lines: 48 (Tom West) writes... > Does anybody know how to get the Rs232 port to produce a break signal? > I have heard that there is some escape sequence (using the VT52 emulator) > that will do it, but I don't believe it is documented (if it actually > exist). Are there any other methods. (I am using OSS Pascal, but am > fluent in C). I've been using the following routines successfully in my code and they seem to work fine. rs232cd() /* state of rs232 carrier detect line */ { register long ssp; register int *mfp, status; mfp = ((int *) 0xFFFFFA00L); /* base address of MFP */ ssp = Super(0L); /* enter supervisor mode */ status = *mfp; /* get MFP status */ Super(ssp); /* return to user mode */ return(!(status & 0x0002)); /* check for carrier */ } snd_brk() /* send a BREAK to the rs232 port */ { register long ssp; register char *tsr; tsr = ((char *) 0xFFFFFA2DL); /* address of tsr */ ssp = Super(0L); /* enter supervisor mode */ *tsr = 0x09; /* turn break on */ Super(ssp); /* return to user mode */ delay(30); /* 0.3 second BREAK */ ssp = Super(0L); /* enter supervisor mode */ *tsr = 0x01; /* turn break off */ Super(ssp); /* return to user mode */ } hangup() /* drop carrier by droppping DTR to modem */ { Ongibit(0x10); /* kill DTR */ delay(50); /* 0.5 second delay */ Offgibit(0xEF); /* restore DTR */ } Dale Schumacher ..ihnp4!meccts!stag!syntel!dal (alias: Dalnefre')