From 770b22e14d9444f81bc9a10c9d6c33a3e724c838 Mon Sep 17 00:00:00 2001 From: Karri Kaksonen Date: Sat, 9 Apr 2022 07:37:07 +0300 Subject: [PATCH] Remove duplicate code --- libsrc/atari7800/setcursor.s | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/libsrc/atari7800/setcursor.s b/libsrc/atari7800/setcursor.s index 0b49fe097..69cd5f126 100644 --- a/libsrc/atari7800/setcursor.s +++ b/libsrc/atari7800/setcursor.s @@ -23,7 +23,6 @@ ; definitely not allow direct access to the variables. ; - .export _setcursor .export gotoxy, _gotoxy, _gotox, _gotoy, _wherex, _wherey .export CURS_X, CURS_Y .constructor init_cursor @@ -31,6 +30,7 @@ .importzp sp .import _zones + .import cursor .import pusha, incsp1, pusha0, pushax, popax .include "atari7800.inc" .include "extzp.inc" @@ -46,8 +46,6 @@ CURS_X: .byte 0 CURS_Y: .byte 0 -_cursor_visible: - .byte 1 blink_time: .byte 140 @@ -79,18 +77,6 @@ umula0: lda ptr7800 ; Load the result rts -;----------------------------------------------------------------------------- -; Enable/disable cursor -; - .proc _setcursor - - ldx _cursor_visible - sta _cursor_visible - txa - rts - - .endproc - ;----------------------------------------------------------------------------- ; Calculate cursorzone address ; You also need to set the cursorzone to point to the correct cursor Header @@ -147,7 +133,7 @@ umula0: pla sta CURS_Y jsr calccursorzone - lda _cursor_visible + lda cursor beq @L1 lda #30 ; enable cursor @L1: ldy #1