Blitz (103/119)

From:Thilo Köhler
Date:23 Jun 2001 at 15:08:38
Subject:Re: cia timing

Hello Anton

> I tried this-
>
> .Interrupt
> MOVEM.l a0-a6/d0-d7,-(a7) ; save register
>
> test=test+1
>
> MOVEM.l (a7)+,a0-a6/d0-d7 ; restore register
> RTS
>
> - And tried printing test out in the main loop- but it stays at `0' :/
> I think I've tried this before, and it didn't work.
No no ! You missunderstood me !

1. You have to save and rescue any register you change during the interrupt.
Registers you don`t change can be left untouched.

2. To make Blitz commands & variables work, you have to fill the registers
a4, a5, a6 & d7 with blitz-specific data as the blitz
commands expect these register to have ceriandata in it.
(e.g. pointer to the variables)
That means you have to save their contents anywhere in RAM and
when the interrupt is called you have to write this data back to
the registers before you use any blitz stuff.

I have never tried this, but it should work. There is also
an example in Aminet how to use Blitz Commands
within hooks, this must be the same thing.

Ciao,

Thilo

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie