🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.mac
Article #5753

Interrupts on the Mac

#5753
From: Tony Giaccone
Date: Tue, 20 May 1986 23:04
35 lines
2541 bytes
Hi folks,

I'm hoping that someone out there will be able to help me with a problem I'm 
having. I'm trying to bypass the serial driver and work directly with the SCC.
To this end I've written code which will allow me to read and write directly to
the SCC. I can send data out or receive it at any baud rate as long as I poll 
the SCC. Now I want to be able to use interrupts to drive my code.  However, 
I can't seem to get the interrupts to act the way I think they do, so there 
must be something I'm missing. First I'll explain how I think this mess works 
and then I'll describe what happens when I execute my code.

As I understand it there are seven levels of interrupts on the 68000. The SCC 
will interrupt using vector 2. When a level 2 interrupt occurs the PC is loaded 
with the value at location $68. The code which is executed then determines why 
the SCC interrupted the processor and does a jsr to a value located in the 
Lvl2DT table. A displacement of 24 bytes into this table holds the address of 
the code to be called if a character has been received on port a. As I 
understand it all i should have to do is load that table with the address of 
my code and set up the SCC to interrupt on receive character available.

Here's how things work now. I have TMON installed, so that I can stop the 
execution of my code at any point. In order to catch the interrupts that I'm 
interested in I replace the level 2 and 3 interrupt vectors at locations $68 
and $6c to point to my code. All my code does is jmp to the locations that 
were originally in those two vectors. I do this so that I can set break 
points at the jumps, so that every time a level 2 or 3 interrupt occurs I 
fall into TMON. I know this works because every time I move the mouse I drop
into TMON. However, when I send a character to the modem port my Mac hangs up. 
I'm at a loss to understand why this happens, any help would be appreciated.
If anyone has a section of code that does what I need that would be great.


				Thanks
					Tony Giaccone
Technical Details
Message-ID: <365@ur-tut.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!rochester!ur-tut!tgia

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!philabs!cmcl2!seismo!rochester!ur-tut!tgia
From: tgia@ur-tut.UUCP (Tony Giaccone)
Newsgroups: net.micro.mac
Subject: Interrupts on the Mac
Message-ID: <365@ur-tut.UUCP>
Date: Tue, 20-May-86 19:04:20 EDT
Article-I.D.: ur-tut.365
Posted: Tue May 20 19:04:20 1986
Date-Received: Sat, 24-May-86 01:41:40 EDT
Distribution: net
Organization: Univ. of Rochester Computing Center
Lines: 35