diff --git a/basic/sources/commands/hardware/mouse.asm b/basic/sources/commands/hardware/mouse.asm index fd7da2ab..483e6e20 100644 --- a/basic/sources/commands/hardware/mouse.asm +++ b/basic/sources/commands/hardware/mouse.asm @@ -25,7 +25,7 @@ Command_Mouse: ;; [mouse] ; ; MOUSE SHOW|HIDE ; - cmp #KWD_SYS_SH1 ; check for SHOW and HIDE, shifted + cmp #KWD_SYS_SH1 ; check for CURSOR SHOW and HIDE, shifted bne _MOError iny lda (codePtr),y ; check SHOW/HIDE @@ -34,9 +34,24 @@ Command_Mouse: ;; [mouse] beq _MOControl cmp #KWD_HIDE-$100 beq _MOControl + cmp #KWD_CURSOR-$100 ; check cursor + beq _MOCursor _MOError: .error_syntax +_MOCursor: + ldx #0 ; get cursor number + jsr EXPEvalInteger8 + sta ControlParameters+0 + .DoSendMessage ; set mouse cursor + .byte 11,5 + .DoWaitMessage + lda ControlError + bne _MORange + rts +_MORange: + .error_range + _MOControl: eor #KWD_HIDE-$100 ; 0 HIDE <>0 SHOW sta ControlParameters+0 diff --git a/basic/test.bsc b/basic/test.bsc index eec06269..4e2fa4b0 100644 --- a/basic/test.bsc +++ b/basic/test.bsc @@ -2,6 +2,7 @@ ' BASIC Mouse cursor manipulation ' mouse show +mouse cursor 1 cls:line 0,0 ink 3 to 100,100 mouse to 260,180 repeat diff --git a/documents/release/basic.odt b/documents/release/basic.odt index 8a4fcb19..5ef51eb0 100644 Binary files a/documents/release/basic.odt and b/documents/release/basic.odt differ diff --git a/documents/release/basic.pdf b/documents/release/basic.pdf index 971a8d58..7824afb1 100644 Binary files a/documents/release/basic.pdf and b/documents/release/basic.pdf differ diff --git a/firmware/common/config/miscellany/group11_mouse.inc b/firmware/common/config/miscellany/group11_mouse.inc index 389ce6f8..aa2db07c 100644 --- a/firmware/common/config/miscellany/group11_mouse.inc +++ b/firmware/common/config/miscellany/group11_mouse.inc @@ -37,5 +37,10 @@ GROUP 11 Mouse FUNCTION 4 Test mouse present *DPARAMS = MSEMousePresent() ? 1 : 0; DOCUMENTATION - Returns non zero if a mouse is plugged in. - \ No newline at end of file + Returns non zero if a mouse is plugged in in \Param{0} + + FUNCTION 5 Select mouse Cursor + *DERROR = CURSetCurrent(DPARAMS[0]); + DOCUMENTATION + Select a mouse cursor in \Param{0} ; returns error status. + \ No newline at end of file