[A89] Re: interrupts


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

[A89] Re: interrupts




Thanks for the help! The reason i wanted to know about interrupts is that i 
created a program called "bincount" and uploaded it to ticalc.org (I know, i 
know, it's really laughable but its the first thing ive done in a very long 
time). Anyway, it has 8 different speed settings. The problem is, when i 
slow down and i am already in a fast mode, it slows down really fast because 
there is no delay between consecutive key inputs. When I try to speed up 
from slow mode, it takes a long time because there is a large delay between 
each time the keyboard is read. If i used interrupts for the key input, the 
time between key inputs would be constant, and the user would have a much 
easier time controlling the program. I have a pretty good idea about how 
interrupts work, but its been a while since i looked at asm. The biggest 
thing is just figuring out the specific details and syntax for MC68000 
assembly. Thanks again!
nwr


>From: Olle Hedman <alh@home.se>
>Reply-To: assembly-89@lists.ticalc.org
>To: assembly-89@lists.ticalc.org
>Subject: [A89] Re: interrupts
>Date: Thu, 04 Apr 2002 11:20:28 +0200
>
>
>At 07:03 2002-04-04, you wrote:
>
> >hi all
> >does anyone know where i can find a tutorial on interrupts or some source
> >code that is easy to understand about interrupts? ive looked at the 
>source
> >for gray4lib and gray7lib, but its sort of confusing. i seem to remember
> >seeing a tutorial somewhere. a tutorial on grayscale might be helpful.
> >thanks everyone!
>
>What is it you want to do with interrupts?
>
>I don't know of any tutorial but reading in the below could help you.
>Basic usage info about the TIGCC interface to it is documented in the entry
>DEFINE_INT_HANDLER
>but I suspect you want to use it in asm. Reading it could help in some
>understanding anyway. (Depending on how much you already know) The
>order-of-doing-things is basicly the same in both C and asm.
>
>Info about what interrupt does what, and how to control their behaviour,
>you can find in J89hw.txt that you can find on my site
>http://alh.dhs.org/ti89/ (which is up again after two months downtime!
>horray! :)
>
>If you look at the enum AutoInts in the TIGCC docs, you find what addresses
>the different interrupt vectors are stored at.
>Those vectors are nothing more then memorypositions where you store the
>address of the interrupt function you want to run.
>Then just write your interrupt function like any other subroutine, but end
>it with RTE instead of RTS, (or JMP to the old interrupt vector that you
>have stored somewhere, to run the standard interrupt. the old will RTE for
>you (same as ExecuteHandler() in tigcc))
>
>If you want to write a link interrupt (autoint 4) that totally replaces the
>standard, special care must be taken to acknowledge the interrupt properly,
>or else the calc will lock up. Details in J89hw.txt.
>
>I don't know if this helps you any, please tell :)
>I could probably write (or find somewhere on my hd) an example source if I
>knew more about what it is you want to do.
>I do have a file that uses a combo of C and asm for interrupts in hidekstat
>that can be found in 
>http://d188.ryd.student.liu.se/ftp/calculator/ti89/source/
>(It is a small hack to hide the 2ns, alpha, shift, diamond markers when
>using AMS ngetchx and dialog functions.)
>But I doubt it is very easy to understand. It hooks itself both before and
>after the standard interrupt, instead of just before that is the standard
>way. This might look confusing if you don't know the details of how the 68k
>handles interrupts.
>
>///Olle
>
>




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com




Follow-Ups: