Skip to content

Commit

Permalink
Do not use registers when not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
pmandin committed Nov 22, 2004
1 parent f322521 commit e1acab1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/video/ataricommon/SDL_xbiosinterrupt.S
Expand Up @@ -113,7 +113,7 @@ no_restore_joystick:
.ascii "LSDL"
.comm oldmousevector,4*1
_SDL_AtariXbios_MouseVector:
moveml d0/a1,sp@-
movel d0,sp@-

/* Mouse buttons */
moveb (a0),d0
Expand All @@ -131,10 +131,9 @@ _SDL_AtariXbios_MouseVector:
addw d0,_SDL_AtariXbios_mousey

/* Jump through old vector */
movel oldmousevector,a1
jsr (a1)
movel sp@+,d0

moveml sp@+,d0/a1
movel oldmousevector,sp@-
rts

.data
Expand All @@ -153,18 +152,17 @@ _SDL_AtariXbios_MouseVector:
.ascii "LSDL"
.comm oldjoystickvector,4*1
_SDL_AtariXbios_JoystickVector:
moveml d0/a1,sp@-
movel d0,sp@-

/* New joystick state */
moveb a0@(1),d0
andw #0x8f,d0
movew d0,_SDL_AtariXbios_joystick

/* Jump through old vector */
movel oldjoystickvector,a1
jsr (a1)
movel sp@+,d0

moveml sp@+,d0/a1
movel oldjoystickvector,sp@-
rts

.data
Expand Down

0 comments on commit e1acab1

Please sign in to comment.