Re: A92: Interrupts, keys and timer


[Prev][Next][Index][Thread]

Re: A92: Interrupts, keys and timer



On Aug 20, 10:43am, Niklas Brunlid wrote:
> Subject: A92: Interrupts, keys and timer
> How do I disable the interrupt that causes the shift, 2nd and diamond sign
> to appear?
> I've tried to disable auto-int 1, but my program started reading the wrong
> keys from the keyboard matrix, and restarted when I exited it, and exited
> the Fargo shell by itself...

   How are you disabling auit-int 1?  I highly doubt that auto-int 1 would
affect that much of the system without some errors in the code.  Be sure to set
the interrupt mask correctly, and leave the supervisor bit set.

> If I disable all interrupts, what's the best way to make some sort of timer
> in a game (a counter, like 30 "seconds" and down)? I need to add a delay,
> too, but when I tried to use the programmable rate generator, it wouldn't
> work. I know this is because the interrupts are turned off (I think).


  In general, don't disable the interrupts unless you know what you are doing.
You might try instead using timing loops (a loop with a bunch of 'nop's in it).
 Unless you're writing extremely time critical stuff (like a grayscale shoot-em
up) you probably should not mess with interrupts.
   Unfortunately I don't have my calc with me or I'd tell you which interrupt
was drawing the status bar at the bottom of the screen.  Perhaps someone else
knows off the top of their head..

--Bryan
bcturner@eos.ncsu.edu


Follow-Ups: References: