Article View: net.micro.atari16
Article #1437Re: Break control in the 68901
From: bammi
Date: Thu, 07 Aug 1986 06:38
Date: Thu, 07 Aug 1986 06:38
56 lines
2036 bytes
2036 bytes
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 <osbind.h>
/* 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
Technical Details
Message-ID:
<1548@cwruecmp.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!im4u!ut-sally!husc6!harvard!panda!genrad!decvax!cwruecmp!bammiReferences:
<8608052200.AA08360@ucbvax.Berkeley.EDU>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!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