Concise Atari ST 68000 Programmer's Reference Guide
The standard system interrupt is level 2, vector $68 (104) and takes the following sequence every interrupt:
Vertical blank interrupt (VBI)
Order | Function | Sys variable |
1 | Increment the frame counter | FRCLOCK.L $466 |
2 | Test for mutual exclusion if = < 0 return | VBSLEM.W $452 |
3 | Save all the registers on stack | |
4 | Increment Vblank counter | VBCLOCK.L $462 |
5 | Test for high resolution mode if shftmd < 2 then goto 6 test for low resolution monitor attatched, if yes set mode to zero or |
SHFTMD.W $44C DEFSHFTMD.B $44A |
6 | Call cursor blink routine | COLORPTR.L $45A |
7 | Test for new colour pallette if colourptr = 0 then goto 8 Load palette with 16 words pointed to by colourptr and then zero it. |
SCREENPTR. L $45E |
8 | Test for new screen if screenptr = 0 then goto 9 Set screen physical base to screen pointer and then zero pointer. |
|
9 | Run deferred VBI vectors p of deferred VBI vectors Pointer to VBI vector array |
nvbls.W $454 vblqueue. L $456 |
10 | Return |
There are eight VBI vectors available in the default array, the first is reserved for GEMs VBI code. Pointers to new handlers are placed in the spare slots. Handler code ends in RTS and may use any register except the user stack pointer. Larger arrays can be allocated by redefining nvbls and vblqueue, copying the current vectors to the new array. An application that returns should tidy up the VBI queue.
Do not make VDI or LINE A calls via an Interupt as the results are unpredictable if the ST has a blitter chip installed.