🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2874

PLEASE HELP: M2 AND INTERRUPTS

#2874
From: Jasmine Sanghvi
Date: Tue, 03 Oct 1995 20:36
43 lines
1848 bytes
Hello!

       I am using TopSpeed M2 compiler v3.10. I am trying to program
Synchronous Modem Card in PC (on DOS).  I have an Interrupt 
service routine for the SCC on the card. I have two coroutines: one for
implementing BISYNC protocol and one for User Interface. Reading the 
TopSpeed manuals, I figure that there are two ways to write ISR's in M2 :

(1) (*# save, call(interrupt => on, reg_param=>(), same_ds =>off) *) 
     PROCEDURE IntHandler;
      BEGIN
               :
               :
              Out(020H, 020H);  (* eoi *)
      END IntHandler;
      (*#restore*)

(2) PROCEDURE IntHandler;
     BEGIN
             LOOP
                   IOTRANSFER(IntProc, MainProc, 0BH);
                   :
                   :
             END;
     END IntHandler;

The software runs fine as long as I have no coroutines (ie. i implement
the protocol and User Interface in a single thread). When I start
using coroutines ie TRANSFER(), my machine locks up.   

 What I want to know is 
(1)    what is the difference between two methods shown above ?
(2)    Is there a special method to implement ISR's when using MultiThreading ?

I have even tried using TopSpeed's PROCESS Library with no luck. My ISR's are 
fine because they wrk when I don't use any TRANSFER() calls.  
Any hints, suggestions would be appreciated.  Please help before I am forced 
to switch to using C.

email: cmuxdv1@primenet.com

Thanks,
Jasmine.
Technical Details
Message-ID: <cmuxdv1.3.00C0F061@primenet.com>
Path: arc1-ca.pugleaf.net!ip207.sbd.primenet.com!cmuxdv1

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!ip207.sbd.primenet.com!cmuxdv1
From: cmuxdv1@primenet.com (Jasmine Sanghvi)
Newsgroups: comp.lang.modula2
Subject: PLEASE HELP: M2 AND INTERRUPTS
Date: Tue, 3 Oct 1995 13:36:55 MST
Organization: Primenet
Message-ID: <cmuxdv1.3.00C0F061@primenet.com>
NNTP-Posting-Host: ip207.sbd.primenet.com
X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #4]