src/video/ataricommon/SDL_xbiosinterrupt.S
changeset 987 d9f3b5bb7870
parent 820 0b9b4bf3c1e7
child 1063 0fb50bfaea7f
equal deleted inserted replaced
986:952ec1ddcb58 987:d9f3b5bb7870
   111 	.even
   111 	.even
   112 	.ascii "XBRA"
   112 	.ascii "XBRA"
   113 	.ascii "LSDL"
   113 	.ascii "LSDL"
   114 	.comm	oldmousevector,4*1
   114 	.comm	oldmousevector,4*1
   115 _SDL_AtariXbios_MouseVector:
   115 _SDL_AtariXbios_MouseVector:
   116 	moveml	d0/a1,sp@-
   116 	movel	d0,sp@-
   117 
   117 
   118 	/* Mouse buttons */
   118 	/* Mouse buttons */
   119 	moveb	(a0),d0
   119 	moveb	(a0),d0
   120 	andw	#3,d0
   120 	andw	#3,d0
   121 	movew	d0,_SDL_AtariXbios_mouseb
   121 	movew	d0,_SDL_AtariXbios_mouseb
   129 	moveb	a0@(2),d0
   129 	moveb	a0@(2),d0
   130 	extw	d0
   130 	extw	d0
   131 	addw	d0,_SDL_AtariXbios_mousey
   131 	addw	d0,_SDL_AtariXbios_mousey
   132 
   132 
   133 	/* Jump through old vector */
   133 	/* Jump through old vector */
   134 	movel	oldmousevector,a1
   134 	movel	sp@+,d0
   135 	jsr	(a1)
       
   136 
   135 
   137 	moveml	sp@+,d0/a1
   136 	movel	oldmousevector,sp@-
   138 	rts
   137 	rts
   139 
   138 
   140 	.data
   139 	.data
   141 	.even
   140 	.even
   142 	.comm	_SDL_AtariXbios_mousex,2*1
   141 	.comm	_SDL_AtariXbios_mousex,2*1
   151 	.even
   150 	.even
   152 	.ascii "XBRA"
   151 	.ascii "XBRA"
   153 	.ascii "LSDL"
   152 	.ascii "LSDL"
   154 	.comm	oldjoystickvector,4*1
   153 	.comm	oldjoystickvector,4*1
   155 _SDL_AtariXbios_JoystickVector:
   154 _SDL_AtariXbios_JoystickVector:
   156 	moveml	d0/a1,sp@-
   155 	movel	d0,sp@-
   157 
   156 
   158 	/* New joystick state */
   157 	/* New joystick state */
   159 	moveb	a0@(1),d0
   158 	moveb	a0@(1),d0
   160 	andw	#0x8f,d0
   159 	andw	#0x8f,d0
   161 	movew	d0,_SDL_AtariXbios_joystick
   160 	movew	d0,_SDL_AtariXbios_joystick
   162 
   161 
   163 	/* Jump through old vector */
   162 	/* Jump through old vector */
   164 	movel	oldjoystickvector,a1
   163 	movel	sp@+,d0
   165 	jsr	(a1)
       
   166 
   164 
   167 	moveml	sp@+,d0/a1
   165 	movel	oldjoystickvector,sp@-
   168 	rts
   166 	rts
   169 
   167 
   170 	.data
   168 	.data
   171 	.even
   169 	.even
   172 	.comm	_SDL_AtariXbios_joystick,2*1
   170 	.comm	_SDL_AtariXbios_joystick,2*1