PpHd 2001-11-28 at 06:29pm Pour 89
//void ClearScreen89(void* lightplane,void* darkplane); // C prototype
asm ("xdef CleaScreen89
ClearScreen89:
move.l 4(%a7),%a0
move.l 8(%a7),%a1
movem.l %d3-%d7/%a2-%a4,-(%a7)
lea (0xf00-(8+28)*30,%a0),%a0
lea (0xf00-(8+28)*30,%a1),%a1
moveq #0x0,%d0
moveq #0x0,%d1
moveq #0x0,%d2
moveq #0x0,%d3
moveq #0x0,%d4
moveq #0x0,%d5
moveq #0x0,%d6
movea.l %d0,%a2
movea.l %d0,%a3
movea.l %d0,%a4
moveq #13-1,%d7
0:
movem.l %d0-%d6/%a2-%a4,-(%a0) // 40
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 80
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 120
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 160
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 200
movem.l %d0-%d6/%a2-%a4,-(%a1)
dbf %d7, 0b // 200 * 13 = 2600
movem.l %d0-%d6/%a2-%a4,-(%a0) // 2640
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 2680
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 2720
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l %d0-%d6/%a2-%a4,-(%a0) // 2760 = LCD_SIZE - 30*(8+28)
movem.l %d0-%d6/%a2-%a4,-(%a1)
movem.l (%a7)+,%d3-%d7/%a2-%a4
rts
")
//void CopyScreen89(void* src, void*dest); // C prototype
asm ("xdef CopyScreen89
CopyScreen:
move.l 4(%a7),%a0
move.l 8(%a7),%a1
movem.l %d3-%d7/%a2-%a4,-(%a7)
moveq #13-1,%d7
0:
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 40
movem.l %d0-%d6/%a2-%a4,(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 80
movem.l %d0-%d6/%a2-%a4,40(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 120
movem.l %d0-%d6/%a2-%a4,80(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 160
movem.l %d0-%d6/%a2-%a4,120(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 200
movem.l %d0-%d6/%a2-%a4,160(%a1)
lea 200(%a1),%a1
dbf %d7, 0b // 200 * 13 = 2600
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 40
movem.l %d0-%d6/%a2-%a4,(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 80
movem.l %d0-%d6/%a2-%a4,40(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 120
movem.l %d0-%d6/%a2-%a4,80(%a1)
movem.l (%a0)+,%d0-%d6/%a2-%a4 // 160
movem.l %d0-%d6/%a2-%a4,120(%a1)
movem.l (%a7)+,%d3-%d7/%a2-%a4
rts
")
Voila les routines pour 89 normalement fonctionnelles.