[A89] Re: Interrupts


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

[A89] Re: Interrupts




I asked the same question myself, and I got a good response from Olle:

>Hmm, is is possible to speed up how fast autoint 5 is
>struck in C, or do I need to use inline ASM (in either
>case, could I have an example if it is possible)?

You change auto int 5:s behavior via port 0x600015 and 0x600017
on info how, check http://m101.ryd.student.liu.se/J89hw.txt

you can fiddle with the contents of memory positions (and therefor 
ports, 
since they are memorymapped in 68k)
fairly easy in C:

*(char*)0x600015 = 0x1B;

sets 0x600015 to its default value for example.
to set a bit:

*(char*)0x600015 |= (1<<4);  to set bit 4

*(char*)0x600015 &= ~(1<<4); to clear bit 4.


the inline asm eqv. is quite easy, and imo easier to understand too:

asm("move.b #0x1B,0x600015");

asm("bset #4,0x600015");

and

asm("bclr #4,0x600015");

accordingly...

///Olle



---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax




References: