Article View: comp.sys.atari.st
Article #24542Re: BITNET mail follows (really DTR Control)
From: Bruce D. Nelson
Date: Sun, 25 Jan 1987 16:36
Date: Sun, 25 Jan 1987 16:36
48 lines
2562 bytes
2562 bytes
In article <8701222316.AA21388@ucbvax.Berkeley.EDU> JEMCCABE%MTUS5.BITNET@forsythe.stanford.edu writes:
>I have a question about the ongibit() and offgibit() calls. (XBIOS
>calls 30 and 29, respectively.) According to Abacus' Atari ST
>Internals, a ongibit(4) clears the DTR line on the RS-232 port.
>When I try this, however, the busy light on the disk drive comes
>on, but it never reads from the disk (even works when the disk
>isn't in the drive) and it never stops. I've heard that the
>Internals book is faulty, but I've never seen anyone say WHERE
>it is faulty. Maybe I found a place, eh?
Yes, the ABACUS book is wrong (but that's nothing new!). You have to
supply the bit PATTERNS of the bits you want to turn on and off. The
following examples show how it's done.
BTW, my previous posting on this subject was a bit overkill by going into
supervisor mode and tweaking the bits in assembler. I guess I hacked before
I looked. :-)
----------------------------- cut here --------------------------------
/* This program turns ON DTR by setting bit 4 of the sound chip OFF.
Notice the argument to Ongibit is the complement of the BIT PATTERN of
the bits to be reset on the sound chip. The ABACUS book was wrong in
saying it was the BIT NUMBER. */
#include <osbind.h>
main()
{
Offgibit(~0x10);
}
----------------------------cut here --------------------------------
/* This program turns OFF DTR by setting bit 4 of the sound chip ON.
Notice the argument to Ongibit is the BIT PATTERN of the bits to
be set on the sound chip. The ABACUS book was wrong in saying it
was the BIT NUMBER. */
#include <osbind.h>
main()
{
Ongibit(0x10);
}
Bruce D. Nelson, Sr. Appl. Analyst: Software Maintenance, Product Line Systems
EASTMAN KODAK COMPANY, 901 Elmgrove Rd., Rochester, NY 14650, 716 726-7890
UUCP: {allegra, seismo}!rochester!kodak!ektools!bruce
ARPA: kodak!ektools!bruce@rochester.ARPA
Technical Details
Message-ID:
<522@ektools.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rochester!kodak!ektools!bruceReferences:
<8701222316.AA21388@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!mnetor!seismo!rochester!kodak!ektools!bruce From: bruce@ektools.UUCP (Bruce D. Nelson ) Newsgroups: comp.sys.atari.st Subject: Re: BITNET mail follows (really DTR Control) Message-ID: <522@ektools.UUCP> Date: Sun, 25-Jan-87 11:36:19 EST Article-I.D.: ektools.522 Posted: Sun Jan 25 11:36:19 1987 Date-Received: Mon, 26-Jan-87 00:47:55 EST References: <8701222316.AA21388@ucbvax.Berkeley.EDU> Reply-To: bruce@ektools.UUCP (Bruce D. Nelson (408)) Organization: Eastman Kodak, Dept. 47, Rochester NY Lines: 48