change function quit_program to this:
function quit_program()
{
sys_exit(NULL);
}
and change function main to this:
function main()
{
video_mode = 7;
screen_color.blue = 150;
mouse_mode = 2;
mouse_map = mouse_bmap;
while(1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
}
}
and add this line in your script:
BMAP* mouse_bmap = "mouse.pcx";
(replace "mouse.pcx" by your cursor sprite)