[comp.sys.misc] Interrupts on the N* Advantage

rbloom@apg-1.arpa (Robert Bloom AMSTE-TEI 3775) (11/24/86)

Help.

     I find I have to write an interrupt-driven application for 
the NorthStar Advantage.  Unfortunately, I don't know how.  
Specifically, I do know how to enable the interrupts, and write 
the interrupt handler, but actually what happens at interrupt 
time eludes me.

     At the interrupt, the z80 jumps to the interrupt routine.  
Where?  My z80 book says, "the z80 expects an [RST or CALL] 
instruction to be placed on its data buss [by the interrupting 
device]"  how it do dat?  Two people who I asked said "to where 
you program it to" but I have no idea how to do that.

     I have a Advantage technical manual.  It may have the info I 
need but I find it incomprehensible.  (I gather that interrupt 
routines are strongly hardware-dependant.)  And I do understand 
that the Advantage is not very fast, but can't believe a simple 
get-and-put routine with interrupts wouldn't be fast enough for 
4800 baud.

     So, can someone help me out?  I'm trying to store the input 
characters from the SIO card away till they can be processed.  I 
have DTR control on the port but I haven't been able to get that 
to work.  (I'm trying to write a very simple high-speed commo 
program.)  I really need a low-level example.

bob bloom

ddrex@gorgo.UUCP (12/02/86)

/* Written  7:12 pm  Nov 23, 1986 by rbloom@apg-1.arpa in gorgo.UUCP:comp.sys.misc */
/* ---------- "Interrupts on the N* Advantage" ---------- */
Help.

     I find I have to write an interrupt-driven application for 
the NorthStar Advantage.  Unfortunately, I don't know how.  
Specifically, I do know how to enable the interrupts, and write 
the interrupt handler, but actually what happens at interrupt 
time eludes me.

     At the interrupt, the z80 jumps to the interrupt routine.  
Where?  My z80 book says, "the z80 expects an [RST or CALL] 
instruction to be placed on its data buss [by the interrupting 
device]"  how it do dat?  Two people who I asked said "to where 
you program it to" but I have no idea how to do that.

     I have a Advantage technical manual.  It may have the info I 
need but I find it incomprehensible.  (I gather that interrupt 
routines are strongly hardware-dependant.)  And I do understand 
that the Advantage is not very fast, but can't believe a simple 
get-and-put routine with interrupts wouldn't be fast enough for 
4800 baud.

     So, can someone help me out?  I'm trying to store the input 
characters from the SIO card away till they can be processed.  I 
have DTR control on the port but I haven't been able to get that 
to work.  (I'm trying to write a very simple high-speed commo 
program.)  I really need a low-level example.

bob bloom
/* End of text from gorgo.UUCP:comp.sys.misc */

A very reasonable book on this subject, and just about everything else you'll
need to know about z80 assembumbler is, "Z80 Assembly Language Programming",
by Lance Levanthal, published by Osborne/McGraw Hill. 

There's a whole heluva a lot more to handling ints than just setting the
mode, enabling, and waiting for one to happen. I suggest you read the book
(chapter 12). Lots of good example code.

 David Drexler
 
 --  UUCP:     {ihnp4,cbosgd,okstate,oktext,uokmax}!occrsh!gorgo!ddrex
 --  FidoNet:  19/1 -or- decvax!encore!vaxine!spark!147!1!drexler
 --  AT&T:     [405] 728-2463  (data only: 2400/1200/300 bps)
 --  Quote:    "You may wager your saccharoid mule that I am!"

faiman@uiucdcsb.cs.uiuc.edu (12/06/86)

    There are two issues here.  One is how the Z80 handles interrupts and, as
David Drexler points out, any decent Z80 manual or assembly language reference
will tell you that.  The other is how the rest of the Advantage hardware
interacts with the interrupt system, and for this you need the Advantage
Technical Manual.

    Since we used to have a lab with Northstars here at Illinois, I can give
you a few pointers, but let me warn you that I'm speaking from memory, so that
you should be careful to check the details.  First, the Z80 provides three
interrupt modes:  IM0 (default) gives 8080 (remember the?) compatibility;
IM1 causes an automatic RST 38H on interrupt; and IM2 provides true vectoring,
taking the low address byte from the device and the high from the I register.
Now -- and here my memory is hazy -- I believe that the Advantage provides
no direct way of placing an RST or vector on the data bus, so that you have to
use IM1.  But, you'd best check the manual.  I also remember that the manual
was not very clear on this point.  If Northstar is still in business, why not
give them a call?