diff --git a/libsrc/c64/soft80_cgetc.s b/libsrc/c64/soft80_cgetc.s
index aa12cd8ca..1bca57bec 100644
--- a/libsrc/c64/soft80_cgetc.s
+++ b/libsrc/c64/soft80_cgetc.s
@@ -46,8 +46,18 @@ invertcursor:
         lda     #$34
         sta     $01
 
-        jsr     setcolor
-
+        ldy     #0
+        bcs     @set
+        ; restore old value
+        lda     tmp1
+        bcc     @lp0
+@set:
+        ; save old value
+        lda     (CRAM_PTR),y    ; vram
+        sta     tmp1
+        lda     soft80_internal_cellcolor
+@lp0:
+        sta     (CRAM_PTR),y    ; vram
         ldx     soft80_internal_cursorxlsb
         ldy     #7
 @lp1:
@@ -65,20 +75,7 @@ invertcursor:
         ; do not use soft80_putcolor here to make sure the cursor is always
         ; shown using the current textcolor without disturbing the "color voodoo"
         ; in soft80_cputc
-setcolor:
-        ldy     #0
-        bcs     @set
-        ; restore old value
-        lda     tmp1
-        sta     (CRAM_PTR),y    ; vram
-        rts
-@set:
-        ; save old value
-        lda     (CRAM_PTR),y    ; vram
-        sta     tmp1
-        lda     soft80_internal_cellcolor
-        sta     (CRAM_PTR),y    ; vram
-        rts
+
 
         .rodata
 nibble: .byte $f0, $0f