[comp.sys.apple] Interrupts

MPENDER@WPI.BITNET (04/29/88)

Can anyone tell me how to activate interrupts using the mouse card
built in to the Laser (like a IIC)?  Is there an address I
poke to to turn them on and another I poke to to turn them off?
Is there an external wire I can connect?  I hate to poke around
inside it, and the method suggested of nabbing a line is
useless to me since things are labeled differently inside.
Does the person who offered to sell a board that just generates interrupts
still have it for sale?  Does anyone?

Are there any accelerator boards that can generate regular interrupts
if asked to?

All help greatly appreciated.

_______________________________________________________________________________
Bitnet:   MPENDER@WPI.BITNET                      Michael Pender
Internet: MPENDER%WPI.bitnet@talcott.harvard.edu  Computer Science /
       or MPENDER%WPI.BITNET@cunyvm.cuny.edu      Electrical Engineering

Worcester Polytechnic Institute: 100 Institute Rd., Worcester Mass., 01609

The Laser 128:  99.99% compatible, now if I can only get them to make an
 upgrade kit (for the apples).
-------------------------------------------------------------------------------

gwyn@brl-smoke.ARPA (Doug Gwyn ) (06/27/88)

In article <8806262035.aa21500@SMOKE.BRL.ARPA> AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") writes:
>For example, ProDOS calls could be intercepted, and before any disk
>access happened, a Ctrl-S could be sent through the serial ports;
>after the disk access was done, a Ctrl-Q could be sent.  (There may
>be some other problems here...I don't claim that this is a complete
>solution.)

There isn't any fully satisfactory solution (other than not requiring the CPU
to be used for disk I/O timing).  Sending a DC3 does not guarantee that more
characters won't subsequently arrive; typically two might, and it is worse on
some systems.  (You could allow time to handle input that trickles in before
starting the disk I/O.)  Hardware handshaking suffers from similar problems.
Packet protocols, e.g. AT&T's layers (xt) protocol, can solve the problem,
but of course not every host will know the protocol.

Real computers use DMA disk I/O and I/O completion interrupts.  This isn't
inherently expensive, but unfortunately the Apple II wasn't done that way.

GREYELF@WPI.BITNET (03/28/89)

A new quote from my mailbox:

>Would it be possible to write a program similar to softswitch that could
>automatically switch between applications, allowing something to run in
>background?  I've heard people talk about "heartbeat" interrupts.  Coul@.#t
>that be used somehow?  Even if this cut the speed of the GS in half, it
>would still be running as fast as a normal //e

>Just musing out loud.  That'd be heck of a nice program if someone could di
>(that's "do") it.  I'd love to be able to download, etc, in the background.

>Kevin Lepard
>Bitnet:  Sasquatch@albion.bitnet

Yes it is possible, I wrote something like that over the weekend
(the multitasking add-on for Shell).  It supports up
to eight background tasks, in addition to the foreground task.

Slowdown of the processor is minimized by allowing the tasks to
choose how often they wish to be called, in increments of
every 60th of a second.  At this point it works only with
tasks specifically designed for it, or with the SHELL
install driver command (not yet out there, only in here :^)

I'll try to get around to uploading it later today.

--
Michael J Pender Jr  Box 1942 c/o W.P.I.        I wrote SHELL, send bug
greyelf@wpi.bitnet   100 Institute Rd.          reports, suggestions, cash,
greyelf@wpi.wpi.com  Worcester, Ma 01609        to me.

P.S.  I help people too.

mattd@Apple.COM (Matt Deatherage) (04/01/89)

In article <8903311907.AA05671@wpi> GREYELF@WPI.BITNET writes:
>Can anyone tell me if a Pascal standard protocal has been established
>for use of interrupts from a clock card?   For recognition of a clock
>card?  I'm thinking of adding the ability to recognize clock cards
>to Daemon, since not everyone has a mouse card.

Most clock cards don't follow a Pascal 1.1 protocol for their firmware.  Why?
Well, ProDOS 8 had a ThunderClock driver, and looked for non-Pascal ID bytes.
Combining those (listed in the P8 Manual) with the Pascal ID bytes would have
made for some pretty weird code (remember, this starts at $Cn00 and is usually
executed by BASIC programs to read the clock).

>In addition any information on the Pascal standard protocals for
>recognition and access to devices would be appreciated.

I have this information in a book, but it's at work and I'm at home.  If no
one has posted this within a day or two (like by Monday), please ask again
and I'll post it (since I'll be at work then, hopefully).

>--
>Michael J Pender Jr  Box 1942 c/o W.P.I.        I wrote SHELL and Daemon,
>greyelf@wpi.bitnet   100 Institute Rd.          send bug reports, suggestions,
>greyelf@wpi.wpi.com  Worcester, Ma 01609        checks to me.

-----------------------------------------------------------------------------
Matt Deatherage, Apple Computer, Inc. | "The opinions expressed in this tome
Send PERSONAL mail ONLY (please) to:  | should not be construed to imply that
AppleLink PE: Matt DTS  GEnie: AIIDTS | Apple Computer, Inc., or any of its
CompuServe: 76703,3030                | subsidiaries, in whole or in part,
Usenet:  mattd@apple.com              | have any opinion on any subject."
UUCP:  (other stuff)!ames!apple!mattd | "So there."
-----------------------------------------------------------------------------

GREYELF@WPI.BITNET (04/04/89)

I've heard from one user who says the clock and Iclock programs don't
like an unenhanced IIe.  This could be because  interrupts on a
IIe (unenhanced only) wipe a certain page zero memory location.

Anybody know why calls to the Applesoft Graphics routines don't like
being called from an interrupt driver?  I vaguely remember something
about page 3 locations used by graphics routines.

Anyway, if you have an unenhanced IIe, and you want to try clock
Iclock, or Daemon, write protect your disks just in  case.

An errant interrupt driver is a difficult beast to kill

--
Michael J Pender Jr  Box 1942 c/o W.P.I.        I wrote SHELL and Daemon,
greyelf@wpi.bitnet   100 Institute Rd.          send bug reports, suggestions,
greyelf@wpi.wpi.com  Worcester, Ma 01609        checks to me.

People keep asking me if Shell or Daemon are compatible with the IIc, IIe.
YES, I wrote them on my Laser 128.  I mean, what would be the challenge to
multitasking on a IIgs?  I'll start writing dedicated gs programs when
somebody sends me one in the mail.

aaron.p@pro-ldm.cts.com (Aaron Putnam) (07/05/89)

   Could anyone supply me with information regarding interrupts?
 
in particular, I'd like to know how to preserve the Accumulator on returning
from them. I've seen the address $45 LDA'ed many times in other peoples
routines, but when I tried to put that in, it didn't work properly. I'm
attempting to write my own drivers for my card, and I want them to be
compatible with prodos, so I suppose the Prodos Interrupt info would also be
helpful:  I've noticed that there is an interrupt vector available in prodos,
but I don't have any of the information necessary to Utilize it. 
 
      Thanks in advance.
 
         --=*>Azerov<*=--


UUCP: crash!pro-ldm!aaron.p
ARPA: crash!pro-ldm!aaron.p@nosc.mil
INET: aaron.p@pro-ldm.cts.com

dlyons@Apple.COM (David Lyons) (07/06/89)

In article <8907050216.AA10350@crash.cts.com> pnet01!pro-simasd!pro-nsfmat!pro-ldm!aaron.p@nosc.mil writes:
>
>   Could anyone supply me with information regarding interrupts?
> 
>in particular, I'd like to know how to preserve the Accumulator on returning
>from them. I've seen the address $45 LDA'ed many times in other peoples
>routines, but when I tried to put that in, it didn't work properly. I'm
>attempting to write my own drivers for my card, and I want them to be
>compatible with prodos, so I suppose the Prodos Interrupt info would also be
>helpful:  I've noticed that there is an interrupt vector available in prodos,
>but I don't have any of the information necessary to Utilize it. 

ProDOS 8 provides the calls ALLOC_INTERRUPT and DEALLOC_INTERRUPT.  Use them.
Look them up in the ProDOS 8 Technical Reference Manual or any decent third-
party reference on ProDOS 8.  ProDOS takes care of preserving A for you.

If you aren't using ProDOS's interrupt facilities, life becomes much more
ugly, and you have to take various possible machine configurations into
consideration.

 --Dave Lyons, Apple Computer, Inc.          |   DAL Systems
   AppleLink--Apple Edition: DAVE.LYONS      |   P.O. Box 875
   AppleLink--Personal Edition: Dave Lyons   |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons

   My opinions are my own, not Apple's.

friday@vax1.acs.udel.EDU (Thomas A Mcdonald) (08/09/89)

I am having trouble with handling serial port interrupts on my Apple IIgs.

Every time I enable the serial port interrupts, the system freezes when
the interrupt occurs.  I patched in to the IRQ.SERIAL vector (using the Misc.
tool set), but it seems as if the interrupt handler isn't passing control to
the serial port handling routine.  I even set up a dummy routine that would
write a value to specific memory location if a SCC interupt occured, but it
never reached my routine (I know the routine works because I set it up in 
IRQ.FLUSH vector and it worked fine).

Any ideas?

		Tom

(I even patched into IRQ.APTALK to make sure the Appletalk routine wasn't 
  trying to handle it).