Par souci de cohérence, je suppose qu'il y a un move.w ypos,%d4 juste au dessus.
oui.
Ensuite, pour le transfert xpos->%d0->%d1 (et ypos->%d4->%d1), ma seule explication est que %d0 (xpos) est réutilisé peu après.
Je ne vois aucune réutilisation de d0 après
__main:
link.w %a6,#0
movm.l #0x1c38,-(%sp)
move.l 100.w,OldInt1
move.l 116.w,OldInt5
move.l #__dummy_handler__,262244
move.l #__dummy_handler__,262260
move.l 200.w,%a0
move.l 1656(%a0),%a0
jbsr (%a0)
jbsr GrayOn
moveq.l #1,%d5
move.w __calculator,%d1
moveq.l #120,%d0
tst.w %d1
jbne .L3
moveq.l #80,%d0
.L3:
move.w %d0,xpos
moveq.l #64,%d4
tst.w %d1
jbne .L5
moveq.l #50,%d4
.L5:
move.w %d4,ypos
[u]move.w xpos,%d0[/u]
[u]move.w %d0,%d1[/u]
lsl.w #7,%d1
move.w %d1,x_pcos
move.w %d4,%d1
lsl.w #7,%d1
move.w %d1,y_psin
lea Tbl_cos,%a4
move.b Tbl_cos+1,%d1
ext.w %d1
move.w %d1,pcos
move.b Tbl_cos+65,%d2
ext.w %d2
move.w %d2,psin
moveq.l #1,%d3
move.l __L_plane,%a1
lea ball_sprite,%a0
moveq.l #8,%d2
move.w %d4,%d1
jbsr Sprite8
jbra .L6
.even
.L32:
lea Sprite8,%a3
clr.w %d3
move.l __L_plane,%a1
lea ball_sprite,%a0
moveq.l #8,%d2
move.w ypos,%d1
[u]move.w xpos,%d0[/u]
jbsr (%a3)
move.w x_pcos,%d0
add.w pcos,%d0
move.w %d0,x_pcos
move.w y_psin,%d1
add.w psin,%d1
move.w %d1,y_psin
lsr.w #7,%d0
move.w %d0,xpos
lsr.w #7,%d1
move.w %d1,ypos
moveq.l #-2,%d0
jbsr (%a2)
tst.w __calculator
jbeq .L14
and.b #-128,%d0
jbne .L15
jbra .L13
.even
.L14:
and.w #4,%d0
jbeq .L13
.L15:
subq.w #4,%d5
.L13:
moveq.l #-2,%d0
jbsr (%a2)
move.w __calculator,%d2
jbeq .L17
and.w #32,%d0
jbra .L34
.even
.L17:
and.w #1,%d0
.L34:
tst.w %d0
jbeq .L16
addq.w #4,%d5
.L16:
move.w xpos,%d0
jbeq .L20
move.w %d0,%d1
addq.w #8,%d1
tst.w %d2
jbeq .L21
cmp.w #239,%d1
jbeq .L20
jbra .L19
.even
.L21:
cmp.w #159,%d1
jbne .L19
.L20:
move.w #128,%d1
sub.w %d5,%d1
move.w %d1,%d5
.L19:
move.w ypos,%d1
jbeq .L24
move.w %d1,%d2
addq.w #8,%d2
tst.w __calculator
jbeq .L25
cmp.w #127,%d2
jbeq .L24
jbra .L23
.even
.L25:
cmp.w #99,%d2
jbne .L23
.L24:
move.w #255,%d2
sub.w %d5,%d2
move.w %d2,%d5
.L23:
and.w #255,%d5
move.w %d5,%a0
move.b (%a4,%a0.l),%d2
ext.w %d2
move.w %d2,pcos
add.w #64,%d5
move.b (%a4,%d5.w),%d2
ext.w %d2
move.w %d2,psin
add.w #-64,%d5
moveq.l #1,%d3
move.l __L_plane,%a1
lea ball_sprite,%a0
moveq.l #8,%d2
jbsr (%a3)
move.l 200.w,%a0
move.w #1,-(%sp)
move.w ypos,%d0
addq.w #4,%d0
move.w %d0,-(%sp)
move.w xpos,%d1
addq.w #4,%d1
move.w %d1,-(%sp)
move.l 1696(%a0),%a0
jbsr (%a0)
addq.l #6,%sp
move.w #4999,%d0
jbra .L27
.even
.L31:
subq.w #1,%d0
.L27:
tst.w %d0
jbge .L31
.L6:
move.w #-257,%d0
tst.w __calculator
jbne .L10
moveq.l #-65,%d0
.L10:
lea _rowread,%a2
jbsr (%a2)
tst.w __calculator
jbeq .L11
and.w #64,%d0
jbra .L33
.even
.L11:
and.w #1,%d0
.L33:
tst.w %d0
jbeq .L32
jbsr GrayOff
move.l OldInt5,262260
move.l OldInt1,262244
movm.l -24(%a6),#0x1c38
unlk %a6
rts
Or un transfert registre->registre est plus rapide qu'un transfert mémoire->registre, et est codé sur moins d'octets.
Oui bien sûr mais ne peut utiliser ce transfert c'est un peu bête.
Note : c'est la première fois que je vois de l'Asm 68k ... c'est tout bidon !
Euh, oui, bon, une fois qu'un connaît déjà l'Assembleur, c'est vrai, je le concede ...
Ouai c'est un bon langage.