cos takiego:
/*
** Code to read an analogue joystick on an STe or Falcon
** By Xav
*/
void main (void)
{
void *stack_address;
short *x_axisA = (short *)0xFF9210;
short *y_axisA = (short *)0xFF9212;
unsigned char x_axis_returned;
unsigned char y_axis_returned;
while(1)
{
/* Supervisor mode */
stack_address = Super(NULL);
/* Read the ports */
x_axis_returned = *x_axisA;
y_axis_returned = *y_axisA;
/* Return to user mode */
Super(stack_address);
/* Display the results */
printf("\nX Axis = %d, Y Axis = %d",
x_axis_returned, y_axis_returned);
}
return;
}
/*
** End of example code
*/