Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!im4u!ut-sally!husc6!harvard!panda!genrad!decvax!cwruecmp!bammi From: bammi@cwruecmp.UUCP Newsgroups: net.micro.atari16 Subject: Re: Break control in the 68901 Message-ID: <1548@cwruecmp.UUCP> Date: Thu, 7-Aug-86 02:38:49 EDT Article-I.D.: cwruecmp.1548 Posted: Thu Aug 7 02:38:49 1986 Date-Received: Sat, 9-Aug-86 09:03:26 EDT References: <8608052200.AA08360@ucbvax.Berkeley.EDU> Reply-To: bammi@cwruecmp.UUCP (Jwahar R. Bammi) Organization: CWRU Dept. Comp. Eng., Cleveland OH Lines: 56 In article <8608052200.AA08360@ucbvax.Berkeley.EDU> dkb-amos@HAWAII-EMH.ARPA writes: > > Could anyone tell me how to assert a break on the 1040ST >serial line. I assume this is done with some bit pattern in the >68901 control register. > >Thanks in advance. >-Dennis I in fact did this a while back for a program, that i luckily have handy here on the system. Here is the relevant function from the program. -- #include /* tsr_ptr points to the 8 bit TSR register of the 68901 */ static unsigned char *tsr_ptr = (char *)0x00fffa2d; /* See St internals */ static long *hz_200 = (long *)0x000004ba; /* Yes the Hitch Hikers Guide is wrong!! */ /* * send a break * Modifies Bit 3 in the TSR (reg 23) of the Mfp */ sbreak() { register long save_ssp; register long time; save_ssp = Super(0L); /* Super Mode */ /* set bit 3 of the TSR */ *tsr_ptr |= (unsigned char)8; /* wait for 250 ms -- you can adjust the duration * 250 ms seems to be almost a universal figure for break * duration. */ time = *hz_200 + 50; while(*hz_200 < time) /* wait */ ; /* reset bit 3 of the tsr */ *tsr_ptr &= (unsigned char)~8; Super(save_ssp); /* Back to user Mode */ } -- -- Jwahar R. Bammi Usenet: .....!decvax!cwruecmp!bammi CSnet: bammi@case Arpa: bammi%case@csnet-relay CompuServe: 71515,155