🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4582

need help with interrupts

#4582
From: Mark Bailey
Date: Wed, 06 Feb 1991 20:44
33 lines
1987 bytes
I need some help from some of you experienced programmers out there...

I have a programme that sits in a loop reading the keyboard untill there is
a hardware interrupt on IRQ3, when it goes to an ISR. The ISR updates some
variables, reads some data, increments the count of times entered and sets a    flag to say its been called. The loop checks for the flag to say there has     
an interrupt, if there has it writes the updated variables to the screen
using routines based on the write char with attribute service call of BIOS
INT 010.

The ISR PUSH's all used registers on entry and POP's before IRET.

The problem is this, if an IRQ occurs while data is being written to the
screen, after the IRET, the write does not continue properly, random chars 
are written at a random location. I have tried inserting CLI and STI in 
various positions to bracket the write but it seems to be interrupted 
regardless.
 
This is my first real attempt at pc programming in assembly, am I doing
something basically wrong or stupid?

I have kept this brief but if interested parties need more info, just mail
me.

BTW, its an 80286 processor, DOS 3.3, the interrupting hardware is a lan card.

Thanks,


        +-------------------------------------------------------------+
        |    Mark Bailey, Hewlett Packard Response Centre, England    |
        |    Mark Bailey / HP8000 / SA  +-----------------------------+
        |    mark@hpwin051.uksr.hp.com  |   DARK IN HERE ISN'T IT...  |
        +-------------------------------+_____________________________+
Technical Details
Message-ID: <3030001@hpwin052.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!hpopd!hpwin052!mark

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!hpopd!hpwin052!mark
From: mark@hpwin052.HP.COM (Mark Bailey)
Newsgroups: comp.os.msdos.programmer
Subject: need help with interrupts
Message-ID: <3030001@hpwin052.HP.COM>
Date: 6 Feb 91 20:44:01 GMT
Organization: HP Response Centre, Berkshire, England.
Lines: 33