diff --git a/include/mouse.h b/include/mouse.h index af91cecca..1a8745572 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -118,6 +118,9 @@ unsigned char __fastcall__ mouse_install (const struct mouse_callbacks* c, unsigned char __fastcall__ mouse_uninstall (void); /* Uninstall the currently loaded driver. Returns an error code. */ +const char* __fastcall__ mouse_geterrormsg (unsigned char code); +/* Get an error message describing the error in code. */ + void __fastcall__ mouse_hide (void); /* Hide the mouse. The function manages a counter and may be called more than * once. For each call to mouse_hide there must be a call to mouse_show to make diff --git a/libsrc/mouse/Makefile b/libsrc/mouse/Makefile index 4c30e0805..dee8f70dd 100644 --- a/libsrc/mouse/Makefile +++ b/libsrc/mouse/Makefile @@ -31,14 +31,15 @@ CFLAGS = -Osir -g -T -t $(SYS) --forget-inc-paths -I . -I ../../include C_OBJS = mouse_load.o -S_OBJS = mouse-kernel.o \ - mouse_box.o \ - mouse_hide.o \ - mouse_info.o \ - mouse_ioctl.o \ - mouse_move.o \ - mouse_pos.o \ - mouse_show.o \ +S_OBJS = mouse-kernel.o \ + mouse_box.o \ + mouse_geterrormsg.o \ + mouse_hide.o \ + mouse_info.o \ + mouse_ioctl.o \ + mouse_move.o \ + mouse_pos.o \ + mouse_show.o \ mouse_unload.o #-------------------------------------------------------------------------- diff --git a/libsrc/mouse/mouse_geterrormsg.s b/libsrc/mouse/mouse_geterrormsg.s new file mode 100644 index 000000000..f4189afd6 --- /dev/null +++ b/libsrc/mouse/mouse_geterrormsg.s @@ -0,0 +1,49 @@ +; +; Ullrich von Bassewitz, 2004-11-07 +; +; const char* __fastcall__ mouse_geterrormsg (unsigned char code); +; /* Get an error message describing the error in code. */ +; + + .include "mouse-kernel.inc" + + +.proc _mouse_geterrormsg + + cmp #MOUSE_ERR_COUNT + bcc L1 + lda #MOUSE_ERR_COUNT ; "Unknown error" +L1: tay + ldx #>msgtab + lda #